This project is not maintained anymore. The new version available here: https://github.com/chriha/project-cli
- initialize, install and start whole environments (web server, database, caching, mail server, RabbitMQ, etc.) in seconds
- specify the services depending on your projects needs in your
docker-compose.yml
- install even complex projects with a single command by using individual commands
- temporarily expose the application securely to the internet (ngrok required)
- start Jenkins builds and print its console output
- reduce amount of necessary commands for each developer
- get support by sharing your terminal session via tmate
- use the
project
command everywhere in your project, not only in your root directory - every developer is using the exact same environment and tools
- use (force) the same project structure in every project
- no need to install and manage multiple versions for each PHP, NPM, MySQL, etc. on your host
- simple access to log files; tail and concat all or just specific services
- switch between projects that you worked on with a single command
- write your own plugins to extend pro-cli
- easily list, enable, disable, add and remove your local hosts
See how you can use it, take a look at the wiki for further help or play around with the pro-cli-example project. For a list of available plugins see pro-cli/plugins.
Supported project types: PHP (Laravel), Django, NodeJS
After you installed all dependencies:
git clone -q https://github.com/chriha/pro-cli.git $HOME/.pro-cli && $HOME/.pro-cli/setup.sh
sudo ln -s $HOME/.pro-cli/project.sh /usr/local/bin/project
Reload your shell and use the project
command with all its beauty.
Every pro-cli project has its own pro-cli.json
file which you can change
to your needs. Add whole installation processes or single commands. The docker-compose.yml
is the default configuration for the services and should not be overwritten. Instead you
should create your own docker-compose.local.yml
, which can extend the default.
To use the zsh completions, add the following to your ~/.zshrc
:
fpath=($HOME/.pro-cli/completions $fpath)
autoload -U compinit
compinit
Run project self-update
to update the completions and reload your shell via . ~/.zshrc
.
To manually update pro-cli just use the project self-update
command.
rm -rf $HOME/.pro-cli && rm /usr/local/bin/project
It's mandatory, that the project has the according directory structure and files in order for pro-cli to work properly. See
environments
directory for structure and files.
The most used commands while working with pro-cli. Remember, every command that is executed inside of a container / service, will be executed in the application root (src/.
), no matter from where you run the project
command on your host.
project init FOLDER --type=laravel|php|nodejs|django
For automatic installation, you need to add an install
command to the pro-cli.json
.
project clone URL_TO_REPOSITORY
project up|down|restart
# for the web service
project artisan|tinker|composer|...
# for the npm service
project npm install|run|...
ngrok needs to be installed in one of your bin
folders of your host.
# install the ngrok plugin for pro-cli
project plugins install ngrok
# expose your application using ngrok
project expose [--auth='user:password']
project status|top
project logs [-f] SERVICE
You still need to configure your IDE
project xdebug enable|disable|status
project query-logs enable|disable|tail|clear
project hosts list|enable|disable|add|rm|has [HOSTNAME] [IP]
project hosts enable|disable my.website.local
sudo project hosts add my.website.local local|127.0.0.1
sudo project hosts rm my-old.website.local
Whenever you change the hosts file (eg enable, disable, add, rm), you have to run the command with sudo / as root. There will always be a backup of your hosts file with the previous version.
project compose ...
project exec SERVICE bash
project support [-h|--help] [attach|close|status|tmate]
# install the jenkins plugin for pro-cli
project plugins install jenkins
project build [-o|--output] stage [--branch=develop]