config

View or change Git Wrangler settings and credentials.

Usagegit-wrangler config <show|set|unset|file>

Quick start

git-wrangler config show

What it does

config manages GitHub access, AI settings, custom AI headers, and the path list used by remove-secrets.

Secret values are entered through a hidden prompt and stored in the system keyring. Non-secret settings are stored in Git Wrangler’s config file.

Common settings

Goal Command
Show current non-secret settings git-wrangler config show
Store GitHub authentication git-wrangler config set github.auth
Set the GitHub host git-wrangler config set github.host <host>
Set the AI provider git-wrangler config set ai.provider <name>
Set the AI service URL git-wrangler config set ai.base-url <url>
Set the AI model git-wrangler config set ai.model <model>
Store the AI API key git-wrangler config set ai.api-key
Remove a setting or credential git-wrangler config unset <key>

Custom AI headers

Provide a value to store a non-secret header in the config file:

git-wrangler config set ai.headers.X-Project-ID team-42

Omit the value to enter a secret header through a hidden prompt and store it in the keyring:

git-wrangler config set ai.headers.Authorization

Secret-removal paths

git-wrangler config file remove-secrets path
git-wrangler config file remove-secrets show
git-wrangler config file remove-secrets edit

path prints the file location, show prints the current path patterns, and edit opens the file in your configured editor. The file is created with safe defaults when it does not exist.

Options

Option Default What it does
--json Off Return config show results as machine-readable JSON.

Environment variables

Environment variables override stored credentials without writing them to disk:

  • GIT_WRANGLER_GITHUB_TOKEN
  • GIT_WRANGLER_AI_API_KEY
  • OPENAI_API_KEY when using the OpenAI provider

Git Wrangler does not read an existing GH_TOKEN as its credential.

  • Use init for guided first-time setup.
  • Use doctor to check whether required settings are present.
  • See remove-secrets before editing secret-removal paths.