Generate a BOFH Excuse for github-cli from the command line as a gh extension.
| Stable | Beta | Nightly | MSRV (1.85.1) | |
|---|---|---|---|---|
| Linux | ||||
| Windows | ||||
| macos |
Install and run the gh extension in a few seconds.
From source (recommended for contributors):
cargo install gh-bofhInstall from a release (download the release archive and then):
gh extension install <path-to-release>Install directly from GitHub via the GitHub CLI:
gh extension install AliSajid/gh-bofhRun it:
gh bofhIf you aren't using the gh wrapper, the binary can also be invoked directly after building with cargo run --bin gh-bofh.
This project provides a tiny CLI that prints a random "BOFH" (Bastard Operator From Hell) style excuse. It ships two flavors:
- classic — 90s era, old-school excuses
- modern — up-to-date, contemporary-themed excuses
The main use-case is as a fun gh extension, but the binary is standalone and suitable for piping into other tools.
Basic usage:
gh bofhFlags and environment variables:
- -t, --type
- Choose the excuse type. Allowed values:
classic,modern. Default:classic. - Can be set via the
EXCUSE_TYPEenvironment variable (e.g.EXCUSE_TYPE=modern).
- Choose the excuse type. Allowed values:
- -c, --classic
- Short flag to request a classic excuse.
- -m, --modern
- Short flag to request a modern excuse.
Behavior notes:
- Short flags (
-c/-m) take precedence over the--typevalue. - If neither flag nor env var is provided, the default is
classic.
Examples:
# print a classic excuse (default)
gh bofh
# print a modern excuse
gh bofh --type modern
gh bofh --modern
# set via environment
EXCUSE_TYPE=modern gh bofhThis repository is designed to work as a gh extension. After installation with gh extension install, the command is available as gh bofh.
If you plan to publish your own fork or distribute a release archive, include the compiled binary named gh-bofh in the top-level of the release archive so gh extension install can detect it.
The project is a Cargo workspace with the main binary in src/gh_bofh and a library crate gh_bofh_lib.
Build the project locally:
# build the workspace in release mode
cargo build --release
# run the binary directly
cargo run --bin gh-bofh --release -- --helpRun tests:
cargo testFormatting and linting:
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warningsRelease checklist (maintainers):
- Bump version in
Cargo.toml. - Run tests and CI locally (where possible).
- Build release artifacts for target platforms.
- Create a GitHub release and attach archives containing the
gh-bofhbinary.
Contributions are welcome. See CONTRIBUTING.md for the contribution process, coding conventions, commit message guidelines, and how to add new excuses.
If you're adding excuses, prefer the pattern used in src/gh_bofh_lib/excuses.rs and add unit tests to tests/ that exercise any parsing or selection logic.
- If
ghdoesn't detect the extension after installing a release archive: ensure the archive has the binarygh-bofhat its root and that the binary is executable. - If
cargo install gh-bofhfails: ensure you have a compatible Rust toolchain installed (see project MSRV in the builds matrix). You can userustupto install the required toolchain.
High level architecture and design notes: ARCHITECTURE.md
Security requirements and expectations: SECURITY_REQUIREMENTS.md
Security assurance artifacts: SECURITY_ASSURANCE.md
For contributor-facing policies and code of conduct, see CONTRIBUTING.md and CODE_OF_CONDUCT.md.
Open issues at: https://github.com/AliSajid/gh-bofh/issues
When filing a bug report include:
- The command you ran and the output.
- Your OS and Rust version (if building from source).
- Any relevant backtrace or panic output.
This project is dual-licensed under the MIT and Apache 2.0 licenses.
- Project home: https://github.com/AliSajid/gh-bofh
- Releases: https://github.com/AliSajid/gh-bofh/releases
Enjoy responsibly — it's intended for harmless fun.