Skip to content

feat: tok mint — generate GitHub App installation tokens locally#480

Merged
Data-Wise merged 1 commit into
devfrom
feature/tok-mint
Jun 29, 2026
Merged

feat: tok mint — generate GitHub App installation tokens locally#480
Data-Wise merged 1 commit into
devfrom
feature/tok-mint

Conversation

@Data-Wise

Copy link
Copy Markdown
Owner

Summary

Adds tok mint — generate short-lived ghs_ GitHub App installation tokens from Keychain-stored credentials. Closes #479.

Changes

Core (lib/dispatchers/tok-dispatcher.zsh)

  • tok mint — reads github_app_id + github_app_private_key from Keychain, builds RS256 JWT, resolves org installation, exchanges for ghs_ token
    • --org ORG — target org (default: Data-Wise)
    • --dry-run — decode JWT without exchanging
    • --verbose / -v — print token preview + expiration
  • tok mint setup — interactive wizard: prompt for App ID + PEM path, validate via GET /app, store in Keychain
  • _tok_mint_jwt() — RS256 JWT signing via openssl dgst -sha256 -sign

Docs & Help

  • docs/help/QUICK-REFERENCE.md — mint section
  • docs/reference/MASTER-DISPATCHER-GUIDE.md — GitHub App Token Minting section
  • docs/reference/REFCARD-TOKEN-SECRETS.md — mint command + quick workflow
  • docs/guides/TOKEN-COOKBOOK.md — Recipe 11
  • docs/guides/TOKEN-MANAGEMENT-COMPLETE.md — Section 2.3
  • docs/CHANGELOG.md — unreleased entry
  • man/man1/tok.1 — full man page sections

Testing

zsh tests/test-tok.zsh    # 14/14 pass
mkdocs build              # 0 warnings

Adds tok mint subcommand to generate short-lived ghs_ tokens from a
GitHub App stored in Keychain. Includes:

- _tok_mint(): main function with --org, --dry-run, --verbose flags
- _tok_mint_jwt(): RS256 JWT signing via openssl dgst -sha256 -sign
- _tok_mint_setup(): interactive wizard for Keychain credential storage
- Help text, man page, completions, and full documentation
- All 14 existing tok tests continue to pass

Closes #479
@Data-Wise Data-Wise merged commit c94879c into dev Jun 29, 2026
2 checks passed
@Data-Wise Data-Wise deleted the feature/tok-mint branch June 30, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant