Skip to content

Instantly share code, notes, and snippets.

@osteel
Created February 12, 2022 15:49
Show Gist options
  • Save osteel/e32b81b2063eb847a097e110c5433b0f to your computer and use it in GitHub Desktop.
Save osteel/e32b81b2063eb847a097e110c5433b0f to your computer and use it in GitHub Desktop.

PHP CLI Demo

PHP command-line tool demonstration

Preview

Build Status Latest Stable Version License

Instal

This CLI application is a small game written in PHP and is installed using Composer:

composer global require osteel/php-cli-demo

Make sure the ~/.composer/vendor/bin directory is in your system's PATH.

Show me how

If it's not already there, add the following line to your Bash configuration file (usually ~/.bash_profile, ~/.bashrc, ~/.zshrc, etc.):

export PATH=~/.composer/vendor/bin:$PATH

If the file doesn't exist, create it.

Run the following command on the file you've just updated for the change to take effect:

source ~/.bash_profile

Use

All you need to do is call the play command to start the game:

demo play

Update

composer global update osteel/php-cli-demo

Delete

composer global remove osteel/php-cli-demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment