Configuration
Customize models, API endpoints, package managers, and all XibeCode settings. 23 config options including apiKey, model, maxIterations, and more.
XibeCode stores its configuration in ~/.xibecode/. You can manage settings via the CLI or by editing the config file directly.
Interactive Setup
xibecode configThis opens an interactive menu to configure all settings including API key, model, package manager, default mode, and safety settings.
Quick Commands
# Set API key
xibecode config --set-key YOUR_ANTHROPIC_API_KEY
# Set custom API endpoint
xibecode config --set-url https://your-custom-endpoint.com
# Set default model
xibecode config --set-model claude-sonnet-4-5-20250929
# View current config
xibecode config --show
# Reset all settings
xibecode config --resetConfiguration File
The main configuration file is located at ~/.xibecode/config.json:
{
"apiKey": "sk-ant-...",
"baseUrl": "https://api.anthropic.com",
"model": "claude-sonnet-4-5-20250929",
"maxIterations": 50,
"defaultVerbose": false,
"preferredPackageManager": "pnpm",
"enableDryRunByDefault": false,
"gitCheckpointStrategy": "stash",
"defaultMode": "agent",
"autoApprovalPolicy": "always",
"plugins": [],
"mcpServers": {}
}Configuration Options
| Setting | Description | Default |
|---|---|---|
apiKey | Your AI provider API key (Anthropic, OpenAI) | — |
baseUrl | Custom API endpoint (Azure, AWS Bedrock, etc.) | Anthropic default |
model | Default AI model to use | claude-sonnet-4-5-20250929 |
maxIterations | Maximum autonomous iterations before stopping | 50 |
defaultVerbose | Enable verbose logging by default | false |
preferredPackageManager | Package manager: pnpm, bun, npm, or yarn | pnpm |
enableDryRunByDefault | Run in dry-run mode by default | false |
gitCheckpointStrategy | Git checkpoint method: stash or commit | stash |
defaultMode | Default agent mode to start in | agent |
autoApprovalPolicy | Mode transition approval: always, prompt-only, never | always |
testCommandOverride | Custom test command (overrides auto-detection) | Auto-detected |
plugins | Array of plugin file paths | [] |
mcpServers | MCP server configurations | {} |
Environment Variables
# API Keys
ANTHROPIC_API_KEY=your_key # Anthropic API key
OPENAI_API_KEY=your_key # OpenAI API key
# API Configuration
ANTHROPIC_BASE_URL=https://... # Custom endpoint
XIBECODE_MODEL=claude-opus-4-... # Default model
# Behavior
XIBECODE_DRY_RUN=true # Enable dry-run by default
XIBECODE_VERBOSE=true # Enable verbose logging
XIBECODE_MODE=plan # Default agent modePriority Order
Configuration is resolved in this order (highest priority first):
- CLI flags (e.g.,
--api-key,--model) - Environment variables
- Project-level config (
.xibecode/config.json) - Global config file (
~/.xibecode/config.json)
Agent Mode Configuration
{
"defaultMode": "agent",
"autoApprovalPolicy": "prompt-only"
}Auto-approval policies:
always— Auto-approve all mode transitionsprompt-only— Require confirmation for escalation (read -> write)always-for-debugger— Auto-approve only debugger transitionsnever— Always require confirmation
Custom API Endpoints
XibeCode supports custom API endpoints, making it compatible with Azure OpenAI, AWS Bedrock, or any Claude-compatible API:
# Via config
xibecode config --set-url https://your-custom-endpoint.com
# Via CLI flag
xibecode run "task" --base-url https://your-custom-endpoint.com
# Via environment variable
export ANTHROPIC_BASE_URL=https://your-custom-endpoint.comAzure OpenAI Example
{
"baseUrl": "https://your-resource.openai.azure.com",
"apiKey": "your-azure-api-key",
"model": "your-deployment-name"
}AWS Bedrock Example
{
"baseUrl": "https://bedrock-runtime.us-east-1.amazonaws.com",
"apiKey": "your-aws-credentials",
"model": "anthropic.claude-3-sonnet-20240229-v1:0"
}Package Manager Detection
XibeCode automatically detects your preferred package manager by checking for lock files:
pnpm-lock.yaml→ pnpmbun.lockb→ bunyarn.lock→ yarnpackage-lock.json→ npm
Override this with the preferredPackageManager setting.
Test Runner Configuration
XibeCode auto-detects test runners:
- Vitest — vitest.config.ts or vitest in package.json
- Jest — jest.config.js or jest in package.json
- Mocha — .mocharc.js or mocha in package.json
- pytest — pytest.ini or pyproject.toml
- Go test — go.mod file present
- Cargo test — Cargo.toml file present
Override with a custom test command:
{
"testCommandOverride": "npm run test:unit"
}Git Checkpoint Strategies
stash— Uses git stash (recommended, lightweight)commit— Creates a commit (persistent history)
{
"gitCheckpointStrategy": "stash"
}Project-Level Configuration
Create a .xibecode/config.json in your project root for project-specific settings:
{
"testCommandOverride": "pnpm test",
"defaultMode": "tester",
"plugins": ["./custom-plugin.js"]
}Backup Configuration
XibeCode automatically backs up files before editing. Backups are stored in ~/.xibecode/backups/ with timestamps:
~/.xibecode/backups/
├── src_app.ts_2024-01-15T10-30-00.bak
├── src_utils_helper.ts_2024-01-15T10-31-00.bak
└── ...Next Steps
- Agent Modes — Learn about all 13 personas
- MCP Integration — Set up external tool servers
- Plugins — Create custom plugins
Tools Reference
40+ built-in tools across 8 categories for autonomous coding operations. File operations, git, shell, web search, testing, browser automation, memory, and more.
WebUI
A browser-based interface that syncs in real-time with the terminal. Features Monaco editor, multi-terminal, Git panel, settings modal, file explorer, and real-time AI chat.