CLI documentation

ghit API command usage, auth expectations, and command help.

Overview

The ghit-cli commands call the HTTP JSON API and print JSON responses. Command pages in this section include usage examples and exact --help output.

Need endpoint-level behavior details? See API docs.

Environment

Set these variables before running CLI commands:

  • GHIT_API_URL points at API root (for example https://example.com/api).
  • GHIT_API_TOKEN is your API token from /profile/tokens.
export GHIT_API_URL="https://example.com/api"
export GHIT_API_TOKEN="your-token-here"

Repo Shorthand

Repo commands accept explicit locators like teams/platform/website or alice/website. For personal workflows, you can also use a bare repo slug like website, which targets the authenticated user.

ghit-cli list-repos
ghit-cli get-repo website
ghit-cli update-repo website --name "Website API"

Common Auth Errors

  • 401 Unauthorized for missing/invalid API token.
  • 403 Forbidden for inactive/expired token, inactive user, or insufficient role/scope.

Known Limitations

  • ghit-cli delete-team is currently unsupported by the API and returns method-not-allowed.

Help Snippet Refresh

Maintain help sections by running:

target/debug/ghit-cli <command> --help

Use the built binary output directly so docs do not include cargo wrapper lines.