Guides
Project Configuration
Configure Dhara per-project with .dhara/config.json.
Project Configuration
Dhara reads configuration from three sources, applied in order of precedence:
- CLI flags (highest priority)
.dhara/config.json(project-level)~/.dhara/config.json(global, lowest priority)
Project Settings
Create .dhara/config.json in your project root:
{
"provider": "openai",
"model": "gpt-4o",
"maxIterations": 15,
"maxTokens": 4096,
"autoSave": true,
"security": {
"level": "standard"
}
}Settings Schema
| Field | Type | Default | Description |
|---|---|---|---|
provider | string | — | LLM provider name |
model | string | — | Model ID |
baseUrl | string | — | Custom API base URL (OpenAI-compatible) |
maxIterations | number | 10 | Max tool-use loop iterations per prompt |
maxTokens | number | Provider default | Max tokens per response |
autoSave | boolean | true | Auto-save session on exit |
security.level | string | "standard" | Security level (paranoid, standard, trusted, yolo) |
Discovery
Dhara walks up from the current working directory looking for .dhara/config.json. The first match wins. This means:
/home/user/projects/my-app/.dhara/config.jsonapplies when running inmy-app/or any subdirectory/home/user/.dhara/config.jsonis the global fallback
Note: Legacy .dhara/settings.json files are still loaded for backward
compatibility if config.json is not found, but .dhara/config.json is
the recommended name.
Global Configuration
The global config at ~/.dhara/config.json sets defaults for all projects.
Per-Project Security
Different projects can have different security levels:
// Trusted project — auto-approve known extensions
{
"security": {
"level": "trusted",
"trustedAuthors": ["zosmaai"]
}
}// Untrusted code — paranoid mode
{
"security": {
"level": "paranoid"
}
}Ignoring .dhara/
If your .dhara/config.json contains API keys, add .dhara/ to your .gitignore:
# .gitignore
.dhara/config.jsonShare only non-sensitive settings via a template:
// .dhara/config.template.json (safe to commit)
{
"maxIterations": 15,
"security": {
"level": "standard"
}
}