Reference

CLI reference

Every dunjii command and flag, from the command's own help.

View as markdown

Commands

The dunjii command comes with the Dunjii desktop app. Download the app to install it, and see Local agents for a first sync. dj is a shorter name for the same command.

CommandWhat it does
dunjii agentsAdd instruction files for AI coding agents (AGENTS.md, CLAUDE.md)
dunjii appLaunch Dunjii menu bar app with background sync
dunjii app installInstall Dunjii for the current user (Windows)
dunjii app remove-folder [path]Stop syncing a folder in the background
dunjii app uninstallRemove Dunjii from login items, PATH, and the CLI symlink
dunjii backlinks <path>What links to this file
dunjii clone <workspace|@owner/workspace> [directory]Clone a workspace from Dunjii
dunjii copy <source>... <dest>Copy files within the workspace, fixing the copy's own links
dunjii diff <path> [version1] [version2]Compare file versions
dunjii filter <key:value>...Find files by type, tag, or any declared property
dunjii history [path]Show version history for files
dunjii imageWire image files into your markdown
dunjii image attachInsert or replace an image link in a markdown section
dunjii initSet up the current directory as your Dunjii workspace
dunjii link [workspace]Connect this folder to an existing Dunjii workspace
dunjii loginLog in to Dunjii
dunjii logoutSign this computer out of Dunjii
dunjii move <src> <dest>Move or rename a file and rewrite all references to it
dunjii newStart a campaign or a session
dunjii new campaign <name>Start a campaign in the current workspace
dunjii new session [campaign]Start a session in a campaign
dunjii preview <map.svg>A link that draws a map as Dunjii will, without syncing it
dunjii random [table]Roll on a random table
dunjii restore <path> --to <version|timespec>Restore a file to a previous version
dunjii shape [type]What a document of a given type looks like in source
dunjii sharedList workspaces other people have shared with you
dunjii show <path>Show the content of a file version
dunjii skillList and describe available skills for AI agents
dunjii skill describe <skill>Print full instructions for a skill
dunjii skill listList available skills
dunjii sourcebookThe bundled reference content: read it, search it, copy from it
dunjii sourcebook copy <path>... <dest>Copy Sourcebook pages into this workspace
dunjii sourcebook search <query> [key:value]...Search the Sourcebook
dunjii sourcebook show <path>Print a Sourcebook page
dunjii statblock <creature>Print a creature's stat block, ready to paste
dunjii syncSync all files with Dunjii server
dunjii sync statusWhat is being synced in the background, and how it is going
dunjii trashManage locally-deleted files held in .dunjii/trash
dunjii trash listList trash batches in this workspace, newest first
dunjii trash restore <batch-id> [<path>...]Restore files from a trash batch back to their original locations
dunjii trustUse the sign-in saved in this folder's .dunjii/config.json
dunjii url <path>The web address of a file in this workspace
dunjii validate [path]Validate your markdown files

Run dunjii <command> --help for a command's arguments and examples.

Flags

Every command also takes --help. Flags with no default listed are off or empty until you set them.

CommandFlagWhat it does
dunjii agents--forceChange existing files without asking: replace AGENTS.md, add the import to CLAUDE.md
dunjii app--no-syncStart without auto-syncing (manual start/stop only)
dunjii app install--no-autostartDon't register the app to start at login
dunjii backlinks--jsonEmit JSON (for tools and agents)
dunjii copy--forceOverwrite the destination if it exists
dunjii copy--renameName the copy (only valid with a single source into a directory)
dunjii diff--no-colorDisable colored output
dunjii filter--jsonEmit JSON (for tools and agents)
dunjii filter--keysList every filterable property and its values
dunjii history--limit, -lMaximum number of versions/files to show (default 20)
dunjii image attach--altAlt text for the image (default: H1 from markdown)
dunjii image attach--imageImage file to reference
dunjii image attach--levelHeading level for new sections (default 2)
dunjii image attach--mdMarkdown file to update
dunjii image attach--sectionHeading text (e.g. 'Portrait', 'Illustration')
dunjii link--forceSkip the confirmation, and re-link a folder that is already linked
dunjii login--localSave credentials to .dunjii/config.json in the current directory instead of ~/.dunjii/
dunjii login--no-browserDon't open a browser; print a code to enter at /device on any computer instead
dunjii move--dry-run, -nPrint the move and every rewrite without changing anything
dunjii move--force, -fOverwrite the destination if it exists
dunjii new session--numberSession number (default: next available)
dunjii new session--titleOptional session title (written into the Session.md heading)
dunjii preview--openAlso open the link in the default browser
dunjii random--n, -nDraw this many (default 1)
dunjii restore--toVersion number or time spec (3h, 1d, yesterday, 1w)
dunjii restore--yes, -ySkip confirmation prompt
dunjii shape--jsonEmit JSON (for tools and agents)
dunjii shape--rulesetDescribe this ruleset's types (default: the current folder's)
dunjii show--version, -vVersion number to show
dunjii sourcebook copy--dry-run, -nPrint what would be copied without writing anything
dunjii sourcebook search--jsonEmit JSON (for tools and agents)
dunjii sourcebook search--limitStop after this many hits (0 for all) (default 20)
dunjii statblock--localOnly look in this workspace
dunjii statblock--nameTitle the block with this name instead of the one you searched for
dunjii statblock--sourcebookOnly look in your Sourcebooks
dunjii sync--watch, -wWatch for changes and sync continuously
dunjii validate--fixResolve wikilinks to relative paths and link Sourcebook pages by URL
dunjii validate--strictTreat warnings as errors (exit 1 on warnings)