Skip to content

Latest commit

 

History

History
78 lines (49 loc) · 2.27 KB

File metadata and controls

78 lines (49 loc) · 2.27 KB
description The Nails command line tool is a useful utility to make working with Nails applications and the console module easy and intuitive.

Command Line Tool

The Nails Command Line Tool is the easiest way to manage basic, repetitive aspects of a Nails Application.

Installation

Installation of the tool is officially supported via the following methods.

brew tap nails/utilities
brew install nails
composer 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"' >> ~/.bashrc

You should then logout and login again or execute:

source ~/.bashrc

Substitute .bashrc with your shell's appropriate config file if it is different. {% endhint %}

Manual

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.

Usage

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).

Standalone

Creating a new Nails project

nails new:project

Creates a new Nails project in the current directory using the Docker skeleton.

Creating a new Nails Module

nails new:module

This creates a new Nails module for distribution via Composer. Read more about building modules for Nails.

Further reading

The tool is built using the Symfony Console component, execute nails --help for further information, or to see additional commands available.

Proxy

If nails is called in a directory which contains a Nails application then it will proxy the app's console module (if installed).