Bunnyshell CLI and Public API
Introduction
Bunnyshell's CLI tool helps you achieve your most common tasks and makes it simple to integrate our platform in your existing flows, such as pipelines, deployment scripts, testing scripts etc. or when you use remote development.
From the CLI tool, you can see and control your Environments:
Clone an Environment
Start/stop an Environment
Deploy an Environment
See the events for an Environment
Delete an Environment
Get the Bunnyshell CLI tool
Install using Homebrew
brew install bunnyshellosi/tap/cli
Download from Github Releases
Download the appropriate archive for your architecture on the releases page.
Run in a Docker image
You can also choose to execute it using our provided Docker image:
docker run --volume ~/.bunnyshell:/root/.bunnyshell bunnyshell/cli environments list
Authentication
You will need your access token, which you can obtain by accessing the URL https://environments.bunnyshell.com/access-token.
Using the access token, you can setup a CLI profile for easy access to your account using the commands listed below:
Create the config file:
bunnyshell-cli configure init
Set up the profile:
bunnyshell-cli configure profiles add
Pro tip: You can use the profiles to nail down specific environments also, not just organizations.
Shell Autocomplete
Use the command bunnyshell-cli completion SHELL
to generate autocomplete for your current shell.
ZSH
echo 'source <(bunnyshell-cli completion zsh)' >> ~/.zshrc
echo 'compdef _bunnyshell-cli bunnyshell-cli' >> ~/.zshrc
Bash
echo 'source <(bunnyshell-cli completion bash)' >> ~/.bashrc
Using the Bunnyshell CLI
When typing a command in the Bunnyshell CLI, use the following format:
bunnyshell-cli [command]
Available Commands
completion
: Generate the autocompletion script for the specified shellcomponents
: Bunnyshell Componentsconfigure
: Configure CLI settingsenvironments
: Bunnyshell Environmentsevents
: Bunnyshell Events help Help about any commandorganizations
: Bunnyshell Organizationsprojects
: Bunnyshell Projectsversion
: Version Information
Flags
-c, --configFile string Config file
-d, --debug Show network debug
--feedback Add feedback final output
-h, --help help for bunnyshell-cli
--no-progress Disable progress spinners
-o, --output string Output format: stylish | json | yaml (default "stylish")
-p, --profile string Force profile usage from config file
-t, --timeout duration Network timeout on requests (default 30s)
-v, --verbose count Number for the log level verbosity
Public API
You can find the documentation for the Bunnyshell Public API here.
Last updated
Was this helpful?