You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55-14Lines changed: 55 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,20 +52,21 @@ do-code
52
52
## What it does
53
53
54
54
-**Works in real repositories** — read and attach files, edit code, run shell commands, inspect Git diffs, and run tests.
55
-
-**Uses your model provider** — built-in setup for Ark, Bailian, DeepSeek, MiniMax, Z.AI, and ModelScope, plus OpenAI-compatible, Anthropic, and Gemini services.
56
-
-**Keeps execution controlled** — planning and permission modes are independent, and every edit gets a local checkpoint for inspection or recovery.
55
+
-**Uses your model provider** — built-in setup for Volcengine Ark, Alibaba ModelStudio, DeepSeek, MiniMax, Z.AI, and ModelScope; Custom Provider supports OpenAI-compatible, Anthropic, and Gemini APIs.
56
+
-**Keeps execution controlled** — planning and permission modes are independent, and built-in file edits and patches receive local checkpoints for inspection or recovery.
57
57
58
58
Type `/` to browse commands and `@` to attach workspace files:
59
59
60
60
```text
61
-
/plan Explore and propose a plan in read-only mode
62
-
/permissions Choose Ask / Auto / Full Access
63
-
/model View or switch model presets
64
-
/resume Restore a previous session
61
+
/plan · /permissions · /model · /resume
62
+
/status · /stats · /compact · /diff
63
+
/memory · /rewind · /export · /language
65
64
@src/app.ts Add a file to the current context
66
65
!npm test Run a command under the current permission mode
67
66
```
68
67
68
+
Use `/thinking` and `/effort` to tune reasoning during a session; add `--persist` to save the choice as the default for future sessions. The interface supports English, Simplified Chinese, Japanese, Korean, Spanish, and French through `--language` or `/language`.
69
+
69
70
## Run it your way
70
71
71
72
### Interactive terminal
@@ -76,31 +77,71 @@ do-code --continue
76
77
do-code resume <session-id>
77
78
```
78
79
80
+
### Sessions and context
81
+
82
+
Continue the latest project session with `do-code --continue`, or choose one with `resume` and `/resume`:
Use `/stats` to inspect context use and `/compact` to compact it on demand. Near the context limit, do-code compacts automatically while retaining important paths, commands, decisions, and verification state.
93
+
94
+
### Project instructions and isolation
95
+
96
+
Layered `AGENTS.md` instructions follow the workspace hierarchy; inspect or reload them with `/memory`. Start an isolated Git worktree with `do-code --worktree` or `do-code --worktree=<name>`, and inspect do-code worktrees with `do-code worktrees`.
97
+
98
+
### Profiles and extensions
99
+
100
+
Agent profiles can select a model, approval mode, instructions, step limit, and tool allow/deny lists. Inspect them with `do-code agents` and select one with `do-code --agent <name>`. Browse Markdown commands and skills with `/extensions`; use `do-code extensions` for a summary of commands, skills, and configured MCP servers.
101
+
79
102
### Scripts and CI
80
103
81
-
`run` produces stable JSON or JSONL output for automation:
104
+
`run` produces stable JSON or JSONL output for automation. Tasks can come from an argument or `--task-file`; `--max-steps` and `--timeout` set execution budgets. `--artifact-dir` stores the frozen configuration, event stream, result, and patch artifacts.
82
105
83
106
```bash
84
-
do-code run --yes --output-format stream-json "Fix the failing test and verify it"
107
+
do-code run --yes --output-format stream-json \
108
+
--task-file task.txt --artifact-dir ./artifacts \
109
+
--max-steps 40 --timeout 600
85
110
```
86
111
87
-
Use `do-code acp` for the ACP standard input/output protocol. See the [Headless / JSONL protocol](docs/headless-protocol.md).
112
+
Use `do-code acp` for the ACP standard input/output protocol. See the [Headless / JSONL protocol](docs/headless-protocol.md) for the supported automation contract.
88
113
89
114
### Image input
90
115
91
-
Attach up to four PNG, JPEG, GIF, or WebP images with repeated `--image` in headless mode:
116
+
Attach up to four PNG, JPEG, GIF, or WebP images with repeated `--image` in headless mode. The selected model must support image input.
92
117
93
118
```bash
94
119
do-code run --image screenshots/bug.png --image screenshots/diagram.webp "Describe these images"
95
120
```
96
121
97
122
In the interactive TUI, type `@path/to/image.png` or use `/paste-image` to import an image from the system clipboard. Use `/remove-image <index|name>` to remove a pending attachment. Each image is limited to 10 MB and the prompt total is limited to 20 MB. Imported files are copied to `~/.local/share/do-code/projects/<project-key>/sessions/<session-id>/attachments/`; persisted messages contain only relative references such as `attachments/image_xxx.png`, never Base64 data or the original absolute path. Set `DO_CODE_DATA_DIR` to override the global data root. Existing project-local `.do-code` data is migrated to the user-managed project directory when the project is next accessed.
98
123
124
+
### Useful CLI commands
125
+
126
+
```bash
127
+
do-code config show # Inspect effective model configuration
128
+
do-code doctor # Check model, workspace, and local tools
129
+
do-code sessions list # List project sessions
130
+
do-code extensions # Inspect commands, skills, and MCP configuration
131
+
do-code agents # List agent profiles
132
+
do-code worktrees # List isolated worktrees
133
+
do-code errors list # List recent error reports
134
+
```
135
+
99
136
## Safety and data
100
137
101
138
The default **Ask** mode requests confirmation for high-risk actions. **Auto** handles ordinary workspace changes automatically. **Full Access** is intended only for trusted workspaces or CI.
102
139
103
-
Sessions, checkpoints, error reports, and credentials stay on your machine by default. To inspect a failure:
140
+
Configuration is stored under `~/.config/do-code/`; project sessions, attachments, checkpoints, and error reports are stored under `~/.local/share/do-code/projects/<project-key>/`. `DO_CODE_DATA_DIR` overrides the data root. Credentials and project data stay on your machine by default.
141
+
142
+
Sandbox settings can use local execution, macOS Seatbelt, or a container, depending on configuration and host support. Permission mode and sandbox configuration are separate controls.
143
+
144
+
To inspect a failure:
104
145
105
146
```bash
106
147
do-code errors list
@@ -113,16 +154,16 @@ do-code errors show <error-id>
113
154
-[Bad case feedback and diagnostics](docs/bad-case-feedback.md)
Issues and pull requests are welcome. Please read the [contributing guide](CONTRIBUTING.md) and [security policy](SECURITY.md) before submitting a change.
0 commit comments