2017 © Pedro Peláez
 

project site-cli

A command-line tool that help you manage Nginx local development configuration

image

panlatent/site-cli

A command-line tool that help you manage Nginx local development configuration

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Site CLI

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

A command-line tool that help you more easily use Nginx., (*2)

What's This

Site CLI is a command-line tool that helps you manage and switch Nginx local development environment configuration files., (*3)

This tool makes me lazy in the development, It's more than just cd && ls, ln -s, nginx -s , I enjoy it., (*4)

Features

  • 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 ls command quick see site list and information.
  • Switch - Use enable/disable command 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.

Installation

Download Phar file: + Phar Releases, (*5)

$ mv site-cli.phar /usr/local/bin/site
$ chmod +x /usr/local/bin/site

Download the library using composer:, (*6)

$ composer require panlatent/site-cli
$ ln -s ./bin/site-cli /usr/local/bin/site
$ chmod +x /usr/local/bin/site

Configuration

Custom Configuration

The default configuration provided by Site Cli works very well, but you can still customize it., (*7)

Run init command will create a .site-cli.yml file to your home directory. Edit this file:, (*8)

site:
  available: ~/etc/nginx/sites-available
  enabled: ~/etc/nginx/sites-enabled

Add Completion

Run init --dump-completion will make a completion script contents and print to the terminal. Use -o, --output[=OUTPUT] will write to a file. Add shell complete in ~/.zshrc or ~/.bash_profile: source ~/.site-cli.sh, (*9)

A example:, (*10)

$ site init --dump-completion -o ~/.site-cli.bash
$ echo "source .site-cli.bash" >> ~/.zshrc

Usage

$ site [command] [argment]

Command List:, (*11)

  • 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

Optional

Add nginx.conf vim syntax:

Download nginx.vim nginx vim, (*12)

$ mv nginx.vim ~/.vim/syntax/
$ vi ~/.vim/filetype.vim

Add au BufRead,BufNewFile your_nginx_path/* set ft=nginx, (*13)

License

The Site CLI is open-sourced software licensed under the MIT license., (*14)

The Versions

27/03 2018

dev-master

9999999-dev

A command-line tool that help you manage Nginx local development configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

22/07 2017
15/06 2017
26/05 2017

1.2.0-rc.1

1.2.0.0-RC1

A command-line tool that help you manage Nginx local development configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

23/05 2017

1.2.0-beta.3

1.2.0.0-beta3

A command-line tool that help you manage Nginx local development configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

23/05 2017

1.2.0-beta

1.2.0.0-beta

A command-line tool that help you manage Nginx local development configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

09/05 2017

1.2.0-alpha

1.2.0.0-alpha

A command-line tool that help you manage Nginx local development configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

11/04 2017

1.1.0-alpha

1.1.0.0-alpha

Help you manage Nginx local development configuration

  Sources   Download

MIT

The Requires

 

The Development Requires

03/04 2017

1.0.0

1.0.0.0

Help you manage Nginx local development configuration

  Sources   Download

MIT

The Requires

 

The Development Requires