# Leaf CLI

Latest Stable Version Total Downloads

TIP

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...

# Installation

Video Docs

You can take a look at our leaf cli setup walkthrough on youtube.

Watch the leaf 3 installation walkthrough

You can get this tool up and running on your system using composer:

composer global require leafs/cli
1

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:

  • Windows: %USERPROFILE%\AppData\Roaming\Composer\vendor\bin
  • macOS: $HOME/.composer/vendor/bin
  • GNU / Linux Distributions: $HOME/.config/composer/vendor/bin or $HOME/.composer/vendor/bin

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):

export PATH=$PATH:$HOME/.config/composer/vendor/bin
1

Eg (Adding composer bin to path mac):

export PATH=$PATH:$HOME/.composer/vendor/bin
echo $PATH
1
2

NOTE

To get leaf cli installed permanently, you will need to add your composer bin your .bashrc or .zshrc file on mac and linux.

zsh:

echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.zshrc
source ~/.zshrc
1
2

bash:

echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc
source ~/.bashrc
1
2

# Versions