Help us shape the future of Go! Take the 2026 Go Developer Survey

ghtoken

command
v0.2.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 5 Imported by: 0

README

ghtoken

Mints a GitHub App installation token from ephemerd's config and prints it to stdout.

Build

go build -o ghtoken ./cmd/ghtoken

Usage

# Uses /var/lib/ephemerd/config.toml by default
export GH_TOKEN=$(./ghtoken)

# Or point at a different config
export EPHEMERD_CONFIG=/path/to/config.toml
export GH_TOKEN=$(./ghtoken)

# Then use with gh CLI
gh workflow run test-arm64-smoke.yml
gh api repos/ephpm/ephemerd/actions/runs --jq '.workflow_runs[:3] | .[].status'

Requirements

The config file must have GitHub App auth configured:

[github]
app_id = 123456
installation_id = 789012
private_key_path = "~/.ssh/your-app.pem"

PAT-based auth (github.token) won't work — this tool specifically mints short-lived installation tokens from the App private key.

Documentation

Overview

Command ghtoken mints a GitHub App installation token from ephemerd's config and prints it to stdout. Useful for ad-hoc API calls (e.g. triggering workflow_dispatch) on machines where `gh auth login` isn't practical.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL