Agents
Local agents
Point Claude Code, Codex or another coding agent at your workspace through the dunjii command.
Set up a folder
A coding agent works on files, so it needs your workspace as a folder on your computer. The Dunjii app for your computer installs the dunjii command that syncs one. Download the app, then run these in a terminal:
dunjii loginOpens your browser to sign this computer in. It also prints a code you can enter at /device on another computer, for a terminal over SSH or inside an agent's sandbox.cd ~/campaignsdunjii syncDownloads your workspace into this folder. The first time, it asks before it links the folder to your account.dunjii agentsWrites AGENTS.md and CLAUDE.md at the top of the folder. They stay on this computer and do not sync.Start your agent in that folder. Claude Code reads CLAUDE.md, which loads AGENTS.md; Codex and most other agents read AGENTS.md itself.
What AGENTS.md covers
It describes how a Dunjii workspace is laid out and tells the agent to ask the dunjii command for anything that depends on your game: the sections a document type suggests, how a stat block is spelled, which values a setting takes. It also lists rules for writing at the table: no emoji, no commentary about the content, and no invented numbers.
Run dunjii agents again after you update the app. It asks before it changes a file that is already there.
Common commands
| Command | What it does |
|---|---|
dunjii shape <type> |
Prints what a document of that type looks like in source: the italic line, the sections, what goes in each. |
dunjii validate [path] |
Lists what is wrong: an unknown type, a folder setting that will be dropped, a link that goes nowhere. |
dunjii filter type:npc |
Lists files by type, tag or any property you declared. |
dunjii statblock <creature> |
Prints a creature's stat block, ready to paste. |
dunjii sourcebook search <query> |
Finds a page in the Sourcebooks you have switched on. |
dunjii sync |
Sends changes up and pulls changes down. |
Seeing the agent's changes
While the Dunjii app runs, it watches the folder and uploads a file when the agent saves it, so the page updates on the web within moments. Any changes you make on the web should also be synced to your local files within a few seconds.
Dunjii keeps a version of every file each time it changes. Open a file's history in the app, or use dunjii history, to compare or restore old versions. Or see the history of your entire workspace.