PHPackages                             phpsu/shellcommandbuilder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpsu/shellcommandbuilder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phpsu/shellcommandbuilder
=========================

Fluid Builder to create shell commands

2.1.0(12mo ago)378.7k↓47.3%1[3 issues](https://github.com/phpsu/ShellCommandBuilder/issues)[1 PRs](https://github.com/phpsu/ShellCommandBuilder/pulls)1MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0CI failing

Since May 5Pushed 12mo ago2 watchersCompare

[ Source](https://github.com/phpsu/ShellCommandBuilder)[ Packagist](https://packagist.org/packages/phpsu/shellcommandbuilder)[ RSS](/packages/phpsu-shellcommandbuilder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (4)Versions (10)Used By (1)

ShellCommandBuilder
===================

[](#shellcommandbuilder)

[![Latest Version](https://camo.githubusercontent.com/265448acbb1a0681c1642aadfbe750169826f13fa74d0eea5c363087881d98e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652d7072652f70687073752f7368656c6c636f6d6d616e646275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/phpsu/shellcommandbuilder/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/11fe0c4a20427d41e23269a0dbda9ec3372d8e87a1b9c6ae6ac7e26b24e4f546/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f70687073752f7368656c6c636f6d6d616e646275696c6465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/phpsu/shellcommandbuilder)[![Coverage Status](https://camo.githubusercontent.com/760b08eda9f4c76b7cb0d2323e447f3b5a0c7411d38b48057523ad87c7062129/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f70687073752f7368656c6c636f6d6d616e646275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/phpsu/shellcommandbuilder)[![Type Coverage Status](https://camo.githubusercontent.com/dd74ca0c9467909d6eb3a30a7c4a7e66c7ec0d71278cce4f0091456eb5f9051b/68747470733a2f2f73686570686572642e6465762f6769746875622f70687073752f5368656c6c436f6d6d616e644275696c6465722f636f7665726167652e737667)](https://github.com/phpsu/shellcommandbuilder)[![Infection MSI](https://camo.githubusercontent.com/c2eb2eab57d6e4cbedfae4bf30157677c08db5beac1c3bad4bab8dc0808fafdf/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742d7371756172652675726c3d68747470733a2f2f62616467652d6170692e737472796b65722d6d757461746f722e696f2f6769746875622e636f6d2f70687073752f5368656c6c436f6d6d616e644275696c6465722f6d6173746572)](https://infection.github.io)[![Quality Score](https://camo.githubusercontent.com/fca3db31a1f469e84573012e3b3918b7ab93fac03665808edfd4c10e9ec7a06d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f70687073752f7368656c6c636f6d6d616e646275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/phpsu/shellcommandbuilder)[![Total Downloads](https://camo.githubusercontent.com/3c660369a3048b672cd6d9d84be93c34f35acd9df2af9d7cce989553c607189e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70687073752f7368656c6c636f6d6d616e646275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpsu/shellcommandbuilder)

Creating basic and more complex shell commands in an fluid object-oriented fashion. This makes it very straight forward to abstract the general mechanisms of bash behind a readable and debuggable layer.

The Reference for this library is based on the [GNU Bash Reference Manual](https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Simple-Commands)
If you need more features from that reference in this library, feel free to create an issue or pull request.

### Concept

[](#concept)

Imagine you want to create the following bash command: `a && b | c || d |& f && (g && h) || {i || j;}`

You can achieve that by creating a `ShellBuilder`-Object and then reading the command from left to right as instructions.

```
