5 <title>Drupal Console</title>
6 <link type="text/css" rel="stylesheet" href="{{ css_path }}">
9 <h1 class="title">Drupal Console</h1>
11 <h2>Getting the project</h2>
13 <p>There are different ways to get the project on your local machine. Our recommendation for getting the project on your
14 local machine is by using the installer.</p>
16 <h3 id="using-the-drupal-console-installer">Using the Drupal Console Installer</h3>
18 <p>You can install the Drupal Console locally by running the installer in your project
19 directory, the installer will take care of downloading the necesary files to run drupal console on you computer.
21 <h4 id="using-curl">Using curl:</h4>
22 <pre><code>$ curl https://drupalconsole.com/installer -L -o drupal.phar
24 <h4 id="or-if-you-dont-have-curl">Or if you don't have curl:</h4>
25 <pre><code>php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
27 <h4 id="you-can-now-execute-console-using">Example:</h4>
28 <pre><code>$ php console.phar generate:module
30 <p>You can place this file anywhere you wish. If you put it in your PATH, you can access it
31 globally. On unixy systems you can even make it executable and invoke it without php.
33 <h4 id="access-console-from-anywhere-on-your-system">Access console from anywhere on your system</h4>
34 <pre><code>$ mv console.phar /usr/local/bin/drupal
36 <h4 id="apply-executable-permissions-on-the-downloaded-file">Apply executable permissions on the downloaded file:</h4>
37 <pre><code>$ chmod +x /usr/local/bin/drupal
39 <h4 id="you-can-now-execute-console-using">You can now execute console using:</h4>
42 <p><strong>NOTE:</strong> The name <code>drupal</code> is just an alias you can name it
46 <h3 id="install-drupal-console-using-composer">Install Drupal Console Using Composer</h3>
48 <p>You can install this project using composer.
50 <div class="comments-icon">
51 <div class="marker">+</div>
54 <h4 id="install-drupal-console-globally-using-composer">Install Drupal Console globally using composer:</h4>
55 <pre><code>$ composer global require drupal/console:@stable
57 <h4 id="add-the-binary-directory-to-your-class-path">Add the binary directory to your class path:</h4>
58 <pre><code>$ echo "PATH=$PATH:~/.composer/vendor/bin" >> ~/.bash_profile
60 <h4 id="you-can-now-execute-console-using">You can now execute console using:</h4>
61 <pre><code>$ console generate:module
63 <h3 id="download-phar-file">Download phar file</h3>
65 <p>You can download the latest version of Console from the repository releases page at:</p>
67 <p><a href="https://github.com/hechoendrupal/DrupalConsole" target="_blank">https://github.com/hechoendrupal/DrupalConsole</a>
70 <p>Make sure you download the console.phar file from the most current release.</p>
72 <h3 id="update-project">Update project</h3>
74 <p>Drupal 8 is under heavy development, to keep in sync with the latest changes. The easiest and recommended way of
75 updating Drupal Console is using the self-update command.
77 <h4 id="depending-on-the-installation-method">Depending on the installation method:</h4>
78 <h5 id="installed-globally-and-renamed-to-drupal">Installed globally (and renamed to "drupal"):</h5>
79 <pre><code>$ drupal self-update
81 <h5 id="installed-globally-using-composer">Installed globally (using composer):</h5>
82 <pre><code>$ composer global update drupal/console:@stable
84 <h5 id="installed-locally-running-from-directory-where-the-consolephar-has-been-downloaded">Installed locally (running
85 from directory where the console.phar has been downloaded):</h5>
86 <pre><code>$ php console.phar self-update
88 <h2>Available Drupal Console Commands</h2>
89 <p><strong>Note: Drupal Console commands *must* be run from the root of a Drupal 8 installation.</strong></p>
93 <th>Drupal Console Command</th>
98 {% for namespace, commands in command_list %}
99 {% if namespace != 'none' %}
101 <td><strong>{{ namespace }}</strong></td>
105 {% for command in commands %}
107 <td><a href="commands/{{ command.name|replace(':','-') }}.html">{{ command.name }}</a></td>
108 <td>{{ command.description }}</td>
114 {% if options|length>0 %}
115 <h2>Available options</h2>
124 {% for option in options %}
125 <tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
126 <td>{{ option.name }}</td>
127 <td>{{ option.description }}</td>
133 {% if arguments|length>0 %}
134 <h2>Available arguments</h2>
143 {% for argument in arguments %}
144 <tr class="{{ cycle(['odd', 'even'], loop.index0) }}">
145 <td>{{ argument.name }}</td>
146 <td>{{ argument.description }}</td>