Skip to content

Commit ebcb144

Browse files
Yogthosyogthos
authored andcommitted
docs: sync README/CONFIG.md with code, fix memory path to ~/.dirge/memories
1 parent 409a675 commit ebcb144

3 files changed

Lines changed: 20 additions & 11 deletions

File tree

CONFIG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
dirge reads an optional JSON config file named `config.json` from its config
44
folder:
55

6-
- If `ZS_CONFIG_DIR` is set: `$ZS_CONFIG_DIR/config.json`
6+
- If `DIRGE_CONFIG_DIR` is set: `$DIRGE_CONFIG_DIR/config.json`
77
- Otherwise: the platform config directory joined with `dirge/config.json`
88
(for example `$XDG_CONFIG_HOME/dirge/config.json` on Linux)
99
- Fallback: `$HOME/.config/dirge/config.json`
1010

1111
All config keys are optional. CLI flags and their environment-backed values
12-
(such as `ZS_PROVIDER` and `ZS_MODEL`) take precedence where both exist.
12+
(such as `DIRGE_PROVIDER` and `DIRGE_MODEL`) take precedence where both exist.
1313

1414
Example:
1515

@@ -59,7 +59,7 @@ Accepted top-level keys:
5959

6060
| Key | Type | Description |
6161
| ------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62-
| `provider` | string | Provider name. Built-ins are `openrouter`, `openai`, `anthropic`, `gemini`/`google`, and `ollama`; custom provider aliases are also accepted. Default: `openrouter`. |
62+
| `provider` | string | Provider name. Built-ins are `openrouter`, `openai`, `anthropic`, `gemini`/`google`, `deepseek`, `glm`/`zhipu`, and `ollama`; custom provider aliases are also accepted. Default: `openrouter`. |
6363
| `model` | string | Model name. Default: `deepseek/deepseek-v4-flash`. |
6464
| `max_tokens` | integer | Maximum response tokens. Default: `8192`. |
6565
| `max_agent_turns` | integer | Maximum agent turns per response. Default: `100`. |

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Minimal coding agent written in Rust, inspired by [pi](https://pi.dev/docs/lates
55
## Features
66

77
- **Multi-provider**: OpenRouter, OpenAI, Anthropic, Gemini, DeepSeek, GLM, Ollama, plus custom providers
8-
- **Standard tools**: read, write, edit, bash, grep, find_files, list_dir, write_todo_list
8+
- **Standard tools**: read, write, edit, bash, grep, find_files, glob, list_dir, write_todo_list, apply_patch
99
- **Line-numbered read output**: `read` tool prefixes each line with right-aligned line numbers (`123: content`)
1010
- **Environment-aware**: system prompt includes OS, shell, working directory, and git branch for context
1111
- **Semantic code tools** (tree-sitter): list_symbols, get_symbol_body, find_definition, find_callers, find_callees — supports TypeScript/TSX and Python
@@ -36,7 +36,7 @@ _dirge_ is one of the smallest and most performant coding agents on the market.
3636

3737
### Tool result caching
3838

39-
Read-only tool calls (`read`, `grep`, `find_files`, `list_dir`) are cached per agent turn. Repeated calls with identical arguments within the same turn return cached results, avoiding redundant filesystem I/O. The cache clears automatically before each new prompt, and after `write`/`edit`/`bash` so a re-read sees fresh content.
39+
Most tool calls (`read`, `write`, `edit`, `bash`, `grep`, `find_files`, `list_dir`) are cached per agent turn. Repeated calls with identical arguments within the same turn return cached results, avoiding redundant filesystem I/O. The cache clears automatically before each new prompt, and after `write`/`edit`/`bash` so a re-read sees fresh content.
4040

4141
### Error recovery
4242

@@ -107,11 +107,16 @@ dirge --provider glm # defaults to glm-4
107107
| `/mode [mode]` | Set security mode (`standard`, `restrictive`, `accept`, `yolo`) |
108108
| `/reasoning` | Toggle reasoning visibility |
109109
| `/btw <question>` | Ask a quick question (no tools, doesn't affect session) |
110-
| `/session` | List/save/load sessions |
110+
| `/sessions` | List/save/load sessions |
111111
| `/loop [prompt]` | Start iterative coding loop |
112112
| `/worktree <name>` | Create a git worktree on branch |
113113
| `/wt-merge [branch]` | Merge worktree branch |
114114
| `/wt-exit` | Exit worktree |
115+
| `/toggle` | Toggle features on/off (currently todo tools) |
116+
| `/regen-prompts` | Restore built-in prompts |
117+
| `/mcp` | List MCP servers and tools |
118+
| `/quit` | Exit dirge |
119+
| `/retry` | Retry last prompt |
115120
| `/help` | Show all commands |
116121

117122
### Key bindings
@@ -179,10 +184,11 @@ Built-in prompts that change the agent's behavior and tone:
179184
| **`review-security`** | Security review mode — finds exploitable vulnerabilities |
180185
| **`simplify`** | Code simplification mode — refines for clarity without changing behavior |
181186
| **`write-prompt`** | Prompt writing mode — creates and optimizes agent prompts |
187+
| **`default`** | Default system prompt — the base built-in prompt |
182188

183189
Custom prompts can be placed in `$XDG_CONFIG_HOME/dirge/prompts/` as `.md` files.
184190

185-
The agent automatically loads `AGENTS.md` or `CLAUDE.md` from the project root or ancestor directories. Use `-n` / `--no-context-files` to disable.
191+
The agent automatically loads `AGENTS.md` or `CLAUDE.md` from the project root, ancestor directories, and `~/.config/dirge/agent/AGENTS.md` as a global fallback. Use `-n` / `--no-context-files` to disable.
186192

187193
## Claude-compatible skills
188194

src/extras/memory.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
use std::path::{Path, PathBuf};
22

3+
fn home_dir() -> PathBuf {
4+
std::env::var("HOME")
5+
.map(PathBuf::from)
6+
.unwrap_or_else(|_| PathBuf::from("."))
7+
}
8+
39
pub fn memory_dir(cwd: &Path) -> PathBuf {
410
let project_id = project_id(cwd);
5-
let base = dirs::data_dir()
6-
.unwrap_or_else(|| PathBuf::from("."))
7-
.join("dirge")
8-
.join("memories");
11+
let base = home_dir().join(".dirge").join("memories");
912
base.join(project_id)
1013
}
1114

0 commit comments

Comments
 (0)