The Learn CLI is the command line interface for developing, previewing, and publishing curriculum on Learn.
The learn command is supported on Mac, Linux, and Windows.
The easiest installation is with Homebrew, which is for MacOS and Linux. Follow these directions to install Homebrew. Once installed, run these commands on your command line.
brew tap gSchool/learn
brew install learn
Use the command line utility curl
to download and install the latest version. The learn command will be placed in the /usr/local/bin
directory.
curl -sSL $(curl -sSL https://api.github.com/repos/gSchool/glearn-cli/releases/latest | grep -o "http.*$(uname -sm | sed 's/ /_/').tar.gz") | sudo tar -C /usr/local/bin -xzf - learn
Download binaries for all platforms directly from https://github.com/gSchool/glearn-cli/releases
Place the learn
executable in a location included in your PATH
so that it can be called from any directory.
After installation, you must set your API token. Copy your token from https://learn-2.galvanize.com/api_token and run this command, replacing YOUR_LEARN_API_TOKEN with your token.
learn set --api_token=YOUR_LEARN_API_TOKEN
Run the command
learn version
You should get a response like
v0.10.0
learn help
You can generate a sample piece of curriculum to begin a walkthrough of how to develop curriculum with Learn with
learn walkthrough
- Clone and edit curriculum
- Preview your changes. Run:
learn preview -o <directory|file>
- Git add / commit / push changes to any branch
- Publish changes as a new Block revision. Run:
learn publish
Follow the instructions in the upgrade document.
Homebrew: brew uninstall learn
Other installations: delete learn
executable
To contribute, look at the development instructions.