Blackbox
🌳Stateful Command Tree Monolith with Bonzai for the Silver Spring Black Box Theater.
Prerequisites
- Google Cloud Account
- Google cloud OAuth credentials
- A
.env file or sourced environment variables for the following:
(See the .env.example file)
Creating Google Cloud Oauth Credentials
- Log in to the Google Cloud Console
- Create a new project and navigate to it
- Go to "APIs & Services"
- Click "+ Enable APIs & Services"
- Search for
Google Calendar API and select and enable it
- Navigate to "Credentials"
- Click "+ CREATE CREDENTIALS" > "+ OAuth client ID"
- Configure the OAuth Consent Screen > External
- Navigate back to "Credentials"
- Click "+ CREATE CREDENTIALS" > "+ OAuth client ID"
- Application type: Desktop app
- Name your application, e.g., "blackbox"
- Download JSON as credentials.json
Creating your .env file
Rename the .env.example file as .env and replace the necessary values. The format is KEY=VALUE.
Installation
curl -L https://github.com/tr00datp00nar/blackbox/releases/latest/download/blackbox-linux-amd64 -o ~/.local/bin/tr00datp00nar
curl -L https://github.com/tr00datp00nar/blackbox/releases/latest/download/blackbox-darwin-amd64 -o ~/.local/bin/tr00datp00nar
curl -L https://github.com/tr00datp00nar/blackbox/releases/latest/download/blackbox-darwin-arm64 -o ~/.local/bin/tr00datp00nar
curl -L https://github.com/tr00datp00nar/blackbox/releases/latest/download/blackbox-windows-amd64 -o ~/.local/bin/tr00datp00nar
- Install directly with
go:
go install github.com/tr00datp00nar/blackbox@latest
Tab Completion in Bash
To activate bash completion just use the complete -C option from your .bashrc or command line. There is no messy sourcing required. All the completion is done by the program itself.
complete -C blackbox blackbox
If you don't have bash or tab completion check out the shortcut commands instead.
Tab Completion in Zsh
Zsh does a good job of learning your commands over time all by itself, but some of the custom completions may not work as well. Personally, I use the Oh-My-Zsh option below, but the creator of Bonzai and the original Z command tree (rwxrob) prefers the default Linux shell (Bash) over the default Mac shell (Zsh). (PRs to rwxrob's repository are welcome to integrate completion into Zsh without dumping a ton of shell code that has to be sourced.)
Oh-My-Zsh
Oh-My-Zsh has an available plugin called zsh-bash-completions-fallback. This plugin allows zsh to fallback to bash completions when it can't find the appropriate completions itself.
Once installed, you can use the same complete -C blackbox blackbox as you normally would in bash.
Embedded Documentation
All documentation (like manual pages) has been embedded into the source code of the application. See the source or run the program with help to access it.
Building
Releases are built using the following commands:
blackbox go build
gh release create
gh release upload TAG build/*