In addition to our web app, Rainforest can be accessed via one's Command Line Interface (CLI). The main benefits of the Rainforest CLI are:
- Unlocks a new workflow for developers to access and interact with Rainforest without going to the UI
- With a simple script, users can hook Rainforest into any Continuous Integration (CI) tool to kick off Rainforest as part of your release process (Rainforest CLI for Continuous Integration).
- Anyone from your team can use the CLI to kick off specific test suite runs without needing to go into the Rainforest app (learn more below)
If you're interested in learning how your development team can leverage the Rainforest CLI, please contact support or your CSM and we'll assist you.
If you use homebrew, then you can simply run:
brew install rainforestapp/public/rainforest-cli
If you don't use homebrew, then you can download and install the cli binary directly.
curl -O https://bin.equinox.io/c/htRtQZagtfg/rainforest-cli-stable-darwin-amd64.zip unzip rainforest-cli-stable-darwin-amd64.zip -d /usr/local/bin
Download the zipped binary for your system here:
You can download and install the binary directly here:
curl -O https://bin.equinox.io/c/htRtQZagtfg/rainforest-cli-stable-linux-amd64.tgz tar -xzf rainforest-cli-stable-linux-amd64.tgz mv rainforest /usr/local/bin chmod +x /usr/local/bin/rainforest rm rainforest-cli-stable-linux-amd64.tgz
Once you have it installed, the Rainforest CLI allows you to:
- Start and monitor runs without going to the UI
- List various things from your account
- Create, edit, download, and upload Rainforest tests (Developer Experience)
For detailed usage instructions see our GitHub page.
Let's run a test from the CLI to see how fast and easy it is. Follow these directions after installing the CLI:
1.Retrieve your API token. In your Rainforest account, go to the Integrations page under Settings. Write down and copy your API token. This token is unique to each user in your team’s account.
- Run a test from your CLI. Go to your CLI terminal and try the following basic command where you’ll replace 123456 with one of your tests’ IDs (the number next to any test title in the web app) and xyz with your API token.
rainforest run 123456 --token xyz
Voilà! You ran your first test from the CLI. You can see the result in the UI as well! To perform other commands, check out the CLI documentation on our GitHub page or type in rainforest help into the CLI.
If you have any questions, please feel free to reach out to us at [email protected] or through Intercom!
Updated 3 months ago