config
Shows and edits Git Wrangler setup.
Usage
git-wrangler config show [--json]
git-wrangler config set github.auth
git-wrangler config set github.host <host>
git-wrangler config set ai.provider <name>
git-wrangler config set ai.base-url <url>
git-wrangler config set ai.model <model>
git-wrangler config set ai.api-key
git-wrangler config set ai.headers.<header-name> [value]
git-wrangler config unset github.auth
git-wrangler config unset ai.api-key
git-wrangler config unset ai.headers.<header-name>
What it does
config show prints non-secret setup values and reports each credential source as keyring, env, or missing.
config set github.auth and config set ai.api-key prompt for secrets and store them in the system keyring. They do not accept plaintext secret values as command arguments.
config set ai.headers.<name> configures custom gateway headers. If a value is provided, it is stored as plaintext in the config file. If the value is omitted, it prompts for a secret and stores it securely in the keyring.
Other config set commands write non-secret values to the JSON config file under the user config directory.
config unset removes the matching keyring secret or header value.
Supported unset keys are github.auth, ai.api-key, and ai.headers.<header-name>. config unset does not remove ordinary non-secret config keys such as ai.model or github.host; overwrite those with config set.
Options (config show)
| Flag | Required | Description |
|---|---|---|
--json | Optional | Emit one JSON document on stdout. Suppresses normal human summary, colors, and progress. |
Environment overrides
Environment variables override keyring credentials without writing secrets to disk:
- GitHub:
GIT_WRANGLER_GITHUB_TOKEN - AI:
GIT_WRANGLER_AI_API_KEY - OpenAI provider fallback:
OPENAI_API_KEY
An inbound GH_TOKEN is ignored. Git Wrangler only sets GH_TOKEN when passing its resolved GitHub credential to child gh processes.
Common examples
# Store GitHub auth securely
git-wrangler config set github.auth
# Configure an OpenAI-compatible endpoint
git-wrangler config set ai.provider openai
git-wrangler config set ai.base-url https://api.openai.com/v1
git-wrangler config set ai.model gpt-4o
git-wrangler config set ai.api-key
# Store a plaintext gateway header in config
git-wrangler config set ai.headers.X-Project-ID corp-dev-99
# Store a secret gateway header in the keyring
git-wrangler config set ai.headers.Authorization