# Dunjii docs > Dunjii is a web app for preparing tabletop RPG sessions you run in person: you write in markdown, Dunjii lays it out for print, and you share pages with your players by link. ## Start here How a Dunjii workspace is organized, and the steps from a blank page to a printed session. ### Your workspace Your account has one workspace. Everything you write goes in it, as folders and pages in the sidebar. - **Library** holds what you reuse across campaigns: NPCs, scenes, spells, items, portraits and battle maps, one folder for each. - A **campaign** is a folder marked as a campaign. It holds its sessions and a page for the party. - A **session** is a folder inside a campaign for one night of play. Its page lists the session's scenes, NPCs and maps, and how long the scenes add up to. A new workspace is empty. **Add sample library** on the Home page creates a Library with example NPCs, scenes, spells and items to look through. See [Workspace and campaigns](https://dunjii.com/docs/organizing/workspace-and-campaigns.md), [Sessions](https://dunjii.com/docs/organizing/sessions.md) and [The Library](https://dunjii.com/docs/organizing/library.md). ![The sidebar at the top of a workspace with a Library and two campaigns.](https://dunjii.com/docs-assets/organizing/library-in-sidebar.webp) ### Pages Every page is a markdown file. You write it in the editor, and Dunjii saves your changes every 15 seconds while you type. A page's type, such as `npc`, `scene` or `spell`, decides the sections Dunjii suggests and how the page prints. ```markdown --- type: npc --- # Warden Hollis *Gatekeeper of Mistwood, tired and fair* > [!callout] > ### First impression > Mud to the knees. Counts the party twice before she speaks. Knows the bridge is out. Will say so for a silver piece. ``` - `type: npc`: Makes this page an NPC. Type `[[` to link another page by its name. See [The editor](https://dunjii.com/docs/writing/the-editor.md), [New documents](https://dunjii.com/docs/writing/new-documents.md) and [Markdown in Dunjii](https://dunjii.com/docs/reference/markdown.md). ### Printing Dunjii shows each page as the sheets of paper it will print on. It sets the columns, page breaks and text size, and you can change them. Print one page, or a whole session folder at once. Spells, items and abilities print as cards, and portraits print as coins to cut out and put on the table. See [Printing](https://dunjii.com/docs/layout-and-printing/printing.md), [Page layout](https://dunjii.com/docs/layout-and-printing/page-layout.md), [Card sheets](https://dunjii.com/docs/layout-and-printing/card-sheets.md) and [Coin sheets](https://dunjii.com/docs/layout-and-printing/coin-sheets.md). ![The Print preview for one scene.](https://dunjii.com/docs-assets/layout-and-printing/print-preview.webp) ### Sharing A page is Private until you share it. Make it Public or Secret, copy its link, and send the link to your players. They don't need an account. On the Pro plan you can also invite another GM to work in some or all of your workspace. See [Share links](https://dunjii.com/docs/sharing/share-links.md), [What players see](https://dunjii.com/docs/sharing/what-players-see.md) and [Co-GMs](https://dunjii.com/docs/sharing/co-gms.md). ![The Share menu on a handout.](https://dunjii.com/docs-assets/sharing/share-menu.webp) ### On your computer The Dunjii desktop app for Mac and Windows keeps a copy of your workspace in a folder on your computer and syncs it both ways. Edit the files in Obsidian or any other markdown editor, or start a coding agent in the folder. You don't need the app to use Dunjii. See [Desktop app and sync](https://dunjii.com/docs/your-files/desktop-app.md) and [Local agents](https://dunjii.com/docs/agents/local-agents.md). ## Workspace and campaigns Your account has one workspace, and a campaign is a folder in it for your sessions and your party. ### Your workspace Each account has one workspace. It contains everything you write: your campaigns, your Library, and any other folders you make. A workspace is not a campaign. Campaigns are folders inside the workspace, and you can make as many as you like. The top of the workspace opens on the **Home** tab. Home shows the session you created most recently, with the campaign it belongs to beside the label. Click the card to open the session. - With campaigns but no sessions, Home shows your newest campaign. - With no campaigns, Home shows **Get started** and a **New campaign…** button. You can also drag folders of notes you already have onto the page. - While the workspace has no `Library` folder, Home offers **Add sample library**: example NPCs, scenes, spells and items. See [The Library](https://dunjii.com/docs/organizing/library.md). ![The Home tab, showing the most recent session in the Mistwood campaign.](https://dunjii.com/docs-assets/organizing/home-tab.webp) ### Making a campaign 1. Choose **New campaign…** on the Home tab, or at the top of the sidebar when the sidebar shows **Home**. 2. Type a **Campaign name**. The line under the field shows the folder Dunjii will create. 3. Under **Player names**, type a character and a player on each row. A new row appears as you fill one. You can leave this empty. 4. Choose **Create campaign**. Dunjii creates the folder at the top of your workspace and opens it. A `metadata.md` in the folder makes it a campaign. If you typed any names, Dunjii also creates the campaign's `Party.md` with one roster row for each. ```markdown --- type: campaign --- ``` - `type: campaign`: This line is what makes the folder a campaign. The folder can have any name. To make an existing folder a campaign, right-click it in the sidebar, choose **Info**, and set **Kind** to **Campaign**. A campaign can't be inside another campaign. [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md) lists the other keys `metadata.md` takes. ![The New campaign form with two characters and their players.](https://dunjii.com/docs-assets/organizing/new-campaign-form.webp) ### The campaign page A campaign folder opens on its **Campaign** tab. - **New session** creates the next session in the campaign and opens it. See [Sessions](https://dunjii.com/docs/organizing/sessions.md). - The card names the campaign's most recent session: the one created last, or the highest-numbered one when several were created on the same day. It shows the session's planned length and number of scenes. The number of sessions in the campaign is on the right. - **Party** shows the party document: each character's class, level and player, with what they want in italics, then the **Notable items**, **In effect** and **Purse** sections. The level range is on the right. **Open the party** opens the document. A campaign with no party document shows **Add the party** instead. It creates `Party.md` with an empty roster and opens it in the editor. In the sidebar, campaigns and sessions have their own icons. While the sidebar shows a campaign, **New session** is at the top of it. ![The Campaign tab of Mistwood, with its most recent session and two characters.](https://dunjii.com/docs-assets/organizing/campaign-tab.webp) ### The party document A campaign has one party document, `Party.md`, directly in the campaign folder. It has one table row per character and three sections for what the party has and what still affects them. The players keep their own character sheets; this page is for the facts you need while you prep. The first table is the roster. `Level` is a number: for a multiclass character, write the classes under `Class` and the total level under `Level`. ```markdown --- type: party --- # Party | PC | Player | Class | Level | Wants | | --- | --- | --- | --- | --- | | Tink | Farr | Rogue | 5 | Her smithy back | | Thistle | Moss | Druid | 5 | Elmar's killer | ## Notable items - Lantern of Revealing ## In effect - Thistle owes the river hag a favor ## Purse About 340gp, and a lute nobody will buy. ``` - `type: party`: Makes this the campaign's party document, whatever the file is called. Dunjii doesn't draw the frontmatter. - `- Lantern of Revealing`: Only items that change what a scene can ask of the party. Link each one to its item page if it has one. The session page shows one line from this document above the scenes: the number of PCs, their level range and the purse. In a session summary, the `At the Table` section starts with one line per roster row. ### Tabs on a folder page | Tab | Shown on | What it shows | | -------- | ------------------------------------ | ------------- | | Home | The top of your workspace | The most recent session, or a way to start | | Campaign | A campaign folder | The campaign's sessions and party | | Session | A session folder | The summary, scenes and other files. See [Sessions](https://dunjii.com/docs/organizing/sessions.md). | | Contents | Every folder | The files and folders inside it | | Activity | A folder where files have changed | Files created, updated, moved or deleted in the folder, newest first | Dunjii remembers the tab you last chose for each kind of page, in this browser. A session you open from Home, from the campaign page or from the top of the sidebar opens on its **Session** tab. Only you and your [co-GMs](https://dunjii.com/docs/sharing/co-gms.md) see the Home, Campaign and Session tabs. A player who opens a campaign or a session through a [share link](https://dunjii.com/docs/sharing/share-links.md) sees an ordinary folder. ## Sessions A session is a folder inside a campaign for the prep of one game, with a summary, scenes, NPCs and maps. ### Making a session On a campaign's page, choose **New session**. The sidebar has the same button at the top while it shows the campaign. Inside a campaign, the **New** menu of a folder that isn't in a session also has a **Session** row. Dunjii doesn't ask for a name. It creates the next numbered session directly in the campaign folder and opens it: `Session 5` when the highest is `Session 4`, and `Session 1` in a new campaign. The new folder contains one file, `metadata.md`: ```markdown --- type: session --- ``` - `type: session`: Makes this folder a session. The folder's name can be anything. You can rename the folder afterwards. To make an existing folder a session, right-click it in the sidebar, choose **Info**, and set **Kind** to **Session**. A session has to be inside a campaign, and can't be inside another session. ![The sidebar on the Mistwood campaign, with New session at the top.](https://dunjii.com/docs-assets/organizing/campaign-sidebar-new-session.webp) ### The session page A session folder opens on its **Session** tab. From the top: - **Session summary** opens the session's summary and lists its sections. When there is no summary yet, the row says **Not started**. Click it to create one. - **Add a scene**, **Add an NPC**, **Add a map** and **Add something else…** create a file in the session folder. You can also drag files onto the page. - One line from the campaign's [party document](https://dunjii.com/docs/organizing/workspace-and-campaigns.md#the-party-document): the number of PCs, their levels and the purse. - **Scenes**, with how long each one runs and whether it will happen. - **Ways in**: each link in the scenes' `Clues` sections, and how many scenes contain it. - Every other file in the session, grouped by type. A file in a subfolder shows the subfolder's name beside it. When the summary has a `#` title, the session page uses it as its heading, so `Session 10` can show "Loudwater Arrival" instead. ![The Session tab of a session with two scenes and one NPC.](https://dunjii.com/docs-assets/organizing/session-tab.webp) ### Session summary A session has one summary document. On a session with none, click **Session summary**: Dunjii creates `Session.md` in the session folder and opens it in the editor. The suggested sections are listed in gray under the text. Click one to add it. | Section | What goes in it | | ------------ | --------------- | | At the Table | Who is playing. Dunjii writes one line per character in the party document, player first: `Farr (Tink)`. Delete anyone who isn't coming. | | Previously | Bullets to read out at the start of the session. | | Vibe | How the session should feel: how much fighting, how much talking. | | Brainstorm | Every idea you have for the session. | | Plan | What you'll run: the ideas you kept, and how they fit together. | ```markdown --- type: session-summary durationMinutes: 180 --- # Loudwater Arrival ## At the Table - Farr (Tink) - Moss (Thistle) ``` - `type: session-summary`: Makes this the session's summary, whatever the file is called. - `durationMinutes: 180`: How long the session runs, in minutes. The session page compares it with the length of your scenes. - `# Loudwater Arrival`: The session page uses this as its heading. `durationMinutes` has no button. Open **Settings** at the top of the summary in the editor and type it there. ![A session summary in the editor, with its five suggested sections.](https://dunjii.com/docs-assets/organizing/session-summary-suggestions.webp) ### Scenes **Add a scene** opens a name field in the sidebar. Type the name and press Enter: Dunjii creates the scene in the session folder and opens it. Press Esc to cancel. A scene suggests four sections: `Situation`, `Cast`, `Clues` and `Notes`. Each scene has two buttons, on the session page and at the top of the scene itself: | Button | Choices | Key it writes | | --------------- | ------- | ------------- | | How long? | Short, A chunk, Most of the session | `minutes: 10`, `30` or `60` | | Will it happen? | Must, Likely, Maybe | `expected: must`, `likely` or `maybe` | The session page lists Must scenes first, then Likely, Maybe, and scenes with no answer. Beside **Scenes** it adds up the lengths, for example `3h planned · about 2h 20m of material`. When the scenes add up to more than `durationMinutes`, it says how many scenes you'd have to cut. When a `[[link]]` is in the `Clues` of only one scene, and the session has other scenes, the session page shows a question: "Only one way in to The mill's debts. Where else could they learn it?" **Pick scenes** lists the other scenes, and Dunjii adds the link to the `Clues` of the ones you check. **Not now** hides the question in this browser. ```markdown --- type: scene minutes: 40 expected: must --- # The Tithe Barn *Tense, at the edge of the village* ## Clues - [[The mill's debts]] ``` - `minutes: 40`: Any whole number of minutes. The button offers 10, 30 and 60. - `*Tense, at the edge of the village*`: Shown beside the scene's name on the session page. - `- [[The mill's debts]]`: Each scene that links to a page counts as one way in to it. ![The menu for whether a scene will happen.](https://dunjii.com/docs-assets/organizing/scene-expected-menu.webp) ### Cast and NPCs In a scene, click the gray **Cast** section in the editor, or type `/cast`. In **Add to Cast**, search your NPC pages and the Sourcebook, check the ones in the scene, and choose **Add**. Dunjii writes a heading for each one under `## Cast`: ```markdown ## Cast ### [[Warden Hollis]] ### [[Brannoc Vey]] ``` - `### [[Warden Hollis]]`: One heading per person or creature, linked to their page. For someone with no page yet, type their name and choose **Make a page for “Brannoc Vey”**. Dunjii creates an NPC page with that name and adds it to the cast. When the scene is in a session, the new page goes in the session folder. Otherwise it goes in the Library folder that contains your NPCs, or a new `Library/NPCs`. **Add an NPC** on the session page also creates the NPC in the session folder itself, even when the session has an `NPCs` subfolder. To create one in a subfolder, right-click that folder in the sidebar and choose **New**. ![Add to Cast, searching for Warden, with the option to make a new page.](https://dunjii.com/docs-assets/organizing/add-to-cast.webp) ### The sidebar in a session When you open a session, or any file in it, the sidebar shows the whole session as a file tree. Click the arrow beside a folder to expand it in place. The line at the top shows the session's planned length and its number of scenes, or its number of files before it has a scene. Click the line to open the session page. **Add** opens the same list as **New**. You can set how the sidebar shows any folder. Right-click the folder, choose **Info**, and set **Side nav** to **File tree** or **One folder at a time**. The setting applies to the folders inside it too. A session uses **File tree** unless it, or a folder above it, sets **Side nav**. Set **File tree** on a campaign to see the whole campaign as one tree. ```markdown --- type: campaign navDisplayMode: tree --- ``` - `navDisplayMode: tree`: tree is File tree. folder is One folder at a time. Players who open a session through a share link see the same tree. ![The sidebar in Session 3, with the name field that Add an NPC opens.](https://dunjii.com/docs-assets/organizing/session-sidebar-tree.webp) ## The Library The Library is a folder for the NPCs, scenes, spells and items you use in more than one campaign. ### The Library folder `Library/` sits at the top of your workspace, next to your campaigns. Put things there that don't belong to one campaign: an NPC who could turn up anywhere, a homebrew spell, a scene you haven't placed in a session yet. It is an ordinary folder. You can rename it, delete it, or keep reusable content somewhere else. Dunjii reserves no folder names: a folder is a campaign or a session because its `metadata.md` says `type: campaign` or `type: session`, never because of what it is called. See [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md). ![The Library beside the campaigns Mistwood and Tallow.](https://dunjii.com/docs-assets/organizing/library-in-sidebar.webp) ### Shelves The folders inside the Library are its shelves, one for each kind of thing. Each shelf has a `metadata.md` that sets its icon and its `defaultType`. This is `Library/NPCs/metadata.md`: ```markdown --- icon: users defaultType: npc --- ``` - `icon: users`: The icon beside the folder in the sidebar. - `defaultType: npc`: A new document in this folder, or in any folder under it, is an NPC. | Shelf | `defaultType` | What goes there | | ----------- | ------------- | --------------- | | Abilities | `ability` | Class features, species traits and other abilities, as cards. | | Battle Maps | `battle-map` | Overhead maps to play on. | | Items | `item` | Weapons, armor, potions and other items, as cards. | | NPCs | `npc` | NPCs, monsters and creatures, with stat blocks and portraits. | | Portraits | `portrait` | Artwork of NPCs that you use more than once. | | Scenes | `scene` | Fights, locations and situations that aren't tied to a session yet. | | Spells | `spell` | Spells, as cards. | ![The Library's seven shelves.](https://dunjii.com/docs-assets/organizing/library-shelves.webp) ### Adding to a shelf Under a shelf's name in the sidebar is a button for its type: **New NPC** on NPCs, **New Spell** on Spells, **Upload Portrait** on Portraits and **Upload Battle Map** on Battle Maps. You can also drag files onto the shelf's page. Whatever you add takes the shelf's type unless it declares its own `type:`. The type comes from `defaultType`, not from the folder's name, so a renamed shelf keeps working. To make a shelf of your own, create a folder such as `Library/Villains`, right-click it, choose **Info**, and set **Default type** to NPC. ![The NPCs shelf in the sidebar, with its New NPC button.](https://dunjii.com/docs-assets/organizing/library-new-npc.webp) ### The sample library A new workspace starts empty. To look at finished examples first, click **Add sample library** on Home. Dunjii creates `Library/` with the seven shelves and puts one example on five of them: | Shelf | Example | | --------- | --------------- | | Abilities | Perfect Rhythm | | Items | Radiant Bastion | | NPCs | Eldric Vael | | Scenes | Champ's Chops | | Spells | Floral Eruption | Battle Maps and Portraits start empty, and each one's page says what belongs there. The examples are ordinary documents that you can edit or delete. The button appears only while your workspace has no `Library` folder, in any capitalization. Dunjii never adds the samples to a Library you already have. The `dunjii init` command creates the same seven shelves in a folder on your computer, without the examples. ### Using Library content in a campaign You don't copy Library content into a campaign. A link finds a document by its name anywhere in the workspace, so any session can point at the Library: ```markdown The party meets [[Eldric Vael]] at the temple gate. ``` - `The party meets [[Eldric Vael]] at the temple gate.`: Links to Library/NPCs/Eldric Vael.md from any document in the workspace. When two documents have the same name, the link goes to the one nearest the document you are writing in. Moving or renaming a document updates the links to it. - **Add to Cast** in a scene lists NPCs from your whole workspace, the Library included. If you type a name that has no page yet, Dunjii makes one: in the session's folder when the scene is in a session, otherwise on the Library shelf that holds your NPCs. See [Sessions](https://dunjii.com/docs/organizing/sessions.md). - A card sheet can list Library spells, items and abilities next to Sourcebook ones. See [Card sheets](https://dunjii.com/docs/layout-and-printing/card-sheets.md). - [Search](https://dunjii.com/docs/organizing/search.md) finds Library documents from anywhere in the workspace. ## Sourcebooks Dunjii includes the rules reference for D&D, Draw Steel and Pathfinder as read-only pages you can browse, search, link to and copy into your workspace. ### Included Sourcebooks A Sourcebook is a set of read-only reference pages for one game. Its spells, items and monsters are laid out like your own documents, with the same cards and stat blocks. Dunjii includes three: | Sourcebook | Contents | On by default | | ------------- | -------- | ------------- | | D&D SRD 5.2.1 | Spells, magic items, monsters and NPCs, classes, species, feats, backgrounds, equipment, rules and tables from the D&D System Reference Document 5.2.1. | Yes | | Draw Steel | Abilities, ancestries, careers, classes, kits, monsters, perks, titles, treasures, conditions and complications. | No | | Pathfinder 2E | Spells, feats, classes, ancestries, heritages, backgrounds, equipment, hazards, actions, conditions and rituals from Player Core, Player Core 2 and GM Core. | No | Each Sourcebook you turn on has a row in the sidebar, below History. Click it to browse the book's folders, and click **Back** at the top of the book to return to your workspace. Anyone can read the Sourcebooks without an account at [dunjii.com/sourcebooks](https://dunjii.com/sourcebooks). ![D&D SRD 5.2.1 open in the sidebar.](https://dunjii.com/docs-assets/organizing/sourcebook-sidebar.webp) ### Turning Sourcebooks on and off Go to **Settings › Account › Sourcebooks**. Each game has one checkbox, and the change saves as soon as you click it. A Sourcebook that is on appears in the sidebar and in search. Turning one off removes it from both. Links to its pages keep working. The **Primary** tag marks the game chosen under **Primary ruleset**, just above. That setting decides which document types your workspace offers, and which Sourcebook a link like `[[Fireball]]` goes to. ![The Sourcebooks section of Settings › Account.](https://dunjii.com/docs-assets/organizing/sourcebook-settings.webp) ### Links to Sourcebook pages Write a wikilink with the page's name. If no document in your workspace has that name, the link goes to the Sourcebook page, and hovering it shows a preview. ```markdown His cousin opens with [[Fireball]] from the far bank. ``` When you save, Dunjii rewrites the link to the page's public address, so the link also works in other markdown editors: ```markdown His cousin opens with [Fireball](https://dunjii.com/sourcebooks/dnd-srd-5.2.1/Spells/Fireball) from the far bank. ``` Your own documents come first. If your workspace has a document named Fireball, `[[Fireball]]` links to it and stays a wikilink. When more than one Sourcebook has a page with that name, Dunjii uses the one for the game of the document's folder (its `ruleset`), then the one for your primary ruleset. The `dunjii` command makes the same rewrite when it syncs. ### Copying a page into your workspace Copy a page when you want to change it: a monster with more hit points, or a spell renamed for your setting. 1. In the Sourcebook's sidebar, right-click a page and choose **Copy**. Copying a folder copies every page in it. 2. Click **Back**, right-click a folder in your workspace, and choose **Paste**. The menu item names what you copied, as in **Paste Feather Fall.md here**. You can also pick Sourcebook pages in [search](https://dunjii.com/docs/organizing/search.md#picking-results) and drag them to a folder in the sidebar. Either way the Sourcebook keeps its page and your folder gets a copy. The copy is an ordinary document. Dunjii adds one key to its frontmatter: ```markdown --- type: spell level: 1 school: Transmutation attribution: 5e-srd --- ``` - `attribution: 5e-srd`: Added to the copy. It names the license the text came under. ![The menu for a Sourcebook page in the sidebar.](https://dunjii.com/docs-assets/organizing/sourcebook-copy-menu.webp) ### License notices The Sourcebooks are published under open licenses, and each license asks for a notice wherever its text appears. Dunjii prints the notice under every Sourcebook page and under every document with an `attribution:` key, on screen and on paper. Turning off a document's footer with `footer: false` leaves the notice in place. When you print several documents at once, or a card sheet with Sourcebook cards on it, each notice prints once. | `attribution` | Sourcebook | License | | ------------- | ------------- | ------- | | `5e-srd` | D&D SRD 5.2.1 | Creative Commons Attribution 4.0 | | `draw-steel` | Draw Steel | DRAW STEEL Creator License | | `pf2e-orc` | Pathfinder 2E | ORC License | The full text of each notice is on the [Credits](https://dunjii.com/credits) page. ![The SRD notice under a spell copied into the Library.](https://dunjii.com/docs-assets/organizing/sourcebook-license-notice.webp) ## Search and filters Search finds documents and Sourcebook pages by name or by what they say, and filters narrow the results by type, campaign, session or a property you choose. ### Opening search Press ⌘K on a Mac, Ctrl+K elsewhere, or click **Search** at the top of the sidebar. `/` opens it too when you aren't typing in a document. Search covers every file in your workspace and every page of the [Sourcebooks](https://dunjii.com/docs/organizing/sourcebooks.md) you have turned on. With nothing typed, it lists the files you opened most recently. It also finds places in the app. Type `trash`, `billing` or `srd` and a **Go to** row opens Deleted files, Plan & usage or the D&D SRD 5.2.1. Type dice such as `2d6+3` and a **Dice** row rolls them when you press ↵. | Key | What it does | | ---------- | ------------ | | ↑ ↓ | Move through the results. | | ↵ | Open the result. | | ⌘↵ | Open it in a new tab. | | ⇧↵ | Pick it. See [Picking results](#picking-results). | | Tab | Add the filter that search offers, or jump to the next list of results. | | ↑ in the search box | Bring back an earlier search that starts with what you've typed. This browser keeps your last 25. | | esc | Close search. | On Windows and Linux, press Ctrl where this page says ⌘. ### Names and contents Results come in two lists. **File names** matches what you type against each document's name and folders, so a few letters of a name are enough. When two files match equally well, the one nearest the page you are on comes first. **In file contents** searches the text inside your documents once you have typed two characters, and shows the passage that matched. It matches whole words. Put a phrase in quotes ("silver key") to match it exactly, and put a minus before a word (-goblin) to leave out documents that contain it. Your own documents come before Sourcebook pages, and a document already listed under **File names** isn't repeated. If a word of six or more letters matches nothing, search tries the closest word in your files, up to two letters different, and says which word it used. The right side of the window shows the selected result as it looks on the page. ![Results for bell: matching names first, then documents that mention it.](https://dunjii.com/docs-assets/organizing/search-results.webp) ### Filters The row under the search box holds filters. **Type**, **In** and **Session** are on it whenever there is more than one value to choose from. **In** narrows to one campaign or one Sourcebook. **All filters…** lists everything else you can filter on, such as a spell's level, school and classes or an item's rarity, with the number of matching files beside each value. You don't have to open a menu. As you type, the row offers matching filters: typing `evoc` offers **School Evocation**, and Tab adds it. You can also type a filter as `key:value`, such as `type:spell`, and it becomes a chip. A level is a range: type `level:1-3`, or click two levels in the **Level** menu to choose everything between them. Values of one filter are alternatives: **Classes Wizard or Druid** finds either. Different filters must all match, and the row puts **and** between them. Click a chip to change its values, click its × to remove it, or press Backspace in an empty search box to remove the last one. ![Three filters: evocation spells of levels 1 to 3 on the wizard list.](https://dunjii.com/docs-assets/organizing/search-filters.webp) ### Your own properties A property you write in frontmatter yourself, such as `region:` or `faction:`, becomes a filter once you declare it. List it under `filterableProperties` in the `metadata.md` at the top of your workspace: ```markdown --- filterableProperties: [region, faction] --- ``` - `filterableProperties: [region, faction]`: Only the metadata.md at the top of the workspace can set this. ```markdown --- type: npc region: Mistwood faction: [Ashen Court, Rivermen] --- ``` - `region: Mistwood`: Filter with region:mistwood, or find Region under All filters…. - `faction: [Ashen Court, Rivermen]`: A list gives the document both values. You can also declare one from the editor. Open the document's **Settings** block: a property you can filter on has a funnel at the end of its line, labeled **Filter by Region everywhere**. Click it to add the property to `filterableProperties`, and click it again to remove it. Search picks it up at once for every document that has the property. A value can be text, a number, true or false, or a list of those. Values that look like dates, links or file paths are skipped, as are values over 64 characters. Keys that Dunjii already uses, such as `type`, `theme` and `print`, and the filter names `in` and `session` can't be declared. ![The funnel beside region: Mistwood in a document's settings.](https://dunjii.com/docs-assets/organizing/search-property-funnel.webp) ### Picking results Press ⇧↵ or click the checkbox at the left of a row to pick it. ⇧-click picks every row between the last pick and the one you click. Once you have picked something, a plain click picks or unpicks a row, and the bottom of the window counts your picks. With rows picked you can: - drag them to a folder in the sidebar, which moves your own files and copies Sourcebook pages; - press ⌘C to copy them, then **Paste** them into a folder; - press Delete (⌫ on a Mac) to delete them. Right-click a picked row for the same actions, plus one that makes a sheet when every pick is the same kind of thing: **Create card sheet from 2 cards…** for spells, items and abilities, and **Create coin sheet from 2 pictures…** for pictures. The number matches your picks. See [Card sheets](https://dunjii.com/docs/layout-and-printing/card-sheets.md). Right-click a single row for **Open in new tab** and **Copy link**, or a folder for **Info**. ![The menu for two picked spells.](https://dunjii.com/docs-assets/organizing/search-picked-menu.webp) ## Folder settings A folder's metadata.md says what the folder is, which game it is written for, and how everything inside it looks. ### The metadata file Every folder can hold a `metadata.md`. Its frontmatter is the folder's settings. When you change a folder's icon, type or theme in the app, Dunjii writes this file. You can edit it by hand too. ```markdown --- type: campaign ruleset: draw-steel theme: clean-lines defaultType: npc --- ``` - `type: campaign`: This folder is a campaign. Its subfolders stay plain folders. - `ruleset: draw-steel`: Every document under this folder is typed and checked as Draw Steel. - `theme: clean-lines`: Every page under this folder prints in Clean Lines. - `defaultType: npc`: An untyped document created in this folder, or in any folder under it, becomes an NPC. Dunjii checks each value when it saves the file. A value it does not recognize is dropped, and the folder behaves as if the key were missing. ### Settings that apply to all subfolders These keys apply to the folder and to every folder under it. A subfolder that sets the same key wins for itself and everything under it. | Key | What it does | | -------------- | ------------ | | `ruleset` | The game the documents are written for: `5e-srd`, `draw-steel` or `pf2e`. Changing it retypes every document under the folder. | | `theme` | How pages look on screen and in print. | | `defaultType` | The type a new document or image takes when it does not declare one. | | `footer` | `false` turns off the footer you write. A license notice that a copied Sourcebook page needs still prints. | | `footerPreset` | A ready-made footer line. | | `footerText` | Your own footer line. | | `footerDunjii` | `false` takes the Dunjii credit off the footer. On the free plan the credit stays. | The built-in themes: | Theme | Value | | --- | --- | | Classic Parchment (Color) | `classic-parchment` | | Clean Lines (B&W) | `clean-lines` | The footer presets: | Footer | Value | | --- | --- | | No notice | `none` | | Unofficial Fan Content (Wizards of the Coast) | `wotc-fan-content` | | SRD 5.2.1 attribution | `srd-attribution` | ### Settings for this folder only | Key | What it does | | ---------------------- | ------------ | | `type` | `campaign` or `session`. This key alone makes a folder a campaign, a session. Leave it unset to keep it a plain folder. | | `icon` | The icon beside the folder in the sidebar. Pick one in the app; it writes the key. | | `navDisplayMode` | `tree` opens the sidebar here as an expanding tree. `folder` opens one level at a time. Folders under this one follow it until one of them sets its own. Sessions default to `tree`. | | `filterableProperties` | Only in the `metadata.md` at the top of your workspace. The frontmatter properties you can filter on in search. | Note that some folder nestings are invalid. For example, putting a campaign inside a session, or a session inside another session, doesn't make sense and will fail validation. ### Type and defaultType The two keys look alike but do different things. `type` says what the _folder_ is: a campaign, a session, or a plain folder. `defaultType` says what new things inside it become if a specific type is not set. A `Library/NPCs` folder with `defaultType: npc` makes every new document in it an NPC, and the folder itself stays a plain folder. A document's own `type:` always beats the folder's `defaultType`. See [Document types](https://dunjii.com/docs/reference/document-types.md) for the values each game offers. ## The editor Write a page in Edit, where markdown shows formatted as you type and Dunjii saves your changes every 15 seconds. ### View and Edit Every document has a switch at the bottom of the window. **View** shows the page as it prints. **Edit** opens the same page for writing. A document that prints as pages also has **Layout**, for pictures, washes and page setup: see [Page layout](https://dunjii.com/docs/layout-and-printing/page-layout.md). ![The switch at the bottom of a document, in Edit.](https://dunjii.com/docs-assets/writing/editor-mode-switch.webp) The switch stays where you leave it: if you are in Edit, the next document you open also opens in Edit. ⌘⇧E on a Mac, Ctrl+Shift+E elsewhere, switches between View and Edit, and ⌘⇧L opens Layout. In Edit you write markdown, and the editor formats it as you type. Text between `**` shows as bold, a `##` line shows as a heading, a table is a grid you type into, and an image shows the picture. The markdown stays in the file. To see the file as plain text, press ⌥⇧M (Alt+Shift+M); a **Markdown** button appears in the switch to take you back. The syntax is in [Markdown in Dunjii](https://dunjii.com/docs/reference/markdown.md). Dunjii saves 15 seconds after your first change, and every 15 seconds while you keep typing. It also saves when you switch to View or leave the page, and ⌘S saves at once. While a save runs, the **Edit** button shows a spinner and then a check mark. A crossed-out cloud means you are offline and the change is not saved yet; a warning sign means the save failed. ⌘Z undoes changes made since you opened the document. When there is nothing left to undo, Dunjii shows a message with a link to [version history](https://dunjii.com/docs/your-files/version-history.md), where the earlier versions are. ### Formatting Select text and a toolbar appears above it: **B** for bold, **I** for italic, **Highlight** and **Link**, plus **Blockquote** and **Callout** where they apply. A button that is already on takes the formatting off. ![The toolbar over two selected words.](https://dunjii.com/docs-assets/writing/editor-selection-toolbar.webp) The same formatting has keys. On Windows and Linux, use Ctrl for ⌘ and Alt for ⌥. | Keys | Does | | --------------- | ---- | | ⌘B, ⌘I | Bold, italic | | ⌘E | Inline code | | ⌘⇧H | Highlight | | ⌘⇧X | Strikethrough | | ⌘⌥1 to ⌘⌥6 | Heading 1 to 6 | | ⌘⌥0 | Plain paragraph | | ⌘⇧8, ⌘⇧7 | Bullet list, numbered list | | ⌘⇧B | Blockquote | | Tab, ⇧Tab | Indent or outdent a list item | | ⌥↑, ⌥↓ | Move the line or block up or down | | ⌘F | Find and replace in the document | ### Links Type `[[` and the start of a name. Dunjii lists matching documents in your workspace and pages in your Sourcebooks. Use ↑ and ↓ to pick one, and Enter or Tab to insert it. Type `![[` to pick an image instead. ![Matching pages after typing the start of a name.](https://dunjii.com/docs-assets/writing/editor-link-completion.webp) ```markdown Owes a favor to [[Eldric Vael]]. Knows [Fireball](https://dunjii.com/sourcebooks/dnd-srd-5.2.1/Spells/Fireball). ``` - `Owes a favor to [[Eldric Vael]].`: A document in your workspace, by name. - `Knows [Fireball](https://dunjii.com/sourcebooks/dnd-srd-5.2.1/Spells/Fireball).`: A Sourcebook page is written as its full address. When two of your documents have the same name, Dunjii writes a link to the one you picked by its path, so the link goes to that one. To make a link from words already on the page, select them and press **Link** in the toolbar. Dunjii wraps them in `[[ ]]` and opens a panel with the words as the page name. Press Enter to keep it. To link to a different page, type that page's name, pick it from the list and press Enter: the words you selected stay as the link text. ```markdown Owes a favor to [[Eldric Vael|the old scholar]]. ``` - `Owes a favor to [[Eldric Vael|the old scholar]].`: Links to Eldric Vael. The page shows "the old scholar". Every link has a small chain button after it. Press it, or ⌘↵ with the caret inside the link, to open the same panel: change where the link goes, **Open in a new tab**, or **Remove link**. Rest the pointer on a link to see a preview of its page. ### Blocks A block is a paragraph, heading, list, table, callout or image. Click into one and an icon for it appears in the left margin. Click the icon, or press ⌘/, to open the block's menu. **Block type** turns a paragraph into a heading or a list, or one kind of list into another. Under it are the block's settings: alignment, a drop cap and whether it may split across a page break for a paragraph; width, borders, column widths and scale for a table; a layout for a list. Dunjii saves these settings in a comment line above the block, which other markdown editors hide: ```markdown Takes anyone across the river for two copper and asks no questions after dark. ``` - ``: Drop cap, and Keep together. On an empty line the icon is a **+**. Click it for the insert menu, or type `/` at the start of the line for the same list from the keyboard: `/table`, `/callout` and so on. The rows under **Insert** add the block at once. The rows under **Choose** open a picker first: **Stat block…** starts from a creature or another NPC ([Stat blocks](https://dunjii.com/docs/writing/stat-blocks.md)), **Image…** adds a picture ([Images](https://dunjii.com/docs/writing/images.md)), and **Random…** draws a line from a table ([Random tables](https://dunjii.com/docs/writing/random-tables.md)). ![The insert menu on an NPC.](https://dunjii.com/docs-assets/writing/editor-insert-menu.webp) Some document types add rows of their own: a scene adds `/cast`, a card sheet adds `/cards`, and on a shop `/table` writes the stock table. ### Suggested sections In Edit, a document with a type shows the sections and blocks that type usually has, grayed, at the end of the page. They are not in the file until you add them. A new NPC shows **Stat block**, **Portrait**, **First Impression**, **Voice** and **Secrets**. Each type's sections are listed in [Document types](https://dunjii.com/docs/reference/document-types.md). ![An NPC with First Impression and Voice added, and three suggestions left.](https://dunjii.com/docs-assets/writing/editor-suggested-sections.webp) Click a row to add it: - A section adds its heading and a line of sample text, selected, so what you type replaces it. - A section with no sample text, such as a spell's **Card Description**, opens a box to write in. Press the **Add** button, or leave the box empty to add the heading alone. - **Stat block** opens a picker: start from a creature in the Sourcebook, from another NPC, or with an empty stat block. - **Portrait** opens your pictures. ```markdown ## First Impression - Rope-burned hands, a lantern hooked to her belt ## Voice "Two copper. Three if it bites." ``` - `- Rope-burned hands, a lantern hooked to her belt`: Click First Impression, then type over the sample line. - `"Two copper. Three if it bites."`: Voice puts your line in quotes. A row goes away once the document has that section. To hide the rest, click the arrow in the margin beside the first row (**Hide suggestions**). Click it again (**Show 3 suggestions**) to bring them back. Dunjii remembers this for each document, in this browser. ### Document settings The **Document settings** button is in the row of buttons at the top right of a document. It lists this document's settings, one line each with the value in use. Click a line to change it. ![Document settings for an NPC, with the Type line open.](https://dunjii.com/docs-assets/writing/document-settings.webp) **Type** sets what the document is, and writes `type:` in its frontmatter. The first option in the list removes `type:`, and the document then takes its folder's `defaultType`, if the folder has one. While it does, the line reads **NPC (folder)**. A card sheet adds **Cards** ([Card sheets](https://dunjii.com/docs/layout-and-printing/card-sheets.md#settings)), and card and coin sheets add **Paper**, **Margins** and **Footer**. A document that prints as pages sets its paper, margins and footer in **Layout** instead. In Edit, the **Settings** row at the top of the page shows the same frontmatter. Click **Settings** to open it as text. Properties the type defines, such as an NPC's **Creature Type** and **Category**, appear under it as menus. ```markdown --- type: npc creature-type: Humanoid --- # Orla Fenwick ``` - `type: npc`: Type, in Document settings. - `creature-type: Humanoid`: Creature Type, in the Settings row. ## New documents Make a page, folder, map or typed document in any folder, or bring in files you already have. ### The New menu Right-click a folder in the sidebar, or click the **⋯** beside it, and point at **New…**. The list starts with **Page**, **Folder**, **Image** and **Map**, plus **Session** in a campaign. Under **Suggested** are up to three document types that fit the folder, such as **NPC** in an NPCs folder. Type in the **Find any type…** field to find any other type. The **New file** button on a folder's page shows the same list, without **Folder** and **Session**. ![The New… list from the menu of the NPCs folder.](https://dunjii.com/docs-assets/writing/new-menu.webp) - A document type, such as **NPC** or **Spell**, asks for a name in the sidebar. - **Page** opens the **New file** dialog, which asks for a name and a type together. - **Folder** and **Map** ask for a name in the sidebar. A map opens in the map editor: see [Maps](https://dunjii.com/docs/writing/maps.md). - **Image** opens the image dialog: see [Images](https://dunjii.com/docs/writing/images.md). - **Session** adds the campaign's next numbered session and opens it: see [Sessions](https://dunjii.com/docs/organizing/sessions.md). ### Naming a file When you pick a type, a field appears in the sidebar where the file will go, with a prompt such as "Name your NPC". Type a name and press Enter. Dunjii creates the file and opens it in Edit. ![The name field for a new NPC in the sidebar.](https://dunjii.com/docs-assets/writing/new-file-name-field.webp) Press Escape to cancel; nothing is written. If you click away from the field without typing, Dunjii creates the file as `Untitled` (`Untitled Folder` for a folder). If the name is taken, Dunjii says so and opens the field again with your name in it. ```markdown --- type: npc --- # Orla Fenwick ``` - `type: npc`: The type you picked. - `# Orla Fenwick`: The name you typed. The file is Orla Fenwick.md. The file name and the `#` title are the same name. Rename the file in the sidebar and the title changes with it. Change the title in the editor, and Dunjii renames the file when the caret leaves the title line. This works while the title is the first line of the page and matches the file name. ### The New file dialog **Page** opens **New file**. Type a name, pick a type, and press **Create**. The button names the type: **Create Page**, **Create Scene**. ![The New file dialog in the Mistwood campaign.](https://dunjii.com/docs-assets/writing/new-file-dialog.webp) The types are grouped under **Prep**, **Print** and **Rules & homebrew**. In a folder with a `defaultType`, that type comes first, under **This folder's type**. Leave **Page** selected for a plain page, saved as `type: document`. Which types appear depends on the game the folder is set to: see [Document types](https://dunjii.com/docs/reference/document-types.md). ### Folder buttons Some folders have a button that skips the menu. It sits under the folder's name in the sidebar. | Folder | Button | Makes | | ------ | ------ | ----- | | A folder with a `defaultType`, such as `Library/NPCs` | **New NPC** | A document of that type, named in the sidebar | | A folder of pictures, such as `Library/Portraits` | **Upload Portrait** | Uploads pictures you pick on your computer | | A campaign | **New session** | The campaign's next session | | The top of your workspace | **New campaign…** | A campaign, after asking for its name | A session's own page has **Add a scene**, **Add an NPC** and **Add a map**, which put the new file in the session folder, and **Add something else…**, which opens the New list. See [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md) for `defaultType`. ### What a new document starts with Most types start with the title and nothing else. In Edit, the sections the type usually has are listed at the end of the page, grayed, until you add them: see [Suggested sections](https://dunjii.com/docs/writing/the-editor.md#suggested-sections). A card sheet or coin sheet starts with no title at all, because its name is the file's. ![A new shop, with its stock table and the buttons under it.](https://dunjii.com/docs-assets/writing/new-shop.webp) Three types start with more in the file: - A **Spell** starts with its card properties filled with example values (level 1, Evocation, 60 feet) and a line of example text to replace. - An **Item** starts with example properties (Wondrous Item, Uncommon) and a line of example text. - A **Shop** starts with an empty stock table, with Item, Price and Qty columns, and the caret in its first cell. Under it, **Add typical stock…** lists what a kind of shop usually sells, and **Add specific items…** searches the items in your workspace and Sourcebooks. ### Uploading files Open a folder and drop files anywhere on the page, or press **Upload files**. A markdown file becomes a document, an image goes into the folder, a `.zip` is unpacked, and a `.csv` becomes one page per row or one page with a table. A markdown file with no `type:` gets one when its text makes the type clear, and otherwise takes the folder's `defaultType`. [Download and import](https://dunjii.com/docs/your-files/download.md) lists the file types and limits, and covers Obsidian and Notion exports. ![The import list for six notes with no type.](https://dunjii.com/docs-assets/writing/import-review.webp) When three or more files have a type Dunjii is unsure of, or five or more have no type, Dunjii lists the files before it imports them. Set a type on each row, or select several rows and set them together, then press **Import 6 files** (the button counts them). You can also paste onto a folder page. Text of 25 words or more becomes a new page, or several pages when it repeats a structure, such as one heading per NPC. Dunjii asks before it uploads a copied image. An image dropped on a document in View goes into that document's folder; in Edit it goes into the page where you drop it ([Images](https://dunjii.com/docs/writing/images.md)). With the desktop app, files you add to your synced folder upload on their own: see [Desktop app](https://dunjii.com/docs/your-files/desktop-app.md). ## Stat blocks Write a creature's stat block for D&D 5e, Draw Steel or Pathfinder 2E, copy one from a Sourcebook, and roll its dice on the page. ### D&D 5e A stat block is a callout that holds lists and a table. A comment line above each list or table sets how Dunjii draws it. A stat block can go on any page. ```markdown --- type: npc --- # Mire Hound *Medium Monstrosity, Unaligned* > [!callout] > > > - **AC** 13 > - **HP** 33 > - **Speed** 40 ft. > > > > | Ability | Score | Mod | Save | > | :------ | :---: | :----: | :----: | > | STR | 15 | **+2** | +2 | > | DEX | 14 | **+2** | +2 | > | CON | 14 | **+2** | +2 | > | INT | 3 | **-4** | -4 | > | WIS | 13 | **+1** | **+3** | > | CHA | 6 | **-2** | -2 | > > > > - **Init** +2 > - **Perception** +5 · **Stealth** +4 > - **Passive Perception** 15 > - **CR** 2 · XP 450 > > ### Actions > > > > - **Bite:** ==+4==, ==9== (2d6 + 2) piercing, reach 5 ft. ``` - `type: npc`: Any page can hold a stat block. An NPC page offers to add one. - `> [!callout]`: The box around the stat block. - `> `: AC, HP and Speed, drawn as three boxes. - `> `: One row per ability, drawn in three groups as the 2024 Monster Manual prints them. - `> | WIS | 13 | **+1** | **+3** |`: A save that differs from the modifier is bold. - `> `: The details, side by side and a size smaller. - `> `: One entry per line, without bullets. - `> - **Bite:** ==+4==, ==9== (2d6 + 2) piercing, reach 5 ft.`: The attack bonus and the average damage are highlighted. [Markdown in Dunjii](https://dunjii.com/docs/reference/markdown.md#block-layouts) lists the layouts. The **Ruleset** in a folder's **Info** decides which of the three layouts on this page `/statblock` writes there, and which Sourcebook it copies from. Dunjii saves it as `ruleset:` in the folder's `metadata.md`: see [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md). ### Draw Steel A Draw Steel stat block has two rows of boxes: Size, Speed, Stamina, Stability and Free Strike, then the five characteristics. Each ability is a `###` heading with its keywords, action, distance and target, then the power roll and its three tiers. ```markdown # Bog Wight *Level 2 Horde Brute · EV 4 · Undead* > [!callout] > > > - **Size** 1M > - **Speed** 5 > - **Stamina** 20 > - **Stability** 1 > - **Free Strike** 2 > > > > - **Might** +2 > - **Agility** 0 > - **Reason** −2 > - **Intuition** 0 > - **Presence** −1 > > ### Drowning Grip (Signature Ability) > > > > - **Keywords** Melee, Strike, Weapon > - **Action** Main action > - **Distance** Melee 1 > - **Target** One creature > > **Power Roll + 2** > > > > - **≤11** 3 damage > - **12–16** 5 damage > - **17+** 6 damage; grabbed ``` - `> `: A row of four or more boxes draws its numbers smaller. - `> - **17+** 6 damage; grabbed`: The tiers are text. Dunjii does not roll a power roll. The Draw Steel Sourcebook holds the monsters from *Draw Steel: Monsters*. It is off until you switch it on: see [Sourcebooks](https://dunjii.com/docs/organizing/sourcebooks.md). ### Pathfinder 2E A Pathfinder 2E stat block follows the book's order: senses and skills, the six attribute modifiers, then AC, saves and HP, then speed and Strikes. Action costs are written as characters: ◆, ◆◆ and ◆◆◆ for one to three actions, ⟲ for a reaction and ◇ for a free action. ```markdown # Marsh Goblin *Creature −1 · Small · Goblin, Humanoid* > [!callout] > > > - **Perception** +2; darkvision > - **Languages** Common, Goblin > - **Skills** Acrobatics +5, Stealth +5 > > > > - **Str** +0 > - **Dex** +3 > - **Con** +1 > - **Int** +0 > - **Wis** −1 > - **Cha** +1 > > > > - **AC** 16 > - **Fort** +5 > - **Ref** +7 > - **Will** +3 > - **HP** 6 > > > > - **Speed** 25 feet > - **Melee** ◆ dogslicer ==+7== (agile, finesse), **Damage** 1d6 slashing ``` - `> - **Melee** ◆ dogslicer ==+7== (agile, finesse), **Damage** 1d6 slashing`: A highlighted bonus rolls 1d20 + 7. The Pathfinder 2E Sourcebook does not include creatures, so a Pathfinder stat block starts from one of your own creatures or from an empty one. ### Adding a stat block 1. In Edit, put the cursor on an empty line and type `/statblock`, or click the **+** and choose **Stat block…** from the menu. On an NPC page that has no stat block, you can also click the gray **Stat block** row. 2. In **Where should it start?**, type a creature's name. The list holds your own creatures and the Sourcebook's, for the folder's game only. On a wide window, a preview shows the stat block that will be copied. 3. Click a creature or press Enter. Dunjii copies its stat block onto your page, where you can change it. **Start empty** adds a blank stat block instead. ![The stat block dialog after typing "wolf".](https://dunjii.com/docs-assets/writing/stat-block-seed-dialog.webp) To copy a whole creature page, copy it from the Sourcebook in the sidebar and paste it into one of your folders. See [Sourcebooks](https://dunjii.com/docs/organizing/sourcebooks.md). When you [import pages](https://dunjii.com/docs/writing/new-documents.md), Dunjii rewrites a stat block written as bold lines (`**Armor Class** 15`) or in an Obsidian `ad-statblock` block into the D&D 5e layout above. ### Rolling In View, dice in a stat block are buttons. Click `2d6 + 2` to roll it, or click a highlighted attack bonus such as `==+4==` to roll 1d20 + 4. A box opens beside it with each die, the total and **Roll again**. In Edit, rest the pointer on the dice and click **Roll** instead. ![The roll for a Bite attack's +4.](https://dunjii.com/docs-assets/writing/stat-block-roll.webp) A highlighted number without a sign, such as the average damage `==9==` or a saving throw's `==DC 14==`, is only highlighted and does not roll. The rules for which text rolls are in [Markdown in Dunjii](https://dunjii.com/docs/reference/markdown.md#highlights-and-rolls). ## Random tables A random table is a page of results that you roll on in View, or draw from with /random while you write. ### The file A random table is a page with `type: random-table` and a list of results. To make one, open **New…** on a folder, type `random` and choose **Random Table**. A table can go in any folder, so a campaign's rumors can sit in the campaign. ```markdown --- type: random-table singular: Rumor --- # Rumors - The miller's daughter walks into the bog every new moon - Someone paid the toll at the rope bridge in old silver - The tithe barn was built on a barrow ``` - `type: random-table`: Makes this page a random table. - `singular: Rumor`: What one result is called in the /random list. Without it, the list uses the heading. - `# Rumors`: The table's name. - `- The miller's daughter walks into the bog every new moon`: One result per line. Each line has the same chance. A numbered list works the same way. Dunjii reads up to 200 lines and skips a line longer than 500 characters or one that starts with markdown punctuation such as `**`, `#` or `>`. A table with no lines is left out of `/random`. ### Dice tables A table whose first column is a die works like a table printed in a book: each row has the chance of the faces it covers. ```markdown --- type: random-table --- # Mistwood Encounters | d8 | Encounter | | --- | --- | | 1-2 | 1d4 mire hounds circling the camp | | 3 | A charcoal burner who has lost his way | | 4 | Fresh tracks of something large and barefoot | | 5-6 | Fog thick enough to hide the path for 2d10 minutes | | 7 | A bog wight standing still in the reeds | | 8 | Warden Hollis and two scouts on patrol | ``` - `| 1-2 | 1d4 mire hounds circling the camp |`: Covers two faces, so it comes up twice as often as row 3. The first column is a die when its header is a die, such as `d20` or `2d6`, or when every row in it is a number or a range. With `2d6` in the header the rows follow the odds of the total, so 7 comes up six times as often as 2. On a d100, `00` is 100. A row the dice cannot roll is skipped, and when a row has more than one result column, the columns are read as one result. ### Rolling on the page Open the table in View. A bar at the bottom of the window shows a die, a box for the number and the result. - Click the die in the bar to roll. Dunjii marks the row the roll picks and shows its text in the bar, with any dice in it rolled: `1d4 = 3 mire hounds circling the camp`. - To use your own dice, type the number you rolled. Dunjii marks the row for that number. - On a page with more than one dice table, click the die in a table's header to roll that table. ![A d8 table after typing 2: the row for 1-2 is marked.](https://dunjii.com/docs-assets/writing/random-table-roll.webp) The bar rolls the die in the table's header. A list rolls a die with one face per line, so a list of six rumors rolls a d6. Players who open the table from a share link can roll it the same way. Only a Random Table page rolls by row. A dice table on any other page keeps its dice buttons, and they roll a number without marking a row. ### /random in the editor In Edit, type `/random` and part of a table's name, then press Enter. Dunjii writes one result where you typed and selects it, so you can see which words came from the table. Press Enter again, or click **Roll again**, to replace it with another result. Press → or ← to keep it and go on typing. ![Typing /random rum offers the Rumor table from the Mistwood campaign.](https://dunjii.com/docs-assets/writing/random-command.webp) **Random…** in the editor's **+** menu opens the same list in a box. Before you type, the list shows the last five tables you picked in this browser, or **Name** if you have not picked one yet. It holds your own tables and Dunjii's built-in ones: Name, Appearance, Quirk, Secret, and a stock list for each kind of shop. When two of your tables have the same name, the one nearest the page you are writing comes first, so a session's Rumors comes before the campaign's. `/random` also works in a table cell. There, **Roll again** is a row in the menu under the cell. On your computer, `dunjii random rumors` draws from the same tables. ## Images and page art Add pictures to a page, place them anywhere on the printed sheet with the text wrapping around them, and credit the artist. ### Adding an image In the editor, paste a picture (⌘V on a Mac, Ctrl+V elsewhere) or drag a picture file onto the page. Type `/image`, or choose **Image…** in the insert menu, to open **Add an image**, which has three tabs: - **Choose an image** finds a picture already in your workspace. - **Upload** takes a file from your computer. - **Token Maker** makes a 1-inch token. See [Coin sheets](https://dunjii.com/docs/layout-and-printing/coin-sheets.md). ![Add an image, filtered to two pictures.](https://dunjii.com/docs-assets/writing/add-image-dialog.webp) An uploaded or pasted picture goes in an `images` folder beside the document, with 8 characters added to its name so that names don't collide. Dunjii writes a markdown image link at that spot in the document. You can also type `![[name.jpg]]` to show any picture in the workspace by its name. ```markdown ![hill-folk-00d681f2](images/hill-folk-00d681f2.jpg) ``` - `![hill-folk-00d681f2](images/hill-folk-00d681f2.jpg)`: What Dunjii writes for an uploaded hill-folk.jpg. Uploads take PNG, JPEG, WebP or GIF, up to 5 MB each. The free plan allows 10 pictures in a workspace; Pro has no picture limit and takes files up to 50 MB. ### The metadata file A picture can have a `.metadata.md` file beside it with the same name: `hill-folk.metadata.md` for `hill-folk.jpg`. Dunjii creates it when you change one of the picture's settings on its page. The body is kept for your notes; the picture's page doesn't show it. ```markdown --- type: image credit: "John Bauer, 1913" --- Painted for a 1913 book of Swedish folk tales. ``` - `type: image`: image, portrait, battle-map or overview-map. The menu at the top of the picture's page sets it. - `credit: "John Bauer, 1913"`: Copied onto the page as the picture's credit when you add the picture. A picture with no `type:` takes its folder's `defaultType`, so a picture in **Library** › **Portraits** is a portrait. Battle maps and overview maps keep their settings here too: see [Battle maps](https://dunjii.com/docs/layout-and-printing/battle-maps.md) and [Maps](https://dunjii.com/docs/writing/maps.md). On a plain picture's page, **Replace image** swaps in a new file. You can also drop a file on the picture. ### Page art Page art is a picture fixed to a spot on a printed page, with the text wrapping around it. Switch the document to **Layout** and click a picture. Its bar has four tabs: **Position**, **Mask**, **Style** and **Text**. In Edit, a picture on its own line shows as a card, and its **Edit** button opens Layout on that picture. ![A picture fixed to the page, with the Anchor menu open.](https://dunjii.com/docs-assets/writing/layout-anchor.webp) On **Position**, **Anchor** sets **Inline**, where the picture moves with the text between the paragraphs around it, or **Fixed**, where you drag it anywhere on any page. A fixed picture has corners to resize it and a dot to turn it. On **Text**, **Wrap** sets whether text goes around the picture or over it. Drag the handles on the outline to set how close the text comes on each side. With text over the picture, **Backdrop** sets how much paint goes under the text so it reads, and whether the text is dark or light. Choose **View** or **Edit** to leave Layout, and Dunjii writes the changes into the image link. Positions and widths are percentages of the paper's width, so the picture keeps its place on Letter or A4. ```markdown ![The hill folk](images/hill-folk.jpg#page=1&anchor=right&x=11&y=-20&w=30) ``` - `![The hill folk](images/hill-folk.jpg#page=1&anchor=right&x=11&y=-20&w=30)`: page: the page it is on. anchor: the point of the paper x and y are measured from, such as top-left, right or bottom. x and y: the distance from the anchor, toward the middle of the page. w: the width. More keys go after these: `rotate=` for the turn, `margin=` for the text's distance in inches (0.13 by default), and `wrap=none` for text over the picture. ### Masks and styles **Mask** crops the picture. **Rectangle** crops it by its edges. **Drawn** lets you paint what shows with a brush and an eraser, and **Fit to subject** paints around whatever isn't background. A drawn mask is saved as a PNG in `images/masks`. ![The six soft edges on the Style tab.](https://dunjii.com/docs-assets/writing/soft-edge-looks.webp) **Style** sets the picture's edge: - **Frame**: **None**, **Plain**, **Ornate** or **Sketched**. F turns the plain frame on and off. - **Look**: a soft edge, **Gradient**, **Watercolor**, **Pencil**, **Torn**, **Spatter** or **Brush**, with **Depth** for how far it reaches in. **Sides** picks which sides get it. - **Paint behind**: paint in two of the picture's own colors, past its edge. - **Opacity**: from 5 to 100%. Drawn masks, the Ornate and Sketched frames, every soft edge but Gradient, and Paint behind need Pro. Without Pro, a styled frame prints as the plain frame, a styled edge as Gradient, and a drawn mask as a rectangle crop. ### Image credits A selected picture in Layout shows its credit, or a dashed **Uncredited** label where a credit would go. Click it, type the artist's name, and press Enter. Shift+Enter starts a new line and Esc cancels. Credits are free on every plan. ![A credit on page art, selected, with its bar.](https://dunjii.com/docs-assets/writing/image-credit.webp) Drag the credit anywhere on the picture or a little past its edge. Its corners set the size, from 6 to 24 points, and the dot above it turns it. Its bar sets **Look** (Blend, Quiet, Plain or Label), **Colors**, the alignment, and a **Link** for the screen. Delete removes it. The words are the link's title, and `credit=` places them. A title without `credit=` stays a tooltip and does not print. ```markdown ![The hill folk](images/hill-folk.jpg#page=1&anchor=right&x=11&y=-20&w=30&credit=on:bottom-right&credit-look=quiet "John Bauer, 1913") ``` - `![The hill folk](images/hill-folk.jpg#page=1&anchor=right&x=11&y=-20&w=30&credit=on:bottom-right&credit-look=quiet "John Bauer, 1913")`: credit=on:bottom-right: on the picture's bottom right corner, where a new credit on page art starts. A picture in the text starts with under:right. credit-look=quiet: small capitals on a soft shade. ### Page washes A wash is a patch of paint on the printed page, placed after the text is laid out and kept clear of pictures where it can be. The Classic Parchment (Color) theme draws two watercolor washes on every page, on every plan. Clean Lines (B&W) draws none. ![A wash selected in Layout, with its bar.](https://dunjii.com/docs-assets/writing/page-wash.webp) In Layout, every wash has a handle on the paper. Click it to drag the wash, or to change its style and **Strength** from its bar. **Wash** above a page adds one, up to four a page. A page's own washes need Pro; removing them works on any plan. ```markdown --- washes: - page: 1 strength: 69 - page: 1 - page: 2 style: none --- ``` - `strength: 69`: The theme's first wash on page 1, made stronger. - `- page: 1`: The theme's second wash on page 1, unchanged. - `style: none`: No washes on page 2. ## Maps Draw a map of a dungeon, cave or village in Dunjii, number its areas, and show it in your session pages. ### Making a map On a session's page, choose **Add a map**. Anywhere else, choose **New file**, then **Map**. Type a name in the sidebar and press Enter, and the map editor opens. ![The tool bar: Sketch, Terrain, Brush, Shape and Text.](https://dunjii.com/docs-assets/writing/map-maker.webp) A new map is 40 × 28 squares of solid rock that you draw rooms into. For a cave or a village, choose **Open floor** under **Start as** at the bottom left, and erase walls and rock out of open ground instead. The choice goes away once you draw something. Dunjii saves a map as two files: `Barn Cellars.svg` contains the drawing, and `Barn Cellars.metadata.md` contains the labels, the key and the print settings. The map takes its colors from the theme of the page it is shown on. ### Drawing The tools are on the bar at the top of the editor. Each has a key. | Tool | Key | What it does | | ---- | --- | ------------ | | **Sketch** | K | Paints floor. Dunjii reads each stroke as a room or a hallway, and draws the walls and the rock around the floor for you. | | **Erase** | E | Erases floor. X switches between Sketch and Erase. Hold ⌥ to do the other for one stroke. | | **Terrain** | W | What Sketch paints: Floor, Water, Trees, Rocks or Trail. | | **Brush** | [ ] | Squares, or Round, for caves (Q switches). 1, 2, 3 or 5 squares wide, or any width from 0.1 to 5. Wall draws walls inside a room. | | **Shape** | R, O, S | A rectangle, ellipse or star. A shape can be an outline, solid or hatched, and can hold a word such as "Table". A small shape across a wall reads as a door. | | **Text**, **Number** | T, L | Words on the map, or a number for the key. | Hold Shift to paint a straight line. Strokes snap to the grid; hold ⌘ on a Mac, Ctrl elsewhere, to draw freehand. Press the grip in the middle of a room to move it, and its hallways follow. To curve a hallway, select one of its points and choose **Make it smooth**, or double-click the point. ⌘Z undoes. ### Labels and the key Press L and click a room to put a number on it, then type the room's name. The number and the name go into the key beside the map. Numbers count up in the order you place them. Press T to write text on the map instead. ![A selected number with its name and the note it opens.](https://dunjii.com/docs-assets/writing/map-label.webp) A selected label's bar has: - the kind: **Number in a disc**, **Plain number** or **Text** - the name that goes in the key - **Link to a note or map**, which completes as you type. A linked number, and its line in the key, open that note. Drag a corner of a label to change its size, from 3 to 36 points. Turn a text label with the dot above it. **Key** on the bar at the bottom lists every number, and picking one selects it. ### Map settings **Map settings** on the bar at the bottom of the editor opens the settings for the whole map. ![The map settings.](https://dunjii.com/docs-assets/writing/map-settings.webp) - **Squares**: how many squares across and down, from 4 to 100. You can also drag from outside an edge of the paper with Sketch. - **Grid snap**: what strokes and drags snap to, ¼, ½, 1 or 2 squares. - **Rock**: how the rock around the rooms is drawn: Ink and wash, Contour and wash, Broken strata, Line engraving or Crosshatch. - **Printed width**: from 4 to 120 inches. **Fit one page** prints the map and its key as large as fits on one page of your paper. - **Clear map**: **All rock** or **All floor**. The labels and settings are in the `.metadata.md` file. A key at its default is left out. ```markdown --- type: overview-map overviewMap: outputWidthIn: 9.7 fitPage: true snapSquares: 0.5 rockStyle: strata legendPlacement: right labels: - text: Tithe store xPx: 2600 yPx: 500 numeric: true fontPt: 20 link: "[[The Tithe Barn]]" --- ``` - `fitPage: true`: Printed width, and Fit one page. - `rockStyle: strata`: Grid snap and Rock. - `legendPlacement: right`: Where the key goes: right, left, or float for a box on the map. - `yPx: 500`: Where the label is, at 100 pixels to a square. - `numeric: true`: A number in the key. false writes the text on the map. - `link: "[[The Tithe Barn]]"`: The note the number opens. ### Maps in pages Embed a map by its file name. Dunjii draws it in the page's theme, with its key under it. When you change the map, every page that embeds it shows the change. ```markdown ![[Barn Cellars.svg]] ``` ![The map embedded in a page, with its key.](https://dunjii.com/docs-assets/writing/map-embed.webp) **Image…** in the editor lists maps on its **Choose an image** tab, so you can also pick one there. **Print** on the map's own page prints it at its printed width. **Copy or download as PNG** on the editor's bar makes a picture of the map at up to 100 pixels a square. When the map has numbers, **Include the key** adds the key to the picture. ### Uploaded maps A map drawn in another program can be uploaded as a picture. Open it and choose a type in the menu at the top of its page: - **Overview Map**: click the map to add numbers and text, with the same label bar as a drawn map. Select the key to dock it left or right or float it on the map. **Map settings** sets the printed width, **Fit one page** and the orientation. - **Battle Map**: drag a rectangle over the map's grid, and Dunjii finds the grid lines in the artwork and fits a grid to them. See [Battle maps](https://dunjii.com/docs/layout-and-printing/battle-maps.md) for printing it at tabletop scale. Both kinds can print in black and white, from **Image** on the map's bar. ## Printing Print one page, a whole folder or a list of pages, on the paper, margins and footer you choose. ### The Print preview Documents and folders have a **Print** button, the printer icon at the top right. ⌘P on a Mac, Ctrl+P elsewhere, opens the same preview. Click **Print** in the preview, or press ⌘P again, to open your browser's print dialog. Dunjii lays out every printed page itself, so the preview shows the pages as they will print. Above it: - **Current page** prints the page you're on. **Entire folder** prints every document and image in its folder and the folders under it. - **Theme**: **Inherit from campaign** prints each page in its folder's theme. Pick another theme to use it for this print only. See [Themes](https://dunjii.com/docs/layout-and-printing/themes.md). - **Optimize for**: **Single-sided** or **Double-sided**. See below. - **Text size**: 100% to 200% of each document's own text size. Maps, cards and coins print at a fixed size, so it doesn't change them. Dunjii remembers **Optimize for** and **Text size** in this browser. The Print button is hidden in windows 768 px wide or narrower, because phone browsers print these pages blank or not at all. ![The Print preview for one page of a session.](https://dunjii.com/docs-assets/layout-and-printing/print-preview.webp) ### Printing a folder The **Print** button on a folder page prints every document and image in that folder and its subfolders, up to 100 files. The preview lists the files beside the pages: - Uncheck a file to leave it out. - Drag a file to move it. Shift-click or ⌘-click to select several and drag them together. - Click a file to scroll the preview to it. The list starts grouped by type (NPCs, Scenes, Shops and so on) and alphabetical within each group. Dunjii remembers your changes for each folder in this browser. A picture that another document in the print already shows starts unchecked. To print documents from different folders together, make a print list: a document named `print.md`, or with a name ending in `.print.md`, that links to them. Its Print preview offers **Referenced files**, which prints the linked files in the order the list gives them. ```markdown # Session 4 handouts - [[Watch Orders]] - [[The Greyfen Watchtower]] - [[Eldric Vael]] ``` - `# Session 4 handouts`: This file is Handouts.print.md. ![Printing the session-1 folder, with one shop left out.](https://dunjii.com/docs-assets/layout-and-printing/print-folder.webp) ### Paper and margins Set your default paper and margins in **Settings › Pages**, under **Printing**. They apply to every document that doesn't set its own, on screen and on paper. The paper starts as Letter if you signed up in the US, Canada, Mexico, the Philippines or Chile, and as A4 everywhere else. | Paper | Value | Size | | --- | --- | --- | | Letter | `letter` | 8.5 × 11 in | | Legal | `legal` | 8.5 × 14 in | | Tabloid | `tabloid` | 11 × 17 in | | A4 | `a4` | 210 × 297 mm | | A3 | `a3` | 297 × 420 mm | | A5 | `a5` | 148 × 210 mm | | Margins | Top and bottom | Left and right | | --- | --- | --- | | Standard | 0.65 in | 0.75 in | | Compact | 0.5 in | 0.5 in | | Minimum | 0.25 in | 0.25 in | Standard leaves room for a three-hole punch. **Custom** takes one number for top and bottom and one for left and right; click **Opposite sides match** to set each side on its own. On A4, A3 and A5 the numbers are in millimeters. To change one document, open it, click **Layout** at the foot of the page, and open **Print**. A `default` tag marks a setting that follows your account. Pick another value to set it for this document only, or click **Use default** to go back. Dunjii writes the document's choice into its frontmatter: ```markdown --- print: paper: a4 margins: left: 1.25 --- ``` - `paper: a4`: A value from the paper table above. - `left: 1.25`: Inches. Name only the sides you change; the rest follow your account. A card sheet, coin sheet or battle map has the same **Paper** and **Margins** rows under **Document settings**, the page icon at the top right. A print job has one paper size, so a folder print or a print list uses your default paper, not each document's. Most printers leave about 0.2 in at the edge of the paper blank. **Show the printer's edge**, under **Print** in Layout, draws that strip on the page. ![The Print menu in Layout, with Margins open.](https://dunjii.com/docs-assets/layout-and-printing/print-margins.webp) ### Footer A page can end with a footer: a license notice, a line of your own, and a line naming Dunjii. Set the defaults in **Settings › Pages**, under **Footer**. The notices are **Unofficial Fan Content (Wizards of the Coast)**, only for work you give away, and **SRD 5.2.1 attribution**, for SRD text you typed in yourself. To change one document, open **Print** in Layout and click **Footer**. Pick the footer it inherits, **Hidden**, or **Custom…** to choose its own notice and line. On the free plan the Dunjii line always prints. On Pro it starts off, and you can turn it on. Text copied from the Sourcebook prints its license notice even when the footer is hidden. A folder's `metadata.md` can set the footer for everything under it, with the keys in [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md). A document uses the same keys in its own frontmatter: ```markdown --- footerPreset: wotc-fan-content footerText: Mistwood campaign handouts --- ``` - `footerPreset: wotc-fan-content`: The Fan Content Policy notice. none removes a notice the document inherits. - `footerText: Mistwood campaign handouts`: Your own line, under the notice. ![The Footer row for a handout with its own notice and line.](https://dunjii.com/docs-assets/layout-and-printing/print-footer.webp) ### Double-sided printing Set **Optimize for** to **Double-sided** in the Print preview, and turn on two-sided printing in the browser's print dialog. Dunjii then: - adds a blank page after any document or sheet with an odd number of pages, so the next one starts on a new sheet of paper; - prints a back for each [battle map](https://dunjii.com/docs/layout-and-printing/battle-maps.md) sheet with its label, so you can tell which sheets belong together; - swaps the left and right margins on the backs, if you checked **Mirror on back sides**. **Mirror on back sides** appears under **Margins** when the left and right margins differ. It keeps a wide binding margin on the same edge of the paper on both sides. It assumes the printer flips the paper on the long edge, which is the usual setting for portrait pages. ### The browser's print dialog Dunjii sets the paper size and draws the margins inside each page. In the browser's dialog: - Check that the paper matches the paper you picked in Dunjii. - Leave the margins and the scale at their defaults. Scaling the page changes the size of cards, coins and map squares. - To save a PDF instead of printing, choose **Save as PDF** as the destination. In Safari on a Mac it is in the **PDF** menu. When text or a picture on a page lies in the strip most printers can't print, the Print preview says so. Widen the margins in Dunjii, or scale the page to fit in the browser's dialog, which also shrinks cards, coins and map squares. Classic Parchment prints its paper texture without the dialog's background graphics option. ## Themes A theme sets the paper, fonts and colors of your pages on screen and in print, for a folder and everything in it. ### Built-in themes Two themes come with Dunjii, on every plan: | Theme | Value | | --- | --- | | Classic Parchment (Color) | `classic-parchment` | | Clean Lines (B&W) | `clean-lines` | **Classic Parchment (Color)** is the default. It prints gray parchment pages with crimson headings, tan parchment behind callouts and stat blocks, and a watercolor wash on each page. It is made for color printers. **Clean Lines (B&W)** prints black ink on white and turns pictures gray, for black-and-white printers. ![The same table in Classic Parchment (top) and Clean Lines (bottom).](https://dunjii.com/docs-assets/layout-and-printing/themes-compared.webp) ### Choosing a theme 1. Open any page in a campaign, or in a folder at the top level of your workspace. 2. Click **More actions** (⋯) at the top right. The menu is headed with the campaign or folder name. 3. Click **Theme** and pick one. Every page in that campaign or folder changes to the new theme. **Default** removes the folder's own choice, so it uses the theme of the folder above it; the menu shows which theme that is. Dunjii saves the choice in the folder's `metadata.md`: ```markdown --- type: campaign theme: clean-lines --- ``` - `theme: clean-lines`: Every page in this campaign shows and prints in Clean Lines. ![The Theme menu for the Mistwood campaign.](https://dunjii.com/docs-assets/layout-and-printing/theme-menu.webp) ### Default theme and subfolders A theme applies to its folder and every folder under it. A subfolder that sets its own `theme:` uses that one, and so does everything under it. The **Theme** menu sets a campaign or a top-level folder; to give a session or another subfolder its own theme, add `theme:` to that folder's `metadata.md`. See [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md). The theme in the `metadata.md` at the top of your workspace is the default for every folder that doesn't pick one. Change it in **Settings › Themes**, under **Default theme**. A document takes the theme of its folder. To print one document in another theme, pick that theme in the Print preview; the choice applies to that print only. See [Printing](https://dunjii.com/docs/layout-and-printing/printing.md). Dunjii ignores a `theme:` value it doesn't recognize, and the folder uses the theme above it. ### Custom themes On Pro you can make your own themes. In **Settings › Themes**, click **New theme**. A theme sets: - **Name**. Dunjii makes the theme's `theme:` value from the name when you first save it, such as `watch-house` for Watch House, and keeps that value when you rename the theme. - **Text**: the body, heading and drop cap fonts, from Google Fonts or fonts you upload, and **Spacing**: **Tight**, **Normal** or **Airy**. - **Accent color**: the color of headings, rules and labels. - **Paper**: the paper behind the page and behind callouts, from Dunjii's papers or an image you upload. - **Page wash**: paint on **Every page**, only on **Pages that set one**, or **None**. The preview beside the settings shows a page at actual size. Dunjii warns when text is too faint against your paper or accent, and still lets you save. Your first saved theme becomes the default for every folder that hasn't picked a theme. Folders that picked Clean Lines keep it. When you edit a theme, every folder that uses it changes too. On the free plan the editor and preview work, and the save button reads **Upgrade to save**. If you leave Pro, Dunjii keeps your themes but doesn't draw them, and folders that use one show the theme above them until you subscribe again. ![A new theme in the theme editor, before saving.](https://dunjii.com/docs-assets/layout-and-printing/theme-editor.webp) ### Theme and appearance The theme is the page: the paper and everything on it. It prints, and players reading a share link see it. The dark wood around the page in the app is not part of any theme. It looks the same for every folder, and it never prints: the Print preview shows the pages on white. ## Page layout How Dunjii sets a document into columns and pages, and the settings and markers that change where the text goes. ### Columns Dunjii shows a document as the pages it will print, with the text in columns. To change the columns, click **Layout** at the foot of the page (⌘⇧L on a Mac, Ctrl+Shift+L elsewhere) and open **Page**: - A portrait page takes one to three columns. Two is the default. - A landscape page takes two to four. Three is the default. Dunjii saves the choice in the document's frontmatter: ```markdown --- print: orientation: landscape columns: 4 --- ``` - `orientation: landscape`: Leave it out for portrait. Card sheets, coin sheets and maps have layouts of their own and no **Layout** button. ![The Page menu in Layout.](https://dunjii.com/docs-assets/layout-and-printing/layout-page.webp) ### Text flow Dunjii fills the first column from top to bottom, then the next, and starts a new page when the columns are full. It evens out the columns on a page where it can. - The `#` title runs across the top of the first page. - To fill a column, Dunjii cuts a long block: a paragraph between lines, a list between items, a table between rows with the header row repeated, and a callout between its parts. - A heading never ends a column on its own. It moves to the next column with the text under it. - A column that picks up a section partway through starts with a line naming it, such as *The Lamp Room, continued*. - When the text between two full-width blocks fits in one column, Dunjii sets it across the page so the other column isn't left empty. It may set short sections side by side instead, one to a column. ![Page 2 of a two-column scene. The first column picks up The Lamp Room from page 1.](https://dunjii.com/docs-assets/layout-and-printing/layout-continued.webp) ### Keeping a block together To stop Dunjii cutting a block across columns or pages, open its block menu in **Edit** and pick **Keep together** under **Breaks**. The block menu is the icon to the left of the block; ⌘/ opens it from the keyboard. Dunjii moves the whole block to the next column with room for it. A block taller than a column is still cut. **Keep together** works on paragraphs, lists, tables, callouts and quotes that aren't inside another block. Dunjii writes a comment line above the block, which other markdown editors hide: ```markdown - A light moving on the marsh, low and steady. - A voice calling the names of the watch. - Footprints in the frost that stop halfway up the stair. ``` - ``: Keeps the list below in one piece. ![The block menu for a list, with Keep together picked.](https://dunjii.com/docs-assets/layout-and-printing/layout-keep.webp) ### Page breaks A page break starts the text after it on a new page. To add one in **Edit**, type `/page` on an empty line, or pick **Page break** from the **+** menu. Typing `\page` alone on a line and pressing Enter does the same. The editor shows the break as a dashed line labeled **Page break**. ```markdown # Orders for the Night Watch Keep both lamps lit until the first bell after sunrise. # Orders for the Day Watch Walk the road a mile north and a mile south before noon. ``` - ``: Everything after this line starts on a new page. - Two page breaks in a row leave a blank page. One at the end of the document adds a blank last page. - A page break inside a callout, quote or list does nothing. - There is no column break. To fit a document onto fewer pages, use **Shrink to fit**. ![A page break between two handouts in one document.](https://dunjii.com/docs-assets/layout-and-printing/layout-page-break.webp) ### Full-width blocks A table too wide for one column runs across the page, and the text above and below it stays in columns. To decide for one table, open its block menu and pick under **Width**: **Auto** lets Dunjii decide, **Full** always runs across the page, and **One column** keeps it in a column. Pictures and callouts have a **Width** setting too. To keep a whole document in its columns, check **Keep everything in columns** under **Page** in Layout. Then only the title runs across the page, even for blocks set to **Full**. ```markdown --- print: flexibleColumns: false --- | d6 | Encounter | | --- | --- | | 1 | A watchman's lantern, still lit, hanging from a branch | | 2 | Two wolves that will not cross the road | ``` - `flexibleColumns: false`: Keep everything in columns. - ``: span=full runs the table across the page. span=none keeps it in one column. ![The block menu for a table.](https://dunjii.com/docs-assets/layout-and-printing/layout-width.webp) ### Text size and shrink to fit Under **Text** in Layout, pick the document's text size: **Compact** (10 pt), **Standard** (12 pt, the default), **Large** (14 pt) or **X-Large** (16 pt). **Shrink to fit** lets Dunjii set the text smaller when that puts the document on fewer pages. It never goes below 7.5 pt. | Shrink to fit | Value | Text may shrink by | At Standard | | --- | --- | --- | --- | | Off | `none` | 0 pt | 12 pt | | A little (default) | `some` | 1.65 pt | down to 10.35 pt | | More | `more` | 3 pt | down to 9 pt | | A lot | `most` | 4.5 pt | down to 7.5 pt | ```markdown --- print: fontSize: large shrink: more --- ``` - `fontSize: large`: compact, large or xlarge. Leave it out for Standard. - `shrink: more`: A value from the table above. Leave it out for A little. The Print preview's **Text size** prints every document at 100% to 200% of its own size, for that print only. A table's block menu has **Scale**, from 80% to 125%, for that table alone. The space between lines and blocks is part of a [custom theme](https://dunjii.com/docs/layout-and-printing/themes.md). ![The Text menu in Layout.](https://dunjii.com/docs-assets/layout-and-printing/layout-text.webp) ## Card sheets Print spells, items and abilities as cards your players keep in front of them. ### The file A card sheet is a markdown file with `type: card-sheet` and one link per card. Dunjii prints each card at 2.48 × 3.46 in, a millimeter under a poker card, so a cut card fits a standard sleeve. ```markdown --- type: card-sheet --- ## Cantrips - [[Fire Bolt]] - [[Sacred Flame]] ## 1st level - [[Magic Missile]] - [[Shield]] ``` - `type: card-sheet`: Makes this file a card sheet. - `## Cantrips`: Starts a group. The heading takes the space of one card. - `- [[Fire Bolt]]`: One link, one card. A link can point at your own spell or at a Sourcebook page. ![This file printed on Letter paper with Standard margins.](https://dunjii.com/docs-assets/layout-and-printing/card-sheet-printed.webp) If you've written a wikilink that references a sourcebook item, the next sync will rewrite it to the actual sourcebook location. For example, `[[Fireball]]` would be rewritten to `[Fireball](https://dunjii.com/sourcebooks/dnd-srd-5.2.1/Spells/Fireball)`. It's not as pretty, but more practical for third party markdown renderers. ### Make one 1. Select the spells in the sidebar. Shift-click to add a range. 2. Right-click the selection and choose **Create card sheet from 3 cards…**. The number matches your selection. 3. Type a name. Dunjii puts the sheet in the folder you have open. Search (⌘K on a Mac, Ctrl+K elsewhere) offers the same action when you pick spells there. ![The sidebar menu for three selected spells.](https://dunjii.com/docs-assets/layout-and-printing/create-card-sheet-menu.webp) ### What goes on a card Each card comes from its spell's own file. The frontmatter fills the boxes at the top and the lines around the text. ```markdown --- type: spell level: 2 school: Evocation casting-time: Action range: 60 feet components: [V, S, M] duration: 1 minute materials: a mixture of flower petals classes: [Forest Mage] --- # Floral Eruption Choose a point within range; intoxicating flowers violently burst forth. Each creature in a 10-foot-radius Sphere centered there makes a CON saving throw. On failure, they take 2d6 damage and have the Incapacitated condition and a Speed of 0. If they succeed, they only take the damage. ``` - `school: Evocation`: Level and school make the line at the bottom right. - `duration: 1 minute`: These four fill the boxes at the top. - `materials: a mixture of flower petals`: The italic line under the boxes. - `classes: [Forest Mage]`: The line at the bottom left. - `# Floral Eruption`: The card's title. A spell whose text runs too long for the card can carry a `## Card Description` section with a shorter version. The card prints that section in place of the full text. Items and abilities have card layouts of their own. ### Cards per page Your margin setting decides how many cards fit across. When one more column almost fits, Dunjii shrinks the cards by up to 6% to make room, and no further. | Margins | Letter | A4 | | -------- | -------- | -------- | | Standard | 4 | 4 | | Compact | 6 at 97% | 9 at 94% | | Minimum | 6 | 9 | ### Settings The sheet's document settings have a **Card size** control. It writes this key under `print:` in the sheet's frontmatter. ```markdown --- type: card-sheet print: cardScale: fit --- ``` - `cardScale: fit`: 1 is Actual size, the default. fit is Fit to page: the cards shrink enough to add a row. A number from 0.65 to 1 sets the size yourself. ## Coin sheets Print portraits and tokens as round or square coins to cut out and put on the table for your creatures and NPCs. ### The file A coin sheet is a markdown file with `type: coin-sheet` and a table with one row per coin. The first column is the picture. Headings and text between tables print between the coins. ```markdown --- type: coin-sheet --- ## Hounds and wights | Image | Qty | Numbers | Size | Shape | Border | | --- | --- | --- | --- | --- | --- | | ![Mire Hound](tokens/mire-hound.png) | 4 | 1 2 3 | | | none | | ![Bog Wight](tokens/bog-wight.png) | 3 | A B C | | | none | ## The troll and the warden | Image | Qty | Numbers | Size | Shape | Border | | --- | --- | --- | --- | --- | --- | | ![Mistwood Troll](tokens/mistwood-troll.png) | 1 | | Large | | none | | ![Warden Hollis](tokens/warden-hollis.png) | 1 | | | | none | ``` - `type: coin-sheet`: Makes this file a coin sheet. - `## Hounds and wights`: Prints above the coins that follow it. - `| Image | Qty | Numbers | Size | Shape | Border |`: The first column is the picture, whatever its header says. The others are found by their header. - `| ![Mire Hound](tokens/mire-hound.png) | 4 | 1 2 3 | | | none |`: One row, one picture: four coins, numbered 1 to 4. A blank cell is the default. ![The top of this sheet printed on Letter paper with Standard margins.](https://dunjii.com/docs-assets/layout-and-printing/coin-sheet-printed.webp) You can leave out any column but the picture, and a column Dunjii doesn't know is ignored. A table whose first column holds text instead of pictures prints as an ordinary table. ### Make one 1. Select the pictures in the sidebar. Shift-click to add a range. ⌘-click on a Mac, Ctrl-click elsewhere, adds one at a time. 2. Right-click the selection and choose **Create coin sheet from 4 pictures…**. The number matches your selection. 3. Type a name and click **Create**. Dunjii puts the sheet in the folder open in the sidebar. ![The sidebar menu for four selected pictures.](https://dunjii.com/docs-assets/layout-and-printing/create-coin-sheet-menu.webp) To add coins later, click **Add coins…** under a table in Edit and pick pictures. In View, **Add images** under the sheet opens a box where you can choose a picture, upload one, or make a token with the **Token Maker**. What you add there goes at the end of the sheet. See [Images](https://dunjii.com/docs/writing/images.md). You can also start an empty sheet: open **New…** on a folder, type `coin` and choose **Coin Sheet**. ### Coin settings In Edit, each cell of a coin table is a control: a stepper for **Qty**, menus for **Numbers**, **Size** and **Border**, and a circle and a square button for **Shape**. Each control writes its cell, and you can also type in a cell. | Column | What it takes | Blank | | ------- | ------------- | ----- | | Qty | How many copies of the coin print. | 1 | | Numbers | `1 2 3` numbers the copies, `A B C` letters them. The mark prints in a white circle at the coin's top right. | No marks | | Size | A creature size, or inches: `1.5in`. | Medium, 1 inch | | Shape | `Circle` or `Square`. | Circle | | Border | `none`, `thin`, `standard` or `thick`, then a color: `black`, `red`, `blue`, `green` or `gold`. `thick red` sets both. | Standard, black | ![The first table of this sheet in Edit, without its Border column.](https://dunjii.com/docs-assets/layout-and-printing/coin-sheet-editor.webp) A token from the Token Maker has a ring of its own. When the Token Maker adds one to a sheet, Dunjii writes `0` in its **Border** cell, which is the same as `none`. Each coin is cut from the middle of its picture, as large a square as fits, unless you choose another part: click the picture in Edit and choose **Crop…**. ### Sizes A creature size prints a coin as wide as the space the creature takes on a grid of 1-inch squares. | Size | Coin | | --- | --- | | Tiny | 0.5 in | | Small | 1 in | | Medium | 1 in | | Large | 2 in | | Huge | 3 in | | Gargantuan | 4 in | ### Printing Coins print at their size: a 1-inch coin measures 1 inch on paper. Dunjii sets them in centered rows 0.15 in apart and starts a new page when the next row doesn't fit. A heading never ends a page: it moves to the next page with its coins. The paper and margins come from your print settings, and the **Text size** setting doesn't change coins. See [Printing](https://dunjii.com/docs/layout-and-printing/printing.md). On a wide window, View shows the sheet as the pages it prints on. On a black-and-white theme such as Clean Lines (B&W), the pictures and their rings print in shades of gray. ## Battle maps Print a gridded battle map at tabletop scale on a home printer, split across pages on the grid lines. ### Making a battle map Upload the map picture to **Library** › **Battle Maps** with **Upload Battle Map** in the sidebar. Every picture in that folder opens as a battle map, because the folder's `defaultType` is `battle-map`. For a picture somewhere else, open it and choose **Battle Map** in the type menu at the top of its page. The menu also offers **Image**, **Portrait** and **Overview Map**. See [Maps](https://dunjii.com/docs/writing/maps.md) for overview maps. ![The type menu on a picture's page.](https://dunjii.com/docs-assets/layout-and-printing/image-type-menu.webp) Dunjii keeps the map's settings in a `.metadata.md` file beside the picture, which starts with `type: battle-map`. Uploads take PNG, JPEG, WebP or GIF, up to 5 MB on the free plan and 50 MB on Pro. ### Marking the grid A new battle map has no grid. Drag a rectangle over the part of the picture that has one. Dunjii finds the grid lines in the artwork inside the rectangle and fits its grid to them. The chip above the rectangle shows how many matches it found, and its arrows step between them. When the artwork has no grid lines, the chip shows 0 and you set the square size yourself. ![A grid fitted to the artwork, with the first of two matches chosen.](https://dunjii.com/docs-assets/layout-and-printing/battle-map-grid.webp) To adjust the grid: - Drag the rectangle's corners and edges to resize it, or its middle to move it. The handle above it turns it. - Point at a square: drag one of its corners to change the square size, or the arrows in its middle to shift the lines. - Each handle shows its numbers in a box you can type into. Drag another rectangle outside the first to add a second grid to the same picture. All grids on a picture share one square size and print scale. **Delete grid** (⌫) removes the selected one. ### How the pages split Dunjii cuts the map only on grid lines, so no square is split across two pages. Only the outer edge of the grid can have a part square. It picks portrait or landscape, whichever needs fewer pages. ![A 24 × 16 square map on eight Letter pages, in the order they tape together.](https://dunjii.com/docs-assets/layout-and-printing/battle-map-pages.webp) **Print size** on the map's bar sets: - **Square**: how wide a square prints, from 0.25 to 2 inches. The default is 1 inch. - **Margin**: a strip of the picture printed around the selected grid, 0 to 4 squares wide, to hold while you cut and tape. The paper and margins come from your print settings. To set them for this map alone, open **Document settings** on the map's page and change **Paper** or **Margins**. At 1-inch squares, a portrait Letter page fits 7 × 9 squares with Standard margins and 8 × 10 with Minimum. ### Printing double-sided Choose **Print** on the map's page, then set **Optimize for** to **Double-sided**. Dunjii adds a back after each page. The back prints a code and the map's name, behind the grid on that page. ![The first page of the map and its back.](https://dunjii.com/docs-assets/layout-and-printing/battle-map-back.webp) The code is a row letter and a column number, counted from the left as you look at the backs with the map face down. So on a map four pages wide, the back of the top-left page reads A4. Tape the pieces face down in code order. The name is the grid's name, if you gave it one in the file. A picture with one unnamed grid prints its file name. Otherwise the backs read Grid 1, Grid 2. ### Image and grid lines **Image** on the map's bar switches between **Color** and **Black & white** and sets **Brightness**. Black & white adds **White point**, **Black point** and **Contrast**, so a dark map can print light. A theme that prints in gray, such as Clean Lines (B&W), prints the map in black and white too. ![The Image settings with Black & white chosen.](https://dunjii.com/docs-assets/layout-and-printing/battle-map-image.webp) **Grid lines** sets the color, opacity and width of the lines, and of an outline drawn under them so the grid shows on both light and dark ground. ### The settings in the file The map bar writes a `map:` block in the picture's `.metadata.md`. Document settings write `print:`. ```markdown --- type: battle-map map: squareSizePx: 70 outputSquareInches: 1 bw: false grids: - name: Cellar rotationDeg: 0 gridXPx: 8 gridYPx: 6 gridWidthPx: 1663 gridHeightPx: 1109 tileOffsetXPx: 62 tileOffsetYPx: 64 bufferSquares: 0 print: paper: tabloid --- ``` - `squareSizePx: 70`: One square of the picture, in pixels. Shared by every grid on it. - `outputSquareInches: 1`: How wide a square prints, from 0.25 to 2. - `bw: false`: true prints the picture in black and white. - `- name: Cellar`: Printed on the back of each page. Optional. - `gridHeightPx: 1109`: The rectangle the grid covers, in pixels of the picture. - `tileOffsetYPx: 64`: Where the first whole square starts inside the rectangle. - `bufferSquares: 0`: The margin printed around this grid, in squares. - `paper: tabloid`: This map's paper. A folder print uses your default paper instead. The block also contains the grid line colors and the black and white settings. Add `orientation: portrait` or `orientation: landscape` under `map:` to stop Dunjii choosing for you. ## Share links Make a page Public or Secret, copy its link for your players, and review everything you have shared on the Shared page. ### Visibility Every page has one of three visibilities. To change it, open the page and click the **Share** button at the top right. Its icon shows the page's current visibility. | Visibility | Who can open it | Listed in the player nav | | ----------- | --------------- | ------------------------ | | **Public** | Anyone with the link | Yes | | **Secret** | Anyone with the link | No | | **Private** | You, and any [co-GM](https://dunjii.com/docs/sharing/co-gms.md) who holds the page's folder | No | New pages are Private. Dunjii saves your choice as soon as you click it, so the link works for players straight away. ![The Share menu on a Public handout.](https://dunjii.com/docs-assets/sharing/share-menu.webp) ### In the file Visibility is stored in two frontmatter keys. The **Share** menu writes them, and you can also type them in the page's source. ```markdown --- audience: players playerNav: false --- ``` - `audience: players`: Players can open this page. Without this key, or with audience: dm, the page is Private. - `playerNav: false`: Makes the page Secret: players can open it by link, and the nav does not list it. Leave it out for Public. ### Copying the link The **Share** menu has a **Copy Public Link** or **Copy Secret Link** button, depending on the page's visibility. The button is disabled while the page is Private. A link has the form `https://share.dunjii.com////`. It contains the page's folder and name, so if you rename or move the page, the old link stops working. Copy the new one from the **Share** menu. Players open the link in any browser, with no account. See [What players see](https://dunjii.com/docs/sharing/what-players-see.md). ### Folders A folder has no visibility of its own. Each page in it has its own visibility, and a page you create in a folder starts Private, whatever is already shared there. To share a folder of handouts, make each page Public. The player nav lists a folder when it holds at least one Public page, in it or in any folder below it, and shows only the Public pages inside. In a folder's contents list, each shared page has a **PUBLIC** or **SECRET** tag. ![The contents of a handouts folder with one Secret page and two Public pages.](https://dunjii.com/docs-assets/sharing/folder-visibility-badges.webp) ### The Shared page **Shared** in the sidebar opens a list of every Public and Secret page in your workspace, grouped by top-level folder. The counts at the top give the number of public and secret pages. Each row has: - The page's visibility icon. Click it to change the visibility. - The page's path, type and when it last changed. - **Copy player link**, which copies the same link as the **Share** menu. - **Open as a player**, which opens the page in a new tab as a player sees it. When you have 8 or more shared pages, a **Filter shared pages** box appears, with **All**, **In the player nav** and **Link only** filters. ![The Shared page with three handouts and one page from the Mistwood campaign.](https://dunjii.com/docs-assets/sharing/shared-page.webp) ### Revoking a link To stop sharing a page, set it to **Private** from its **Share** menu or from its row on the Shared page. A player who opens the link afterwards gets **Page not found**, or is sent to the campaign's folder if the page is in a campaign. A player who already has the page open keeps what is on their screen until they reload. When many players are reading a page at once, Dunjii serves it from a cache, so its link can keep working for up to 30 seconds after you make it Private. A Secret page's link is its address. Anyone who has the link can open the page until you make it Private, rename it or move it. To change several pages at once on the Shared page, tick their boxes (or ⌘-click on a Mac, Ctrl-click elsewhere, and Shift-click a range), then change the visibility of any selected row. A message confirms the change and has an **Undo** button. Pages you made Private stay in the list, struck through, until you click **Refresh the list**. ![Changing the visibility of two selected pages on the Shared page.](https://dunjii.com/docs-assets/sharing/shared-page-bulk-change.webp) ## What players see Players read your Public and Secret pages in a read-only view, in any browser, with no account. ### The reader view A player who opens your link sees the page on its paper, in the theme of its folder, with a sidebar of your Public pages. They don't sign up or install anything, and the link works on a phone. The reader view has no editor and no search. The sidebar starts at the page's folder. **Home** at the top goes up to the top of your workspace, which lists every folder that holds a Public page. The sidebar also lists the Sourcebooks you have switched on. ![The Ferryman's Token as a player sees it. The sidebar lists the other Public handout.](https://dunjii.com/docs-assets/sharing/reader-view.webp) ### What players can open Players can open your Public and Secret pages, and the pictures on them. A picture on a shared page shows even when the image itself is Private. A link to a Private page shows as grey text with a lock icon, and pointing at it shows **Locked**. Opening a Private page's address gives **Page not found**, or opens the campaign's folder if the page is in a campaign. A citation of one of your reference PDFs shows as plain text. Dunjii shares whole pages. Nothing hides part of a page from players, and the **···** menu beside a page in the sidebar has **View raw markdown**, which shows the page's source with its frontmatter. Keep notes for yourself on a separate Private page. ### Secret pages A Secret page is not in the sidebar, and no folder lists it. A player reaches it only through its link. Once a player opens a Secret page, their browser remembers it. The page appears in their sidebar, and links to it on your other shared pages work for them. Other players don't see it until they open the link too. ![A player's sidebar after opening A Letter for Brannoc. The letter is Secret, so only this browser lists it.](https://dunjii.com/docs-assets/sharing/secret-page-in-nav.webp) ### Rolling dice Dice in a shared page roll for players too. Pointing at `1d6` or `2d6 + 4` shows a **Roll** button, and clicking the dice rolls them. A highlighted bonus such as `==+6==` rolls a d20 with that bonus. See [Markdown](https://dunjii.com/docs/reference/markdown.md) for the notation. A result stays on that player's screen until they click elsewhere. Dunjii doesn't save rolls or send them to you or to other players. ![A 1d6 roll on a shared handout.](https://dunjii.com/docs-assets/sharing/dice-roll.webp) ### Printing A shared page has no **Print** button. Players can print it with their browser's print command, which leaves out the sidebar and breadcrumbs. To hand out paper with your theme, page size and margins, print the pages yourself from the app. See [Printing](https://dunjii.com/docs/layout-and-printing/printing.md). ## Co-GMs Give another GM read and write access to your whole workspace or to some of its top-level folders. ### Inviting a co-GM Co-GMs need the Pro plan, which allows 3 co-GMs. Dunjii counts people, so a co-GM with two folders counts once, and an invite that hasn't been accepted yet counts too. The co-GM doesn't need a paid plan: what they add counts against your storage. 1. Open **Settings** › **Collaboration**. 2. Under **Invite a co-GM**, type their email address. 3. Tick **All of** your workspace, or one or more top-level folders. 4. Click **Invite**. Dunjii emails them an invite link. The link also appears on their row under **Who has access**, so you can send it another way. It works only for the email address you typed, and it expires after two weeks. ![The invite form with the Library and Mistwood folders ticked.](https://dunjii.com/docs-assets/sharing/co-gm-invite.webp) ### Accepting an invite The invited GM opens the link, signs in with the invited email address (or creates an account with it), and clicks **Start helping with**, followed by the folder's name. They then work in your workspace, at the same addresses you use. Their sidebar gets a **Working in** section that switches between **Your content** and your workspace, which it labels with your name, such as **Rowan's content**. In your workspace, their sidebar shows only the folders you gave them. ### Folders a co-GM can open You give a co-GM your whole workspace or whole top-level folders, such as `Library` or a campaign folder, and nothing smaller. **All of** your workspace includes folders you add later. If a top-level folder holds more than you want to hand over, move what they need into a folder of its own and give them that. Links in their folders keep pointing at pages outside them. Those links show with a dashed underline, and opening one shows the page's name and path but not its contents. ### What a co-GM can do | In their folders, a co-GM can | A co-GM can't | | ----------------------------- | ------------- | | Read, edit, create, move and delete pages | Open pages outside their folders | | Search | Open **Settings**, so they can't invite co-GMs or change your plan | | Make pages Public, Secret or Private, and see them on the **Shared** page | Open your reference PDFs | | See **History** and restore older versions | Delete your workspace | **History** shows who made each change. Once more than one person has made changes, it has a **Changed by** filter. With the `dunjii` command, a co-GM runs `dunjii shared` to list what has been shared with them and `dunjii clone @/` to download their folders. ### Changing or removing access Each person under **Who has access** has the same folder list as the invite form. - To change their folders, tick or untick them and click **Update access**. Taking a folder away asks you to confirm, and says how many files they lose. - **Remove** takes away all their access, after the same confirmation. Everything they wrote stays in your workspace. To bring them back, send a new invite. - For someone who hasn't accepted yet, **Update access** changes what the invite gives without asking, and **Remove** withdraws the invite. When you rename or move a folder a co-GM holds, their access moves with it. If you delete the folder, their access to it pauses and their row says so. Click **Resume** once the folder has pages in it again. ![A pending invite under Who has access, with its folders and the Remove button.](https://dunjii.com/docs-assets/sharing/co-gm-roster.webp) ## Version history Dunjii saves a version of a file each time it changes, so you can step back through a document's earlier versions and restore one. ### When Dunjii saves a version While you type, Dunjii saves your work every 15 seconds, and again when you switch from Edit back to View. Each save that changes the file adds a version. Other changes add one too: a sync from the [desktop app](https://dunjii.com/docs/your-files/desktop-app.md), a restore, an import. Saving every 15 seconds makes a lot of versions, so Dunjii thins out the older ones. It splits a file's history into time windows that widen with age, and in each window keeps the versions just before and just after the largest edit. A window where every edit was small (under 64 characters and under 2% of the document) keeps only its newest version. | Version age | Window | | --------------------- | ------------ | | Under 5 minutes | Every version is kept | | 5 to 30 minutes | 1 minute | | 30 minutes to 2 hours | 5 minutes | | 2 to 6 hours | 15 minutes | | 6 to 24 hours | 1 hour | | Over a day | 6 hours | Dunjii never thins out a file's newest version, the last version of a deleted file, or a copy that lost a sync conflict before anyone has reviewed it. ### A file's history Every document page shows when the document last changed, beside its path at the top: **Edited 4 minutes ago**. Click it to open the document's history. The line changes to name the version on screen, such as **Viewing v3 · 1m ago**, and a bar of version controls appears at the bottom of the page. - Click ‹ and ›, or press ← and →, to step one version at a time. - Open the list to jump to any version. Each row shows the version number, its age, when it was saved, and which sections or settings that save changed. - The page shows the old version in place, and highlights the text that version added. - **View** and **Edit** both work while you look at an old version. Neither lets you change it. - Press Esc, click **Cancel**, or click the **Viewing** line again to go back to the current version. ![Version 3 of a scene, with the section it added highlighted and the version list open.](https://dunjii.com/docs-assets/your-files/version-list.webp) A picture and its notes file share one history. When the editor has nothing left to undo (⌘Z on a Mac, Ctrl+Z elsewhere), Dunjii shows a link to the document's history. ### Restoring a version 1. Open the document's history and step to the version you want. 2. Click **Restore**. Dunjii saves that version as the new current version. The version you replaced stays in the history, so restoring never deletes anything. A message with **Undo** appears for 10 seconds. If the version you restore links to files that have since been deleted, Dunjii asks first: **This version links to files that aren't here any more**. Tick the files you want back, then click **Restore**. ![The version bar while you look at an old version.](https://dunjii.com/docs-assets/your-files/version-bar.webp) ### The History page **History** in the sidebar opens **Version history**, the history of your whole workspace. | Tab | What it lists | | -------------------- | ------------- | | **Recent changes** | Each file that changed, newest first, with its number of versions, who changed it, and when. Click a path to open the file. | | **Recently deleted** | Deleted files, ready to restore. See [Deleted files](https://dunjii.com/docs/your-files/trash.md). | | **Restore log** | Each restore, with how many files it changed. | | **Needs review** | Documents edited in two places at once, where Dunjii kept the later edit and saved the other copy in the document's history. The tab appears only when there is something to review. See [Desktop app and sync](https://dunjii.com/docs/your-files/desktop-app.md). | Type a folder path in **Folder**, such as `Mistwood/Session 3`, to narrow every tab to that folder. To open the page already narrowed, right-click a folder in the sidebar and choose **Version history**. Search (⌘K on a Mac, Ctrl+K elsewhere) finds the page as **Version history**. When you work with [co-GMs](https://dunjii.com/docs/sharing/co-gms.md), **Changed by** filters **Recent changes** to one person's edits. ![The History page narrowed to one session folder.](https://dunjii.com/docs-assets/your-files/history-page.webp) ### Restoring a folder to a point in time The **Recent changes** tab starts with **Restore the whole workspace to a point in time**. With a folder in **Folder**, it restores that folder instead. 1. Set **At** to a date and time. Clicking a time in the **Last changed** column sets **At** to just after that change. 2. Click **Restore…**. Dunjii lists what will change: files under **Reverted** go back to the version they had then, files under **Undeleted** come back, and files under **Added later (not removed)** stay as they are. 3. Click **Restore 4 files**. The button shows how many files will change. The versions you replaced stay in each file's history, so you can restore to a later time to undo it. ### How long versions are kept | Plan | Kept for | | --- | --- | | Free | 7 days | | Pro | 90 days | Once a version is older than that, Dunjii deletes it for good. The current version of a file is never deleted. When a document's oldest versions are gone, the end of its version list says: **Old versions are retained for up to 90 days on the Pro plan.** On your computer, `dunjii history ` lists the same versions and `dunjii restore` brings one back; see [Desktop app and sync](https://dunjii.com/docs/your-files/desktop-app.md). ## Deleted files A file you delete stays on the Recently deleted list for 7 days, or 90 days on Pro, and you can restore it from there. ### Deleting files and folders Right-click a file or folder in the sidebar and choose **Delete**, or select it and press ⌫ on a Mac, Delete elsewhere. To delete several at once, select them first: Shift-click selects a range, and ⌘-click (Ctrl-click elsewhere) adds one row. The menu then reads **Delete 3 items**. Deleting a folder deletes everything in it. Deleting a picture also deletes its notes file (`Name.metadata.md`). After a delete, a message with **Undo** appears for 10 seconds. ![The message after a delete.](https://dunjii.com/docs-assets/your-files/delete-toast.webp) ### The delete confirmation Dunjii asks before it deletes anything, and the dialog says what the delete affects: - For a folder, how much goes with it: "Removes 320 files in 4 subfolders." - Which documents outside the selection link to what you are deleting, by path: "Deleting will break links in 1 doc". When nothing does, it says "Nothing else references this file." - When a delete covers more than 2,000 files, Dunjii skips the link check and says so. Click **Delete** to go ahead, or **Cancel**. ![Deleting an NPC that a scene links to.](https://dunjii.com/docs-assets/your-files/delete-dialog.webp) ### Recently deleted Dunjii has no separate trash. Deleted files are listed on the **Recently deleted** tab of the History page: click **History** in the sidebar, then **Recently deleted**. Search (⌘K on a Mac, Ctrl+K elsewhere) finds the same list as **Deleted files**. Each row shows the file's path, its number of versions, who deleted it, and **Last seen**, the last time the file changed before it was deleted. Type a path in **Folder** to list only the files deleted from one folder. A folder's own **Activity** tab lists the files deleted from it too. ![The Recently deleted tab, narrowed to one session folder.](https://dunjii.com/docs-assets/your-files/recently-deleted.webp) ### Restoring a deleted file Click **Restore** beside the file. Dunjii opens the file's page as it was when you deleted it, under the note **This file was deleted.** - **Restore it** puts the file back where it was. - **Earlier versions** steps through the file's older versions, so you can restore one of those instead. See [Version history](https://dunjii.com/docs/your-files/version-history.md). A picture comes back with its notes file. To restore a deleted folder, open the folder it was in and choose its **Activity** tab, where the deleted folder is one row. Click the row, click **Show files** to see what will come back, then click **Restore**. ![The page of a deleted NPC.](https://dunjii.com/docs-assets/your-files/deleted-file.webp) ### How long deleted files are kept | Plan | Kept for | | --- | --- | | Free | 7 days | | Pro | 90 days | The time counts from when you deleted the file. After that Dunjii deletes the file and all its versions for good, and it leaves **Recently deleted**. You can't empty **Recently deleted**, or delete one file from it, any sooner. If you use the [desktop app](https://dunjii.com/docs/your-files/desktop-app.md), a file deleted in Dunjii is moved into `.dunjii/trash` in the folder on your computer, and kept there for 14 days. ## Download and import Download a folder as a ZIP or a single file as itself, and add files from your computer by dragging them onto a folder. ### Downloading a folder 1. Right-click a folder in the sidebar and choose **Download as ZIP**. 2. Choose what goes in the ZIP: - **Folder only**: the folder and everything inside it. - **Folder and linked files**: the same, plus the files outside the folder that its documents link to, such as portraits and cards. 3. Click **Download**. Your browser saves a ZIP named after the folder and the date, such as `Mistwood 2026-12-02.zip`. One download holds at most 500 files and 50 MB. For a bigger folder, download its subfolders one at a time. ![The download dialog for a campaign folder.](https://dunjii.com/docs-assets/your-files/download-dialog.webp) ### What the ZIP contains The ZIP holds the folder and its subfolders as the sidebar shows them: - each document as a markdown file, frontmatter included - each picture as an image file, beside its notes file (`Name.metadata.md`) - each folder's `metadata.md`, so the folders keep their type, theme and other [settings](https://dunjii.com/docs/organizing/folder-settings.md) ```text Mistwood/ metadata.md Party.md Session 3/ metadata.md The Ferry Crossing.md scenes/ The Tithe Barn.md ``` - `metadata.md`: The campaign's settings. - `metadata.md`: Makes this folder a session. With **Folder and linked files**, the paths in the ZIP start at the top of your workspace, so a portrait from `Library/Portraits` keeps its place and links to it still work. The ZIP also includes the `metadata.md` of each folder above those files, so a spell copied out of `Library/Spells` is still a spell. ### The whole workspace Dunjii has no single download for the whole workspace. Download each top-level folder, or use the [desktop app](https://dunjii.com/docs/your-files/desktop-app.md), which keeps a copy of the whole workspace in a folder on your computer. **Settings › Account** has **Download a copy of my data (JSON)** under **Your data**. It saves one JSON file with your account details and the text of your documents; pictures are listed by address, not included. Dunjii can't import this file. ### Downloading a file Right-click a document or picture in the sidebar and choose **Download**: - **File only** saves the file as Dunjii stores it: a document as its markdown file, a picture as its image file. - **File and linked files** saves a ZIP of the file and the files it links to, such as portraits and cards. A PDF downloads as itself, with no choice to make. To read a document's markdown in the browser, choose **View raw markdown** from the same menu. It opens the document's address with `.md` added to the end, which you can also type yourself. ![The sidebar menu for one document.](https://dunjii.com/docs-assets/your-files/file-menu.webp) ### Importing files Drag files or folders from your computer onto a folder's page in Dunjii. They go into the folder you have open, and a dropped folder keeps its structure. **Upload files**, at the bottom of a folder's page, opens a file picker instead. - Dunjii takes Markdown, PDF, CSV and ZIP files, and PNG, JPEG, WebP and GIF images. PDFs need the Pro plan. - A ZIP is unpacked into the folder. A CSV becomes markdown: one document per row when the rows are records, or one table. - A markdown file without a `type:` takes the folder's [`defaultType`](https://dunjii.com/docs/organizing/folder-settings.md). - Files and folders whose names start with a dot, such as `.obsidian`, are skipped. One drop takes up to 5,000 files, and each markdown file can be up to 256 KB. When Dunjii can't tell what type some files are, it lists them before importing, under a title such as **Import 29 files into Session 3**. Set a **Type** for each row, then click **Import 29 files**. When Dunjii unpacks a ZIP, a message with **Undo** appears for 30 seconds. When the list opened, it shows **Undo import** once the files are in. Either one removes every file the drop added. ### Obsidian and Notion To import an Obsidian vault, drop the vault's folder, or a ZIP of it, onto a folder in Dunjii. A Notion export ZIP works the same way. Dunjii reads the tags and types from Obsidian notes and the property lists from Notion pages, and writes them as frontmatter. Notion exports each database as a CSV file as well as its pages; Dunjii keeps the pages. To keep writing in Obsidian after you import, sync the workspace to a folder with the [desktop app](https://dunjii.com/docs/your-files/desktop-app.md) and open that folder as your vault. ## Desktop app and sync The Dunjii app for Mac and Windows keeps a folder on your computer in sync with your workspace, so you can edit your files in Obsidian or any other editor. ### Installing the app Download the app from the [download page](https://dunjii.com/download), which offers **Download for macOS** and **Download for Windows**. There is no Linux version. - **Mac:** open the `.dmg` file and drag Dunjii into Applications. Dunjii runs in the menu bar, not the Dock. - **Windows:** run the setup file and click **Install**. Dunjii installs for your account only and starts when you sign in to Windows. Its icon is in the notification area by the clock; click the ^ arrow if you don't see it. If Windows says it protected your PC, click **More info**, then **Run anyway**. The app also installs the `dunjii` command for the terminal. On a Mac, choose **Install CLI Tool...** from the menu if it is there. **Start on Login** turns starting the app with your computer on or off. ### Signing in and setting up a folder 1. Click the Dunjii icon and choose **Log In...** to sign in with your browser. 2. The menu now lists your workspace. Choose **Set Up...** under its name. Dunjii creates a folder for your workspace inside a folder named `Dunjii` in your home folder, downloads your files into it, and keeps it in sync from then on. The computer appears in **Settings › Desktop app** under **Signed in**; click **Sign out** there to stop it syncing. To keep the workspace in a different folder, run `dunjii sync` in that folder instead of choosing **Set Up...**, then quit the app and open it again. The app syncs every folder you have run `dunjii sync` in. [Local agents](https://dunjii.com/docs/agents/local-agents.md) shows the commands. To stop syncing a folder, choose **Remove** under its name in the menu. The files stay on your computer. ### How changes move While the app runs, it watches the folder and uploads a file about a second after you save it. Changes made in Dunjii, on the web or on another computer, reach the folder within a few seconds, because Dunjii tells the app when something changes. If that connection drops, the app checks for changes every 60 seconds. On a Mac, opening the menu syncs right away. On Windows, choose **Sync Now**. **Stop Sync** pauses every folder until you choose **Start Sync**. The line under each folder's name says when it last synced, such as **Synced 12s ago**. | File | Syncs | | ------------------------------------------- | ----- | | Markdown (`.md`, `.markdown`) | Yes | | PNG, JPEG, GIF, WebP and SVG images | Yes | | PDF | On the Pro plan | | Names starting with a dot, such as `.obsidian` | No | | Any other file | No: it stays on your computer | To keep more files out of sync, list them in `.dunjii/ignore` in the synced folder. It takes the same patterns as a `.gitignore` file. ```text Scratch/ *.draft.md ``` - `Scratch/`: A folder that stays on this computer. - `*.draft.md`: Any file ending in .draft.md, in any folder. ### Conflicts Dunjii merges edits made in two places at once. When you change one section of a document on your computer and someone changes another section on the web, both changes are kept. Frontmatter merges key by key. When both sides changed the same part, the edit that reaches Dunjii last wins. Dunjii saves the other copy in the document's [history](https://dunjii.com/docs/your-files/version-history.md), marked **displaced**, so nothing is lost. Pictures follow the same rule: the later picture wins and the earlier one stays in the history. Documents with a displaced copy are listed on the History page's **Needs review** tab, and the sidebar row reads **History · 1 to review**. Open a document from the list to see the displaced copy and a line saying what replaced it, such as "Replaced by a sync from" and the computer's name. Then: - **Restore** makes the displaced copy the current version. - **Show what replaced it** steps to the version that won. - **Okay, noted** takes the document off the list and changes nothing. ### Deleted files on your computer When a file is deleted in Dunjii, the app moves your copy into `.dunjii/trash` in the synced folder instead of deleting it. Each sync removes anything there older than 14 days. When one sync moves 10 or more files at once, the menu shows a warning such as **⚠ Sync moved 12 files to trash**, with **Restore them** to put them back and **Dismiss** to leave them in the trash. When you delete a file on your computer, Dunjii deletes it too, and you can restore it from **Recently deleted**. See [Deleted files](https://dunjii.com/docs/your-files/trash.md). ### Obsidian, other editors and the terminal The synced folder holds ordinary markdown files and images, so any editor can open it. To use Obsidian, open the folder as a vault. Obsidian keeps its own settings in `.obsidian`, which doesn't sync, and wikilinks such as `[[Ferryman Odo]]` work in both. | Command | What it does | | ------------------------------- | ------------ | | `dunjii sync` | Syncs the folder once. | | `dunjii sync --watch` | Keeps syncing until you press Ctrl+C, as the app does. | | `dunjii sync status` | Lists the folders the app syncs and how each one is doing. | | `dunjii history ` | Lists a file's versions. | | `dunjii restore --to 3` | Writes version 3 back into the file. `--to` also takes a time, such as `1d` or `yesterday`. | | `dunjii trash list` | Lists the batches of files sync moved into `.dunjii/trash`, newest first. | | `dunjii trash restore latest` | Puts the newest batch back where it was. | [Local agents](https://dunjii.com/docs/agents/local-agents.md) covers `dunjii login` and setting up a folder from the terminal. ## 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](https://dunjii.com/download), then run these in a terminal: ```shell dunjii login cd ~/campaigns dunjii sync dunjii agents ``` - `dunjii login`: Opens 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. - `dunjii sync`: Downloads your workspace into this folder. The first time, it asks before it links the folder to your account. - `dunjii agents`: Writes 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 ` | 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 ` | Prints a creature's stat block, ready to paste. | | `dunjii sourcebook search ` | 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](https://app.dunjii.com/manage/me/history). ## Markdown in Dunjii Dunjii pages are GitHub-flavored markdown with a few additions for running a game. Each one still reads as plain text in any other editor. ### Title and subtitle The `#` heading is the page's title. An italic line right under it becomes the subtitle. ```markdown # Eldric Vael *Old elf, scholar of Oghma* Finds the undead in the temple fascinating rather than terrifying. Trails off when a new idea arrives. ``` - `*Old elf, scholar of Oghma*`: An italic line right under the title is the subtitle. ### Callouts A blockquote whose first line is `[!callout]` becomes a box. Dunjii removes the marker line and draws the rest. A blockquote without the marker stays a quote. ```markdown > [!callout] > ### Locked door > DC 15 to pick. The key hangs in the abbot's study, behind the tapestry. ``` - `> [!callout]`: The marker. It has to be the first line of the blockquote. ### Block layouts A comment line before a list or a table changes how Dunjii draws it. Other markdown editors hide comments, so the file still reads correctly in Obsidian or on GitHub. ```markdown - **AC** 12 - **HP** 50 - **Speed** 30 ft. - **Init** +2 - **Passive Perception** 13 - **CR** 6 ``` - ``: Draws each item as a box, with the bold words as its label. - ``: Puts the items side by side on one line. Add `scale=0.9` after the layout to draw the block at 90% of its size. The layouts: | Layout | Value | Goes before | Games | | --- | --- | --- | --- | | Plain lines | `plain-lines` | A list | All | | Inline list | `inline` | A list | All | | Vitals | `vitals` | A list | All | | Abilities (D&D 2024) | `dnd-2024-ability-grid` | A table | D&D 5e | ### Highlights and rolls Two equals signs on each side highlight text. Dice notation such as `2d6 + 4` becomes a button that rolls it on a Dunjii page, and a highlighted bonus such as `==+6==` rolls a d20 with that bonus. ```markdown **Arcane Burst.** ==+6== to hit, 16 (3d8 + 3) force damage. ``` - `**Arcane Burst.** ==+6== to hit, 16 (3d8 + 3) force damage.`: ==+6== is highlighted and rolls 1d20 + 6. 3d8 + 3 rolls as written. ### Links Double brackets link to another document in your workspace by its name. A Sourcebook page links by its address. ```markdown [[Eldric Vael]] [[Eldric Vael#Personality|the old scholar]] ![[mistwood-map.png]] [Fireball](https://dunjii.com/sourcebooks/dnd-srd-5.2.1/Spells/Fireball) ``` - `[[Eldric Vael]]`: The document named Eldric Vael. - `[[Eldric Vael#Personality|the old scholar]]`: A heading in it, shown as "the old scholar". - `![[mistwood-map.png]]`: An image from your workspace, drawn in place. - `[Fireball](https://dunjii.com/sourcebooks/dnd-srd-5.2.1/Spells/Fireball)`: A Sourcebook page. Moving or renaming a document in the app updates the links that point at it. ### Everything else Tables, lists, task lists, bold, italic and images work as in any GitHub-flavored markdown. Frontmatter at the top of a file sets the document's type and its settings: see [Document types](https://dunjii.com/docs/reference/document-types.md) and [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md). ## Document types The value of type in a document's frontmatter, for each game Dunjii supports, and the sections each type suggests. ### How a document gets its type A document's type decides the sections Dunjii suggests while you write, the filters it shows up under, and whether it prints as a page or as a card. A document takes its type from its own frontmatter. Without one, it takes the `defaultType` of the nearest folder above it that sets one. See [Folder settings](https://dunjii.com/docs/organizing/folder-settings.md). ```markdown --- type: npc --- # Eldric Vael ``` - `type: npc`: This document is an NPC, wherever it lives. Which values are valid depends on the folder's `ruleset`. The suggested sections are suggestions: Dunjii never requires them. On your computer, `dunjii shape ` prints the full shape of a type, with what to write in each section. ### D&D 5e The `5e-srd` ruleset. | Type | Value | Suggested sections | | --- | --- | --- | | Ability | `ability` | Card Description | | Card Sheet | `card-sheet` | None | | Class | `class` | None | | Coin Sheet | `coin-sheet` | None | | Item | `item` | Card Description | | NPC | `npc` | First Impression, Voice, Secrets | | PC | `pc` | None | | Rule | `rule` | Card Description | | Scene | `scene` | Situation, Cast, Clues, Notes | | Shop | `shop` | None | | Species | `species` | Card Description | | Spell | `spell` | Card Description | | Subclass | `subclass` | None | ### Draw Steel The `draw-steel` ruleset. | Type | Value | Suggested sections | | --- | --- | --- | | Ability | `ability` | None | | Card Sheet | `card-sheet` | None | | Coin Sheet | `coin-sheet` | None | | Condition | `condition` | None | | Malice | `malice` | None | | Monster | `monster` | None | | Monster Family | `monster-family` | None | | NPC | `npc` | First Impression, Voice, Secrets | | PC | `pc` | None | | Rule | `rule` | None | | Scene | `scene` | Situation, Cast, Clues, Notes | | Title | `title` | None | | Treasure | `treasure` | None | ### Pathfinder 2E The `pf2e` ruleset. | Type | Value | Suggested sections | | --- | --- | --- | | Action | `action` | None | | Card Sheet | `card-sheet` | None | | Coin Sheet | `coin-sheet` | None | | Condition | `condition` | None | | Creature | `creature` | None | | Feat | `feat` | None | | Hazard | `hazard` | None | | Item | `item` | None | | Item Family | `item-family` | None | | NPC | `npc` | First Impression, Voice, Secrets | | PC | `pc` | None | | Rule | `rule` | None | | Scene | `scene` | Situation, Cast, Clues, Notes | | Spell | `spell` | None | ## CLI reference Every dunjii command and flag, from the command's own help. ### Commands The `dunjii` command comes with the Dunjii desktop app. [Download the app](https://dunjii.com/download) to install it, and see [Local agents](https://dunjii.com/docs/agents/local-agents.md) for a first sync. `dj` is a shorter name for the same command. | Command | What it does | | --- | --- | | `dunjii agents` | Add instruction files for AI coding agents (AGENTS.md, CLAUDE.md) | | `dunjii app` | Launch Dunjii menu bar app with background sync | | `dunjii app install` | Install Dunjii for the current user (Windows) | | `dunjii app remove-folder [path]` | Stop syncing a folder in the background | | `dunjii app uninstall` | Remove Dunjii from login items, PATH, and the CLI symlink | | `dunjii backlinks ` | What links to this file | | `dunjii clone [directory]` | Clone a workspace from Dunjii | | `dunjii copy ... ` | Copy files within the workspace, fixing the copy's own links | | `dunjii diff [version1] [version2]` | Compare file versions | | `dunjii filter ...` | Find files by type, tag, or any declared property | | `dunjii history [path]` | Show version history for files | | `dunjii image` | Wire image files into your markdown | | `dunjii image attach` | Insert or replace an image link in a markdown section | | `dunjii init` | Set up the current directory as your Dunjii workspace | | `dunjii link [workspace]` | Connect this folder to an existing Dunjii workspace | | `dunjii login` | Log in to Dunjii | | `dunjii logout` | Sign this computer out of Dunjii | | `dunjii move ` | Move or rename a file and rewrite all references to it | | `dunjii new` | Start a campaign or a session | | `dunjii new campaign ` | Start a campaign in the current workspace | | `dunjii new session [campaign]` | Start a session in a campaign | | `dunjii preview ` | A link that draws a map as Dunjii will, without syncing it | | `dunjii random [table]` | Roll on a random table | | `dunjii restore --to ` | Restore a file to a previous version | | `dunjii shape [type]` | What a document of a given type looks like in source | | `dunjii shared` | List workspaces other people have shared with you | | `dunjii show ` | Show the content of a file version | | `dunjii skill` | List and describe available skills for AI agents | | `dunjii skill describe ` | Print full instructions for a skill | | `dunjii skill list` | List available skills | | `dunjii sourcebook` | The bundled reference content: read it, search it, copy from it | | `dunjii sourcebook copy ... ` | Copy Sourcebook pages into this workspace | | `dunjii sourcebook search [key:value]...` | Search the Sourcebook | | `dunjii sourcebook show ` | Print a Sourcebook page | | `dunjii statblock ` | Print a creature's stat block, ready to paste | | `dunjii sync` | Sync all files with Dunjii server | | `dunjii sync status` | What is being synced in the background, and how it is going | | `dunjii trash` | Manage locally-deleted files held in .dunjii/trash | | `dunjii trash list` | List trash batches in this workspace, newest first | | `dunjii trash restore [...]` | Restore files from a trash batch back to their original locations | | `dunjii trust` | Use the sign-in saved in this folder's .dunjii/config.json | | `dunjii url ` | The web address of a file in this workspace | | `dunjii validate [path]` | Validate your markdown files | Run `dunjii --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. | Command | Flag | What it does | | --- | --- | --- | | `dunjii agents` | `--force` | Change existing files without asking: replace AGENTS.md, add the import to CLAUDE.md | | `dunjii app` | `--no-sync` | Start without auto-syncing (manual start/stop only) | | `dunjii app install` | `--no-autostart` | Don't register the app to start at login | | `dunjii backlinks` | `--json` | Emit JSON (for tools and agents) | | `dunjii copy` | `--force` | Overwrite the destination if it exists | | `dunjii copy` | `--rename` | Name the copy (only valid with a single source into a directory) | | `dunjii diff` | `--no-color` | Disable colored output | | `dunjii filter` | `--json` | Emit JSON (for tools and agents) | | `dunjii filter` | `--keys` | List every filterable property and its values | | `dunjii history` | `--limit, -l` | Maximum number of versions/files to show (default 20) | | `dunjii image attach` | `--alt` | Alt text for the image (default: H1 from markdown) | | `dunjii image attach` | `--image` | Image file to reference | | `dunjii image attach` | `--level` | Heading level for new sections (default 2) | | `dunjii image attach` | `--md` | Markdown file to update | | `dunjii image attach` | `--section` | Heading text (e.g. 'Portrait', 'Illustration') | | `dunjii link` | `--force` | Skip the confirmation, and re-link a folder that is already linked | | `dunjii login` | `--local` | Save credentials to .dunjii/config.json in the current directory instead of ~/.dunjii/ | | `dunjii login` | `--no-browser` | Don't open a browser; print a code to enter at /device on any computer instead | | `dunjii move` | `--dry-run, -n` | Print the move and every rewrite without changing anything | | `dunjii move` | `--force, -f` | Overwrite the destination if it exists | | `dunjii new session` | `--number` | Session number (default: next available) | | `dunjii new session` | `--title` | Optional session title (written into the Session.md heading) | | `dunjii preview` | `--open` | Also open the link in the default browser | | `dunjii random` | `--n, -n` | Draw this many (default 1) | | `dunjii restore` | `--to` | Version number or time spec (3h, 1d, yesterday, 1w) | | `dunjii restore` | `--yes, -y` | Skip confirmation prompt | | `dunjii shape` | `--json` | Emit JSON (for tools and agents) | | `dunjii shape` | `--ruleset` | Describe this ruleset's types (default: the current folder's) | | `dunjii show` | `--version, -v` | Version number to show | | `dunjii sourcebook copy` | `--dry-run, -n` | Print what would be copied without writing anything | | `dunjii sourcebook search` | `--json` | Emit JSON (for tools and agents) | | `dunjii sourcebook search` | `--limit` | Stop after this many hits (0 for all) (default 20) | | `dunjii statblock` | `--local` | Only look in this workspace | | `dunjii statblock` | `--name` | Title the block with this name instead of the one you searched for | | `dunjii statblock` | `--sourcebook` | Only look in your Sourcebooks | | `dunjii sync` | `--watch, -w` | Watch for changes and sync continuously | | `dunjii validate` | `--fix` | Resolve wikilinks to relative paths and link Sourcebook pages by URL | | `dunjii validate` | `--strict` | Treat warnings as errors (exit 1 on warnings) |