Command Overview
openclaw configure is OpenClaw's configuration management command, supporting interactive editing, import/export, and configuration validation.
Interactive Configuration
openclaw configure
Launches the interactive configuration menu:
OpenClaw Configuration
======================
What would you like to configure?
[1] Providers (Model providers)
[2] Models (Model settings)
[3] Channels (Messaging channels)
[4] Skills (AI skills and tools)
[5] Security (Auth and access control)
[6] Gateway (Server settings)
[7] Logging (Log settings)
[0] Exit
>
View Current Configuration
# Show full configuration (sensitive values masked)
openclaw configure --show
# Show a specific section
openclaw configure --show providers
openclaw configure --show channels
openclaw configure --show models
Example output:
{
"providers": {
"openai": {
"type": "openai",
"baseUrl": "https://api.openai.com/v1",
"apiKey": "sk-****...****",
"models": ["gpt-4o", "gpt-4o-mini"]
}
}
}
Set Configuration Values Directly
Modify configuration without entering interactive mode:
# Set the Gateway port
openclaw configure set gateway.port 3001
# Set model temperature
openclaw configure set models.main.temperature 0.8
# Set a channel's system prompt
openclaw configure set channels.telegram.systemPrompt "You are a helpful assistant"
Read Configuration Values
openclaw configure get gateway.port
# Output: 3000
openclaw configure get providers.openai.baseUrl
# Output: https://api.openai.com/v1
Validate Configuration
openclaw configure --validate
Output:
Validating configuration...
✓ JSON syntax: valid
✓ Required fields: present
✓ Provider references: valid
✓ Model references: valid
⚠ Warning: Channel "slack" references undefined model "slack-model"
✓ Security settings: valid
Validation result: 1 warning, 0 errors
Import and Export
Export Configuration
# Export full configuration (without secret values)
openclaw configure --export config-backup.json
# Export full configuration with secrets (encrypted)
openclaw configure --export config-full.enc --include-secrets
Import Configuration
# Import from a file
openclaw configure --import config-backup.json
# Merge import (preserve existing local configuration)
openclaw configure --import config-backup.json --merge
Configuration Diff
# Compare current configuration against a file
openclaw configure --diff config-old.json
Output:
- "gateway.port": 3000
+ "gateway.port": 3001
+ "providers.anthropic": { ... }
- "models.main.temperature": 0.7
+ "models.main.temperature": 0.8
Reset Configuration
# Reset a specific section
openclaw configure --reset providers
# Reset all configuration to defaults
openclaw configure --reset-all
Environment Variable Overrides
Values in the configuration file can be overridden by environment variables:
# Override port
OPENCLAW_GATEWAY_PORT=3001 openclaw start
# Override model
OPENCLAW_DEFAULT_MODEL=gpt-4o-mini openclaw start
Naming convention: OPENCLAW_ + uppercase config path with _ separators.
Configuration File Formats
OpenClaw supports both JSON and YAML configuration files:
# Use YAML format
openclaw configure --format yaml --export config.yaml
Batch Modifications
Use JSON Patch for batch modifications:
openclaw configure --patch '[
{"op": "replace", "path": "/gateway/port", "value": 3001},
{"op": "add", "path": "/models/new-model", "value": {"provider": "openai", "model": "gpt-4o"}}
]'
Configuration History
OpenClaw maintains a history of configuration changes:
# View change history
openclaw configure --history
# Roll back to a previous version
openclaw configure --rollback 3
Summary
openclaw configure is the core tool for managing OpenClaw's configuration. Whether you prefer interactive editing or scripted batch operations, it handles both with ease. It is recommended to back up with --export before making major changes and to verify with --validate afterwards.