pantheon-systems / terminus-plugin-example
An example Terminus command
Installs: 4 281
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 46
Forks: 8
Open Issues: 4
Type:terminus-plugin
Requires (Dev)
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ^3.6
- symfony/yaml: ^5
This package is auto-updated.
Last update: 2024-11-11 13:28:44 UTC
README
A simple plugin for Terminus-CLI to demonstrate how to add new commands.
Adds commands 'hello' and 'auth:hello' to Terminus. Learn more about Terminus Plugins in the Terminus Plugins documentation
Configuration
These commands require no configuration
Usage
terminus hello
terminus auth:hello
Installation
To install this plugin using Terminus 3:
terminus self:plugin:install terminus-plugin-example
On older versions of Terminus:
mkdir -p ~/.terminus/plugins
curl https://github.com/pantheon-systems/terminus-plugin-example/archive/2.x.tar.gz -L | tar -C ~/.terminus/plugins -xvz
Testing
This example project includes four testing targets:
composer lint
: Syntax-check all php source files.composer cs
: Code-style check.composer unit
: Run unit tests with phpunitcomposer functional
: Run functional test with bats
To run all tests together, use composer test
.
Note that prior to running the tests, you should first run:
composer install
composer install-tools
Help
Run terminus help auth:hello
for help.