Skip to main content

Crate github_app_cli

Crate github_app_cli 

Source
Expand description

github-app-cli — mint GitHub App installation access tokens (and list installations) so automation can act under a GitHub App bot identity.

The binary implements the workspace output contract (docs/specs/cli-output-contract-v1.md): --format text|json, a versioned nils_common::cli_contract::Envelope, and BSD sysexits exit codes. In text mode the token command writes the raw token to stdout (for GH_TOKEN=$(github-app-cli token ...)); JSON mode never emits the raw token.

Modules§

cli
Clap command model — the single source of truth for parsing and completion.
commands
Subcommand payloads (the structured data behind text / JSON rendering).
completion
Shell completion generation (clap-first).
error
Command-level errors mapped to the workspace exit-code contract.
github
Minimal GitHub REST client for App auth: list installations and mint installation access tokens. All calls are blocking and authenticated with a short-lived App JWT (see crate::jwt).
jwt
GitHub App JWT minting (RS256).

Constants§

BINARY
Binary name, used to build schema_version strings for JSON envelopes.

Functions§

now_unix
Current Unix time in seconds (saturating at 0 if the clock predates the epoch). Isolated here so JWT minting stays testable with a fixed clock.