https://github.com/swoft-cloud/swoft-cli
🛠️ Command line tool for quick use swoft. Support create new application, generate class, hot reload server and more.
https://github.com/swoft-cloud/swoft-cli
swoft swoft-application swoft-cli swoft-console
Last synced: about 1 year ago
JSON representation
🛠️ Command line tool for quick use swoft. Support create new application, generate class, hot reload server and more.
- Host: GitHub
- URL: https://github.com/swoft-cloud/swoft-cli
- Owner: swoft-cloud
- License: apache-2.0
- Created: 2019-01-15T15:28:35.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-09T02:39:41.000Z (over 5 years ago)
- Last Synced: 2025-04-05T01:04:45.169Z (about 1 year ago)
- Topics: swoft, swoft-application, swoft-cli, swoft-console
- Language: PHP
- Homepage: https://www.swoft.org/docs
- Size: 313 KB
- Stars: 46
- Watchers: 7
- Forks: 17
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Swoft CLI
[](https://github.com/swoft-cloud/swoft-cli)
[](https://secure.php.net/)
[](https://www.swoft.org/docs)
[](https://github.com/swoft-cloud/swoft/blob/master/LICENSE)
[](https://github.com/swoft-cloud/swoft-cli/actions)
> **[中文说明](README.zh-CN.md)**
🛠️ swoft-cli is an CLI tool application for quick use swoft.
- Quick create new application skeleton
- Quick create new component skeleton
- Monitor file changes of the user's swoft project and automatically restart the server
- Generate swoft class: http controller, http middleware, ws module, ws controller and more
- More features ...
> Documents on https://www.swoft.org/docs/2.x/zh-CN/tool/swoftcli/index.html

## Install
Download phar from github releases page
> Notice: please replace the `{VERSION}` to specified version
```bash
# wget https://github.com/swoft-cloud/swoft-cli/releases/download/{VERSION}/swoftcli.phar
# eg
wget https://github.com/swoft-cloud/swoft-cli/releases/download/v0.2.0/swoftcli.phar
# quick check
php swoftcli.phar -V
php swoftcli.phar -h
```
Add to global ENV PATH:
```bash
# move to ENV path:
mv swoftcli.phar /usr/local/bin/swoftcli
chmod a+x /usr/local/bin/swoftcli
# check
swoftcli -V
```
## Build
You can build package from latest code:
```bash
php -d phar.readonly=0 bin/swoftcli phar:pack -o=swoftcli.phar
```
## License
[Apache 2.0](LICENSE)