Initialization
Runningdavia init will:
- Create a
.daviafolder in your project root - Add
.daviato your.gitignorefile
--agent=cursor (or github-copilot, windsurf), it will:
- Add the agent rule file (e.g.,
.cursor/rulesfor Cursor) - Add the agent rule directory to your
.gitignore
Why agent rules?
The agent rule file tells your coding agent how to interact with Davia and document your codebase. Each time you want to document your project, your coding agent will read this rule and write documentation files in.davia, maintaining context from previous documentation sessions.
The .davia folder is gitignored so that generated documentation remains local and your coding agent can build upon previous documentation sessions.
.davia Folder Structure
What goes where
| Folder | Purpose | File type |
|---|---|---|
assets/ (root) | Documentation pages | .html |
components/ | Interactive React components | .mdx |
data/ | Persistent data + whiteboard diagrams | .json |
mermaids/ | Mermaid source files (auto-converted) | .mmd |
The agent creates
.mmd files in mermaids/ — these are automatically converted to .json in data/.
HTML pages always reference the .json version, never the .mmd directly.File System to Workspace Mapping
The structure in your.davia folder directly corresponds to what you see in the Davia workspace interface. The HTML files in .davia/assets/ become the documentation pages shown in the workspace navigation:


davia open, the web interface reads from these files and displays them as interactive documentation pages. The navigation menu items (like “Autocomplete API Flow”) correspond to the HTML files in your assets/ folder (like autocomplete-api-flow.html).
