🌳Stateful Command Tree Monolith with Bonzai for the Silver Spring Black Box Theater.
- Google Cloud Account
- Google cloud OAuth credentials
- A
.env
file or sourced environment variables for the following: (See the.env.example
file)- CALENDAR_ID
- RESULTS_LOC
The blackbox tool looks for configuration in the following directories:
- Linux:
$XDG_CONFIG_DIR/blackbox
- Windows:
%APPDATA%\blackbox
- macOS:
$HOME/Library/blackbox
Create the directory if it doesn't exist, using your preferred method.
-
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 is the default if you aren't using a Google Workspaces account.
-
Navigate back to "Credentials"
-
Click "+ CREATE CREDENTIALS" > "+ OAuth client ID"
-
Select Application type: Desktop app
-
Name your application, e.g., "blackbox"
-
Download your credentials JSON as credentials.json
cp .env.example /path/to/your/config/directory/.env
Edit the .env
as needed
- Clone this repository using
git clone https://github.com/tr00datp00nar/blackbox.git
and from within that directory, run:
go install .
- Create the necessary configuration directory from above.
- Make sure that the configuration directory is populated with your
.env
andcredentials.json
files.
Download one of the release binaries (NOT RECOMMENDED):
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
go install github.com/tr00datp00nar/blackbox@latest
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.
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 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.
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.
Releases are built using the following commands:
blackbox go build
gh release create
gh release upload TAG build/*