Skip to main content
The GitHits CLI reads several environment variables at startup. You can use them to authenticate without a browser, switch credential storage modes, or suppress update notifications.

GITHITS_API_TOKEN

Set an API token to authenticate without browser OAuth. This is the recommended approach for CI pipelines, automation scripts, and headless environments where a browser login isn’t practical. Tokens follow the format ghi-... and can be generated from your GitHits account settings. When GITHITS_API_TOKEN is set, the CLI skips local OAuth storage entirely. You can verify this with npx githits@latest auth status, which reports the credential source.
GITHITS_API_TOKEN takes precedence over stored OAuth credentials. If both are present, the environment variable is used.

GITHITS_AUTH_STORAGE

Override the OAuth credential storage mode for a single process or for all GitHits commands in the current shell session.
  • keychain (default) — stores OAuth credentials in the system keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service).
  • file — stores OAuth credentials as JSON files in the GitHits config directory.
Use file mode in SSH sessions, CI environments, or when persistent keychain prompts remain even after granting access.
File storage is not encrypted. Any process running as your OS user can read the stored tokens. For CI and automation, use GITHITS_API_TOKEN instead.

GITHITS_SESSION_ID

Since githits and @githits/mcp 0.25.1, set GITHITS_SESSION_ID to group requests from a CLI or local MCP run under an explicit identifier. Set it before starting the process. The value is sent unchanged in x-githits-session-id and takes precedence over automatic terminal detection. Use 1–64 ASCII letters, digits, underscores, or hyphens ([A-Za-z0-9_-]{1,64}). GitHits does not trim or hash an explicit value. Empty values, whitespace, Unicode, slashes, and longer values are invalid; errors do not echo the supplied value. Unset the variable to restore automatic detection, which hashes a terminal identifier, parent process ID, or fallback UUID.
Choose an opaque identifier without credentials or personal data because it is transmitted as supplied. This value groups requests; it does not authenticate them or replace a Research thread_id. For local MCP, set it in the server process environment. A client-side environment variable does not configure the hosted MCP service.

GITHITS_TELEMETRY

Set GITHITS_TELEMETRY to 1, true, yes, or on to emit end-of-run timing spans to stderr. Matching is case-insensitive and ignores surrounding whitespace. Other values leave profiling disabled. The output goes to stderr only and does not affect stdout.

GITHITS_DISABLE_UPDATE_CHECK

When set to any non-empty value, suppresses the npm latest-version check and update notice that the CLI prints when a newer version is available. Useful in CI environments where the notice would pollute log output.

NO_COLOR

Set the standard NO_COLOR variable to disable ANSI color output. Any present value disables color, including an empty value.
For one CLI invocation, you can also pass the global --no-color option.