Skip to main content
wit stores configuration in .wit/config using an INI-like format, similar to Git.

Configuration Levels

LevelLocationScope
Repository.wit/configThis repository only
Global~/.witconfigAll your repositories
System/etc/witconfigAll users (rare)
Lower levels override higher levels: Repository > Global > System.

Viewing Configuration

# View all settings
wit config --list

# View specific setting
wit config core.hashAlgorithm

# View with source location
wit config --list --show-origin

Setting Configuration

# Set repository config
wit config <key> <value>

# Set global config
wit config --global <key> <value>
Examples:
# Set user info (global)
wit config --global user.name "Your Name"
wit config --global user.email "you@example.com"

# Set repository-specific setting
wit config wit.autoStashOnSwitch false

Configuration Sections

Core Settings

[core]
    repositoryformatversion = 1
    filemode = true
    bare = false
KeyDescriptionDefault
repositoryformatversionRepository format version1
filemodeTrack file permissionstrue
bareIs this a bare repositoryfalse

wit Settings

[wit]
    hashAlgorithm = sha1
    largeFileThreshold = 2097152
    autoStashOnSwitch = true
    chunkSize = 2097152
KeyDescriptionDefault
hashAlgorithmHash algorithm (sha1 for Git compat, sha256 for wit-only)sha1
largeFileThresholdSize for large file handling2097152 (2MB)
autoStashOnSwitchAuto-save on branch switchtrue
chunkSizeChunk size for large files2097152 (2MB)

User Settings

[user]
    name = Your Name
    email = you@example.com

Remote Settings

[remote "origin"]
    url = https://github.com/user/repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*

Branch Settings

[branch "main"]
    remote = origin
    merge = refs/heads/main

Quick Reference

Essential Settings

# Your identity
wit config --global user.name "Your Name"
wit config --global user.email "you@example.com"

# Editor
wit config --global core.editor "code --wait"

# Default branch
wit config --global init.defaultBranch main

wit-Specific Settings

# Disable auto-stash
wit config wit.autoStashOnSwitch false

# Change large file threshold to 5MB
wit config wit.largeFileThreshold 5242880

# Use SHA-1 for Git compatibility (not recommended)
wit config wit.hashAlgorithm sha1

Configuration File Format

# Comments start with # or ;
[section]
    key = value
    anotherKey = another value

[section "subsection"]
    key = value

# Boolean values
[feature]
    enabled = true
    disabled = false

# Numbers
[limits]
    maxSize = 1048576

Example Configuration

Complete .wit/config:
[core]
    repositoryformatversion = 1
    filemode = true
    bare = false

[wit]
    hashAlgorithm = sha1
    largeFileThreshold = 2097152
    autoStashOnSwitch = true

[user]
    name = Alice Developer
    email = alice@example.com

[remote "origin"]
    url = git@github.com:alice/my-project.git
    fetch = +refs/heads/*:refs/remotes/origin/*

[branch "main"]
    remote = origin
    merge = refs/heads/main

[scope "frontend"]
    paths = packages/frontend/

[scope "backend"]
    paths = packages/backend/,packages/api/

AI Configuration

AI features are configured via environment variables rather than config files:
# OpenAI (default)
export OPENAI_API_KEY=sk-your-key-here

# OR Anthropic
export ANTHROPIC_API_KEY=sk-ant-your-key-here

# Optional: Change the model
export WIT_AI_MODEL=anthropic/claude-sonnet-4-20250514
VariableDescriptionDefault
OPENAI_API_KEYOpenAI API key-
ANTHROPIC_API_KEYAnthropic API key-
WIT_AI_MODELModel to useopenai/gpt-4o
Check AI status:
wit ai status

Next Steps