# Leaf CLI
Leaf CLI 2 has just been released. Check out the docs here
A simple command line tool for creating and interacting with your leaf projects. You can do stuff like installing packages, interacting with your app, previewing your app...
You can take a look at our leaf cli setup walkthrough on youtube.
You can get this tool up and running on your system using composer:
composer global require leafs/cli
Make sure to place Composer's system-wide vendor bin directory in your
$PATH so the leaf executable can be located by your system. This directory exists in different locations based on your operating system; however, some common locations include:
- GNU / Linux Distributions:
You could also find the composer's global installation path by running
composer global about and looking up from the first line.
Eg (Adding composer bin to path linux):
Eg (Adding composer bin to path mac):
export PATH=$PATH:$HOME/.composer/vendor/bin echo $PATH
To get leaf cli installed permanently, you will need to add your composer bin your
.zshrc file on mac and linux.
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.zshrc source ~/.zshrc
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc source ~/.bashrc