A command-line tool that help you manage Nginx local development configuration
A command-line tool that help you more easily use Nginx.
Site CLI is a command-line tool that helps you manage and switch Nginx local development environment configuration files.
This tool makes me lazy in the development, It's more than just
cd && ls,
nginx -s , I enjoy it.
- Auto-Completion - Supports all commands, arguments and options auto-completion.
- Grouping - Uses directories to group site configuration files. Support the operation of any item and ane group.
- List - Use
lscommand quick see site list and information.
- Switch - Use
enable/disablecommand can quick switching site or group, it support service auto reload.
- Service - Help you use the same command control service in different environments.
- Alfred3 Workflow Support - Provide workflow helpe you quick search and switch site.
Download Phar file:
- Phar Releases
$ mv site-cli.phar /usr/local/bin/site $ chmod +x /usr/local/bin/site
Download the library using composer:
$ composer require panlatent/site-cli
$ ln -s ./bin/site-cli /usr/local/bin/site $ chmod +x /usr/local/bin/site
The default configuration provided by Site Cli works very well, but you can still customize it.
init command will create a .site-cli.yml file to your home directory.
Edit this file:
site: available: ~/etc/nginx/sites-available enabled: ~/etc/nginx/sites-enabled
init --dump-completion will make a completion script contents and print to the terminal.
-o, --output[=OUTPUT] will write to a file.
Add shell complete in
$ site init --dump-completion -o ~/.site-cli.bash $ echo "source .site-cli.bash" >> ~/.zshrc
$ site [command] [argment]
- clear - Clear unless symbolic links
- config - Get and set site-cli options
- create - Create a new site
- disable - Disable a site or a group sites
- edit - Edit site configuration using editor
- enable - Enable a site or a group sites
- help - Displays help for a command
- init - Init site-cli settings
- ls - List groups and sites contents
- service - Control site service process
Download nginx.vim nginx vim
$ mv nginx.vim ~/.vim/syntax/ $ vi ~/.vim/filetype.vim
au BufRead,BufNewFile your_nginx_path/* set ft=nginx
The Site CLI is open-sourced software licensed under the MIT license.