| description | The Nails command line tool is a useful utility to make working with Nails applications and the console module easy and intuitive. |
|---|
The Nails Command Line Tool is the easiest way to manage basic, repetitive aspects of a Nails Application.
Installation of the tool is officially supported via the following methods.
brew tap nails/utilities
brew install nailscomposer global require nails/command-line-tool{% hint style="warning" %}
In order to function properly your $PATH must be set correctly to include the relevant Composer binary directories.
If you are getting errors such saying nails cannot be found make sure your $PATH contains ~/.composer/vendor/bin by executing the following:
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrcYou should then logout and login again or execute:
source ~/.bashrcSubstitute .bashrc with your shell's appropriate config file if it is different.
{% endhint %}
If you wish to install the tool manually then you may do so by installing the binaries from the ./dist directory of the GitHub repository.
The nails tool acts both as a standalone application to make creating Nails sites easier, as well as a proxy for the bundled console module (if installed).
nails new:project
Creates a new Nails project in the current directory using the Docker skeleton.
Creating a new Nails Module
nails new:moduleThis creates a new Nails module for distribution via Composer. Read more about building modules for Nails.
The tool is built using the Symfony Console component, execute nails --help for further information, or to see additional commands available.
If nails is called in a directory which contains a Nails application then it will proxy the app's console module (if installed).