Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bunnyshell/cli
The official command line interface for the Bunnyshell API.
https://github.com/bunnyshell/cli
bunnyshell cli eaas ephemeral remote-development
Last synced: 12 days ago
JSON representation
The official command line interface for the Bunnyshell API.
- Host: GitHub
- URL: https://github.com/bunnyshell/cli
- Owner: bunnyshell
- License: mit
- Created: 2022-08-16T13:34:47.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T12:12:27.000Z (6 months ago)
- Last Synced: 2024-05-22T13:34:16.846Z (6 months ago)
- Topics: bunnyshell, cli, eaas, ephemeral, remote-development
- Language: Go
- Homepage: https://environments.bunnyshell.com
- Size: 690 KB
- Stars: 12
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
```
Bunnyshell CLI helps you manage environments in Bunnyshell and enable Remote Development.Usage:
bns [command]Commands for Bunnyshell Resources:
components Components
environments Environments
events Events
k8s-clusters Kubernetes Cluster Integrations
organizations Organizations
pipeline Pipeline
projects Projects
variables Environment VariablesCommands for Utilities:
git Git Operations
port-forward Port Forward
remote-development Remote DevelopmentCommands for CLI:
completion Generate the autocompletion script for the specified shell
configure Configure CLI settings
help Help about any command
version Version InformationFlags:
--configFile string Bunnyshell CLI Config File (default "$HOME/.bunnyshell/config.yaml")
-d, --debug Debug network requests
-h, --help Help for bns
--no-progress Disable progress spinners
--non-interactive Disable interactive terminal
-o, --output string Output format: stylish | json | yaml (default "stylish")
--profile string Use profile from config file
-v, --verbose count Increase log verbosity
--version version for bnsUse "bns [command] --help" for more information about a command.
```- [Installing](#installing)
- [Generic Installer](#generic-installer)
- [Homebrew](#homebrew)
- [Downloading a Release from GitHub](#download-github-release)
- [Docker Hub](#docker-hub)
- [Authentication](#authentication)
- [Profiles](#profiles)
- [Shell Autocomplete](#shell-autocomplete)## Installing
### Generic Installer
```sh
installer=$(curl --silent https://raw.githubusercontent.com/bunnyshell/cli/master/installer.sh) \
&& [ "33cdd268adb1e26511b0cc90c9f4bf017bb145041677ca52d23a0f93cd13bd58 *stdin" = "$(echo -n "${installer}" | openssl dgst -sha256 -r)" ] \
&& (
sh -c "${installer}" || :
) \
|| echo "Checksum did not match $(echo -n "${installer}" | openssl dgst -sha256 -r)" \
;
```| Env Var | DEFAULT | Description |
| --------------- | -------- | ------------------------- |
| DEBUG_INSTALLER | false | Add set -x for the script |
| PREFER_BREW | false | Allow brew installation |
| INSTALL_PATH | . | Install path for binary |
| SUDO_INSTALL | false | Use sudo when moving binary to INSTALL_PATH |Examples:
```sh
installer=$(curl --silent https://raw.githubusercontent.com/bunnyshell/cli/master/installer.sh) \
&& [ "33cdd268adb1e26511b0cc90c9f4bf017bb145041677ca52d23a0f93cd13bd58 *stdin" = "$(echo -n "${installer}" | openssl dgst -sha256 -r)" ] \
&& (
SUDO_INSTALL=true INSTALL_PATH=/usr/local/bin sh -c "${installer}" || :
) \
|| echo "Checksum did not match $(echo -n "${installer}" | openssl dgst -sha256 -r)" \
;
```### Homebrew
```sh
brew install bunnyshell/tap/bunnyshell-cli
```### Download Github Release
Download the appropriate archive for your architecture on the [releases page](https://github.com/bunnyshell/cli/releases)
And make it available in your `$PATH` or move the binary to `/usr/local/bin`
### Docker Hub
All the releases are found on: https://hub.docker.com/r/bunnyshell/cli```sh
docker run --volume ~/.bunnyshell:/root/.bunnyshell bunnyshell/cli environments list
```## Authentication
You will need an access token from https://environments.bunnyshell.com/access-tokenYou can then setup a profile for easy access to your acccount with:
```sh
bns configure profiles add
```## Shell Autocomplete
Using `bns completion SHELL` you can generate autocomplete for your current shell.### ZSH
```sh
echo 'source <(bns completion zsh)' >> ~/.zshrc
echo 'compdef _bns bns' >> ~/.zshrc
```### Bash
```sh
echo 'source <(bns completion bash)' >> ~/.bashrc
```