Reference
gitrole Commands Reference
Reference for gitrole CLI commands for saved roles, Git identity switching, SSH push alignment, diagnosis, and repo-local policy.
Command list
For the public machine-readable output contracts, see Machine Readable Contracts.
gitrole add <name> --name "..." --email "..." [--ssh ...] [--github-user ...] [--github-host ...]- Create or update a saved role profile.
gitrole use <name> [--global | --local]- Apply a saved role globally or only in the current repository.
gitrole resolve- Print the repo-local default role from
.gitrole. gitrole current- Show which saved role matches the active commit identity.
gitrole list- List all saved roles and mark the active one when there is a match.
gitrole status- Check whether the current repository is aligned for commit and push.
gitrole status --short- Show the one-line machine-friendly alignment check.
gitrole doctor- Explain commit identity, remote configuration, and SSH auth alignment in more detail.
gitrole doctor --json- Return the full diagnosis as structured JSON.
gitrole remote set <name>- Rewrite
originto the GitHub SSH host alias configured for the saved role. gitrole remove <name>- Remove a saved role profile.