Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

AliSajid/gh-bofh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

A gh plugin to generate BOFH excuses

GitHub release (latest by date) GitHub tag (latest SemVer) Crates.io Version Crates.io Size Maintenance OSS Lifecycle

Continuous integration codecov Security Audit GitHub issues

Crates.io License REUSE Compliance OpenSSF Best Practices OpenSSF Scorecard

Libraries.io SourceRank

Generate a BOFH Excuse for github-cli from the command line as a gh extension.

Builds

Stable Beta Nightly MSRV (1.85.1)
Linux Ubuntu x Stable Rust Ubuntu x Beta Rust Ubuntu x Nightly Rust Ubuntu x MSRV Rust
Windows Windows x Stable Rust Windows x Beta Rust Windows x Nightly Rust Windows x MSRV Rust
macos macos x Stable Rust macos x Beta Rust macos x Nightly Rust macos x MSRV Rust

Quick start

Install and run the gh extension in a few seconds.

From source (recommended for contributors):

cargo install gh-bofh

Install 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-bofh

Run it:

gh bofh

If you aren't using the gh wrapper, the binary can also be invoked directly after building with cargo run --bin gh-bofh.

What it does

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.

Usage and options

Basic usage:

gh bofh

Flags and environment variables:

  • -t, --type
    • Choose the excuse type. Allowed values: classic, modern. Default: classic.
    • Can be set via the EXCUSE_TYPE environment variable (e.g. EXCUSE_TYPE=modern).
  • -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 --type value.
  • 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 bofh

Integration with the GitHub CLI

This 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.

Development

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 -- --help

Run tests:

cargo test

Formatting and linting:

cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings

Release checklist (maintainers):

  1. Bump version in Cargo.toml.
  2. Run tests and CI locally (where possible).
  3. Build release artifacts for target platforms.
  4. Create a GitHub release and attach archives containing the gh-bofh binary.

Contributing

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.

Troubleshooting

  • If gh doesn't detect the extension after installing a release archive: ensure the archive has the binary gh-bofh at its root and that the binary is executable.
  • If cargo install gh-bofh fails: ensure you have a compatible Rust toolchain installed (see project MSRV in the builds matrix). You can use rustup to install the required toolchain.

Detailed documentation

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.

Reporting issues

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.

License

This project is dual-licensed under the MIT and Apache 2.0 licenses.

Acknowledgements and links

Enjoy responsibly — it's intended for harmless fun.

About

Generate a BOFH Excuse for github-cli from the commandline as a gh extension.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •