Reference
Files and environment variables
Where Duscode keeps keys, settings, sessions, memory, logs and usage, in your system's standard folders and in each project, and the environment variables it reads.
Your own folders
Duscode keeps your own files where your system expects them:
| System | Settings (config.json, .env, DUSCODE.md) |
Everything else |
|---|---|---|
| Linux, WSL | ~/.config/duscode ($XDG_CONFIG_HOME/duscode) |
~/.local/share/duscode ($XDG_DATA_HOME/duscode) |
| macOS | ~/Library/Application Support/Duscode |
the same folder |
| Windows | %APPDATA%\Duscode |
the same folder |
DUSCODE_HOME puts everything in one folder of your choice instead. Before, everything lived in ~/.duscode: Duscode moves it once, the first time it starts, and says so in its log. Your vault moves intact (its key stays where it was, in your system's keychain or beside it). If both the old and the new folder have files, the old one is left alone and the log says so.
| Path | Contains |
|---|---|
.env |
Provider API keys added with duscode keys or by hand, one NAME=value per line (mode 600). Keys added in Settings are in the vault instead. |
config.json |
Your user config |
logs/server-<port>.log |
The engine's log, written by its supervisor and rotated at 5 MB. duscode logs shows it. |
logs/services/ |
Each session's services: their logs and what runs |
run/ |
The supervisor's process id and state for each port (duscode status reads them) |
tmp/ |
Each session's /tmp, kept between its commands and removed with the session |
projects.json |
Your recent projects |
usage.jsonl |
Usage history: one line per model call, with its cost. Used for the daily budget and Settings → Usage. |
account.json |
Duscode Cloud sign-in and licence, if you sign in (mode 600) |
memory/ |
Your user-level memories |
skills/<name>/SKILL.md |
Your own skills |
jobs.json |
Your scheduled jobs |
In each project
| Path | Contains | In git? |
|---|---|---|
DUSCODE.md |
Your project instructions (or AGENTS.md / CLAUDE.md) |
Yes, if you commit it |
.cursor/rules/, .github/copilot-instructions.md |
Cursor and Copilot rules, read as they are | Yes, if you commit them |
.duscode/config.json |
The project config, including the chosen architecture | Your choice |
.duscode/journal/YYYY-MM-DD.md |
The journal of each day's tasks | Your choice |
.duscode/sessions/ |
Saved sessions: each one's full log (<id>.log.jsonl), snapshot (<id>.json) and search index (<id>.recall.idx); finished ones are in archive/ |
Excluded |
.duscode/audit/ |
Each session's audit log: every operation and what allowed it | Excluded |
.duscode/proof/ |
Each task's Proof of Work and its screenshots | Excluded |
.duscode/coord/ |
How the project's sessions work together: who is working, claims, reservations, messages and merges | Ignored (its own .gitignore) |
.duscode/memory/ |
Project memories | Your choice |
.duscode/skills/<name>/SKILL.md |
Project skills | Your choice |
.duscode/screenshots/ |
Full-page screenshots from browser checks | Your choice |
.duscode/worktrees/ |
Worktrees of isolated sessions and workers | Excluded |
Everything Duscode keeps for a project is in that one .duscode/ folder, and the whole folder is excluded. "Excluded" means Duscode adds it to .git/info/exclude: a local, per-clone ignore list, so your .gitignore is never changed. Sessions made before this lived in .worktrees/; Duscode moves each one to .duscode/worktrees/ when it starts (git worktree move, then git worktree repair). A session with uncommitted changes, or a locked worktree, stays where it is until it's clean, and the log says why. To share the config, journal or skills with your team, commit them with git add -f, or adjust your own .gitignore.
Environment variables
| Variable | What it does |
|---|---|
ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY, DEEPSEEK_API_KEY, XAI_API_KEY, MISTRAL_API_KEY, GROQ_API_KEY, OPENROUTER_API_KEY, TOGETHER_API_KEY, FIREWORKS_API_KEY, CEREBRAS_API_KEY, MOONSHOT_API_KEY, DASHSCOPE_API_KEY |
Provider keys. See Providers and models. |
DUSCODE_HOME |
One folder for all of Duscode's own files, instead of your system's standard folders. Keys, recent projects, logs and usage history move with it. |
XDG_CONFIG_HOME, XDG_DATA_HOME |
On Linux, where the standard folders are (default ~/.config and ~/.local/share) |
DUSCODE_MODEL |
Pins a model for duscode chat, for example claude-sonnet |
DUSCODE_CHROMIUM |
The Chromium executable to use for browser checks |
PLAYWRIGHT_BROWSERS_PATH |
Where to look for Playwright's browsers. Default ~/.cache/ms-playwright. |
Key variables in your environment work alongside the keys in the .env in your settings folder. A key saved in Settings → Models & keys wins over both. Every key variable is removed from the environment of commands Dus runs.