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

You can also start Remote Development for an environment using the CLI.

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

You can also build your own CLI tool from the following source: https://github.com/bunnyshellosi/cli.

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

You can have multiple profiles, for different users or different organizations (and same user).

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 shell

  • components: Bunnyshell Components

  • configure: Configure CLI settings

  • environments: Bunnyshell Environments

  • events: Bunnyshell Events help Help about any command

  • organizations: Bunnyshell Organizations

  • projects: Bunnyshell Projects

  • version: 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

Use bunnyshell-cli [command] --help for more information about a particular command.

Public API

You can find the documentation for the Bunnyshell Public API here.

The official GO SDK for the Bunnyshell API is available here: https://github.com/bunnyshellosi/go-sdk.

Last updated

Was this helpful?