github-rest-cli authenticates to the GitHub REST API with a personal access token (PAT).
Create a GitHub personal access token.
| Scope | Used for |
|---|---|
repo |
Private repos, create/delete, environments, Dependabot settings |
public_repo |
Public repositories only (subset of repo) |
delete_repo |
Deleting repositories (included in full repo on classic tokens) |
Fine-grained tokens need repository access with permissions for Contents, Administration (create/delete), Environments, and Dependabot/security alerts as needed.
export GITHUB_AUTH_TOKEN="<github-auth-token>"You can also set AUTH_TOKEN in .secrets.toml (gitignored). See Configuration for settings.toml / .secrets.toml layout and Dynaconf environments.
# .secrets.toml
[default]
AUTH_TOKEN = "ghp_your_token_here"Never commit tokens. Prefer .secrets.toml or the environment variable.
github-rest-cli --version
github-rest-cli repo listIf the token is missing or invalid, API calls fail with an authorization error.
- Configuration — env vars, settings files,
API_URL - CLI guide — commands and examples