installation

Installing swowtcli is very simple. We provide the already packaged phar on GitHub.

download

You need to download the packaged swoftcli.phar from the GitHub Releases of swoft-cli.

Note: You need to replace {VERSION} in the following command with the specified version. Of course, you can also download it directly through the browser.

 wget https://github.com/swoft-cloud/swoft-cli/releases/download/{VERSION}/swoftcli.phar

# 检查包是否可用
php swoftcli.phar -V
php swoftcli.phar -h 

Global use

If you need to use swoftcli directly from swoftcli :

 # move to ENV path:
mv swoftcli.phar /usr/local/bin/swoftcli
chmod a+x /usr/local/bin/swoftcli

# check
swoftcli -V 

Construct

If you need to build a phar package from the latest code:

 git clone https://github.com/swoft-cloud/swoft-cli
cd swoft-cli 
composer install

// build
php -d phar.readonly=0 bin/swoftcli phar:pack -o=swoftcli.phar 
/docs/2.x/en/tool/swoftcli/install.html
progress-bar