Define aliases for your favorite Composer packages.
Define aliases for your favorite packages, making usage as simple as
crap require monolog.
PHP 5.6+ or 7.0+ required.
Because using multiple global Composer packages can create dependency conflicts, I recommend using
composer global require:
If you don't mind descending into global dependency hell:
composer global require geekish/crap
To define your aliases (version constraints are optional):
crap alias monolog monolog/monolog:^1.21
To use your aliases:
crap require monolog crap update monolog crap remove monolog
To remove an alias:
crap unalias monolog
View a list of defined alias:
These commands simply find your aliases, and call the Composer commands with the real package names.
If you provided a version constraint when defining your alias,
crap will use this by default.
You may provide a version constraint on the require and update commands; this will override any default.
remove all accept the same options/flags as the Composer commands that they call.
For reference, see Composer's Commands documentation.
I tried to create global shell aliases for packages that I used often.
It worked, but if I typed out the full package name, I would get
I also tried to write a Composer plugin, but there was no way to override the incoming package argument.
So, I wrote
Oh, the name?
I was going to call it
cra, and call the main class
Then I thought of the acronym, and it was just too good not to use.
Yes, it is totally inspired by Spongebob's POOP.
Please see CHANGELOG for more information what has changed recently.
After a composer install, to run the unit tests via
If you discover any security related issues, please email email@example.com instead of using the issue tracker.
- asciinema & asciinema2gif - for the terminal recording
- consolidation/cgr - for the inspiration to write this.
The MIT License (MIT). Please see License File for more information.