The Pantheon Command Line Interface is a successor to the "Terminus" project, which provides access to the Pantheon Platform via Drush. While Terminus has provided great value (and we're going to keep the name in the product,) we felt that it was important to have a first-class standalone CLI toolkit:
- That we could distribute as an independent executable.
- Which could "wrap" other commands that run on the platform.
If you would like to contribute, pull requests are welcome!
Requirements:
Once you have at least the requirements installed, you can install Terminus via Composer, cURL, or Git. Additionally, you may want to install the optional software below to enhance your use of Terminus:
Optional but recommended:
- Drush (Useful to run incompatible-with-Terminus Drush commands)
- WP-CLI (Useful to run incompatible-with-Terminus WP-CLI commands)
- Composer
- Git
####Installing with Composer
The fastest and easiest way to install Terminus is via Composer. Simply run this in your terminal client:
composer require pantheon-systems/cli
####Installing with cURL
Run this in this in your terminal client:
curl https://github.com/pantheon-systems/cli/releases/download/0.9.3/terminus.phar -L -o /usr/local/bin/terminus && chmod +x /usr/local/bin/terminus
####Installing with Git To install with Git and use Terminus HEAD, you should clone this repository and run Terminus directly. If you would like to contribute to the Terminus source, this is the way you should install it. You will require Composer for this installation.
- Clone the repository. If you plan on contributing to the project, create a fork and clone the fork instead.
cd $HOME
git clone https://github.com/pantheon-systems/cli.git pantheon-cli
Or replace $HOME with the directory to which you would like to install.
- Install the Composer dependencies.
cd pantheon-cli
composer install
You can now run the bleeding-edge version of Terminus via:
bin/terminus
Optionally, for ease of development, we suggest aliasing or setting the path to this script in your Bash configuration file. This file is located at ~/.bashrc on Linux and ~/.bash_profile on Mac.
alias terminus="$HOME/pantheon-cli/bin/terminus"
or
export PATH="$PATH:$HOME/pantheon-cli/bin"
Once you source the file or restart your terminal client, you can now make use of Terminus using
terminus
To get started with Terminus, you must first authenticate:
terminus auth login
Your email address?: [email protected]
Your dashboard password (input will not be shown)
[1969-07-20 20:18:00] [info] Logging in as [email protected]
[1969-07-21 02:56:00] [info] Saving session data
Terminus also comes with a tab completion script for Bash. Just download terminus-completion.bash and source it from ~/.bash_profile
:
source /FULL/PATH/TO/terminus-completion.bash
(Don’t forget to run source ~/.bash_profile
afterwards)
Please make ready the steps to reproduce the issue, outputs, pertinent information about your system, and what you believe the correct reaction of the system ought to be. Reporting of issues encountered should happen in one of two ways:
If yours is a problem with Terminus itself:
- Search Terminus' issues on GitHub to see whether another user has reported the same issue you are experiencing.
- If the problem you are experiencing is not in the issues, you can open a new issue. Please include the helpful information you have gathered.
- If you find your problem in an issue, feel free to add your issue information in the comments and/or subscribe to the issue's notifications.
If the problem is with the Pantheon platform:
Head over to your support tickets in the Pantheon Dashboard and submit a new issue ticket. Please include the helpful information you have gathered.
Here are steps to follow if you would like to contribute to Terminus:
- Fork the repository.
- Add your changes. Please add tests as necessary. You can check your syntax for coherence to our standards by running
cd $HOME/pantheon-cli
./scripts/lint.sh
And run your tests via:
cd $HOME/pantheon-cli
./scripts/test.sh
Please also run the internal documentation generator before committing your changes. This keeps the documentation always up-to-date:
cd $HOME/pantheon-cli
php utils/make-docs.php
- Open a pull request on GitHub so that we may evaluate and merge your changes.