Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Command doc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Aug 7, 2020
1 parent 6f17ab5 commit 4e69b8e
Showing 1 changed file with 40 additions and 70 deletions.
110 changes: 40 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ Nitro is a speedy local development environment that’s tuned for [Craft CMS](h
- [Using MailHog](#using-mailhog)
- [Advanced Configuration](#advanced-configuration)
- [Commands](#commands)
- [`apply`](#apply)
- [`add`](#add)
- [`apply`](#apply)
- [`context`](#context)
- [`db add`](#db-add)
- [`db backup`](#db-backup)
Expand All @@ -42,22 +42,22 @@ Nitro is a speedy local development environment that’s tuned for [Craft CMS](h
- [`nginx restart`](#nginx-restart)
- [`nginx start`](#nginx-start)
- [`nginx stop`](#nginx-stop)
- [`php iniset`](#php-iniset)
- [`php restart`](#php-restart)
- [`php start`](#php-start)
- [`php stop`](#php-stop)
- [`php iniset`](#php-iniset)
- [`remove`](#remove)
- [`redis`](#redis)
- [`remove`](#remove)
- [`rename`](#rename)
- [`restart`](#restart)
- [`self-update`](#self-update)
- [`ssh`](#ssh)
- [`start`](#start)
- [`stop`](#stop)
- [`ssh`](#ssh)
- [`update`](#update)
- [`version`](#version)
- [`xdebug on`](#xdebug-on)
- [`xdebug off`](#xdebug-off)
- [`xdebug off` / `xoff`](#xdebug-off-xon)
- [`xdebug on` / `xon`](#xdebug-on)

---

Expand Down Expand Up @@ -332,66 +332,66 @@ See [Advanced Configuration](ADVANCED.md) for instructions on customizing Nitro
## Commands
### `apply`
### `add`
Ensures that the machine exists, and applies any changes in its config file to it.
Adds a new site to the machine.
```shell script
nitro apply [<options>]
nitro add [<options>]
```
Options:
<dl>
<dt><code>-m</code>, <code>--machine</code></dt>
<dd>The name of the machine to use. Defaults to <code>nitro-dev</code>.</dd>
<dt><code>--hostname</code></dt>
<dd>The hostname to use for accessing the site. If not passed, the command will prompt for it.</dd>
<dt><code>--webroot</code></dt>
<dd>The relative path to the site’s webroot. If not passed, the command will prompt for it.</dd>
<dt><code>--skip-hosts</code></dt>
<dd>Skips updating the <code>hosts</code> file.</dd>
</dl>
Example:
```shell script
$ nitro apply
There are 2 mounted directories and 1 new mount(s) in the config file.
Applied changes from nitro.yaml.
$ cd /path/to/project
$ nitro add
Enter the hostname [plugins-dev] example.test
Enter the webroot [web]
Added plugins-dev to config file.
Apply changes from config? [yes]
Mounting /path/to/project to nitro-dev
Adding site example.test to nitro-dev
Applied changes from /Users/vin/.nitro/nitro-dev.yaml
Editing your hosts file
Password: ******
```
### `add`
### `apply`
Adds a new site to the machine.
Ensures that the machine exists, and applies any changes in its config file to it.
```shell script
nitro add [<options>]
nitro apply [<options>]
```
Options:
<dl>
<dt><code>-m</code>, <code>--machine</code></dt>
<dd>The name of the machine to use. Defaults to <code>nitro-dev</code>.</dd>
<dt><code>--hostname</code></dt>
<dd>The hostname to use for accessing the site. If not passed, the command will prompt for it.</dd>
<dt><code>--webroot</code></dt>
<dd>The relative path to the site’s webroot. If not passed, the command will prompt for it.</dd>
<dt><code>--skip-hosts</code></dt>
<dd>Skips updating the <code>hosts</code> file.</dd>
</dl>
Example:
```shell script
$ cd /path/to/project
$ nitro add
Enter the hostname [plugins-dev] example.test
Enter the webroot [web]
Added plugins-dev to config file.
Apply changes from config? [yes]
Mounting /path/to/project to nitro-dev
Adding site example.test to nitro-dev
Applied changes from /Users/vin/.nitro/nitro-dev.yaml
Editing your hosts file
Password: ******
$ nitro apply
There are 2 mounted directories and 1 new mount(s) in the config file.
Applied changes from nitro.yaml.
```
### `context`
Expand Down Expand Up @@ -850,21 +850,6 @@ Options:
<dd>The name of the machine to use. Defaults to <code>nitro-dev</code>.</dd>
</dl>
### `nginx`
Perform actions on machines Nginx installation. This command allows you to `start`, `stop`, `restart` nginx for the nitro machine.
```shell script
nitro nginx [<options>]
```
Options:
<dl>
<dt><code>-m</code>, <code>--machine</code></dt>
<dd>The name of the machine to use. Defaults to <code>nitro-dev</code>.</dd>
</dl>
### `nginx restart`
Restart nginx on nitro machine.
Expand Down Expand Up @@ -910,21 +895,6 @@ Options:
<dd>The name of the machine to use. Defaults to <code>nitro-dev</code>.</dd>
</dl>
### `php`
Perform actions on machines PHP installation. This command allows you to `start`, `stop`, `restart` the PHP-FPM for the nitro machine. There is also `iniset` to change PHP settings.
```shell script
nitro php [<options>]
```
Options:
<dl>
<dt><code>-m</code>, <code>--machine</code></dt>
<dd>The name of the machine to use. Defaults to <code>nitro-dev</code>.</dd>
</dl>
### `php iniset`
Change PHP ini settings from the command line. This command will prompt you for which setting to change, including e.g. `max_execution_time`,
Expand Down Expand Up @@ -1133,12 +1103,12 @@ Checks the currently version of nitro against the releases and shows any updated
nitro version
```
### `xdebug on`
### `xdebug off` / `xon`
Enables Xdebug, which is installed and disabled by default on each machine.
Disables Xdebug on a machine.
```shell script
nitro xdebug on [<options>]
nitro xoff [<options>]
```
Options:
Expand All @@ -1147,17 +1117,15 @@ Options:
<dt><code>-m</code>, <code>--machine</code></dt>
<dd>The name of the machine to use. Defaults to <code>nitro-dev</code>.</dd>
<dt><code>--php-version</code></dt>
<dd>The PHP version to enable Xdebug for</dd>
<dd>The PHP version to disable Xdebug for</dd>
</dl>
This ensures Xdebug is installed for PHP and enables it:
### `xdebug off`
### `xdebug on` / `xoff`
Disables Xdebug on a machine.
Enables Xdebug, which is installed and disabled by default on each machine.
```shell script
nitro xdebug off [<options>]
nitro xoff [<options>]
```
Options:
Expand All @@ -1166,5 +1134,7 @@ Options:
<dt><code>-m</code>, <code>--machine</code></dt>
<dd>The name of the machine to use. Defaults to <code>nitro-dev</code>.</dd>
<dt><code>--php-version</code></dt>
<dd>The PHP version to disable Xdebug for</dd>
<dd>The PHP version to enable Xdebug for</dd>
</dl>
This ensures Xdebug is installed for PHP and enables it:

0 comments on commit 4e69b8e

Please # to comment.