Skip to content
Bardo

Your agent, as Game Master

Play tabletop RPGs with the coding agent you already have.

Fair dice, agreed rules, kept secrets, a living world, easy undo, any game.

the-millbrook-bell

Read the transcript
  1. You: Wren keeps watching the hooded pilgrim by the fire. What is she hiding?

  2. I'll start by examining the campaign state and running the scene commands to understand what's happening.

  3. $ bardo scene

    Party view (player-safe). Party: Wren [wren] at lantern-inn, Tamsin [tamsin] at lantern-inn
    
    == The Lantern Inn [lantern-inn] ==
    A low, warm common room. Lanterns of every size hang from the beams, and the floorboards creak by the cellar door.
    Exits: Millbrook Square [square] (4 min)
    Here: Hollis [hollis] (npc) — The innkeeper: round, red-faced, forever polishing the same cup.
    Here: a hooded pilgrim (npc) — A pilgrim in a grey hood sits alone by the fire, a staff across her knees.
    Here: Tamsin [tamsin] (character) — A broad-shouldered smith who hums while she works.
    Here: Wren [wren] (character) — A wiry scout with a borrowed cloak and quick eyes.
  4. $ bardo scene --as Wren

    error USAGE: --as takes a character in the party. To see what anyone else knows, use --gm --as <id> (GM information: never show it to the player).
  5. $ bardo scene --as wren

    Viewing as Wren [wren] (player-safe).
    Sheet: grit=0, role="scout", wits=2, hp=8, stress=0
    
    == The Lantern Inn [lantern-inn] ==
    A low, warm common room. Lanterns of every size hang from the beams, and the floorboards creak by the cellar door.
    Exits: Millbrook Square [square] (4 min)
    Here: Hollis [hollis] (npc) — The innkeeper: round, red-faced, forever polishing the same cup.
    Here: a hooded pilgrim (npc) — A pilgrim in a grey hood sits alone by the fire, a staff across her knees.
    Here: Tamsin [tamsin] (character) — A broad-shouldered smith who hums while she works.
    
    …
  6. $ bardo rules list

    notice  approved  2d6+WITS  [10+: success, 7-9: clue, -6: nothing]
    struggle  draft  2d6+GRIT  [10+: prevail, 7-9: trade, -6: falter]
  7. $ bardo.json (struck through: not an allowed command, so it did not run)

  8. Glob "**/bardo.json" (1 match) Glob "rules/**/*.md" (3 matches) Read bardo.json Read rules/notice.md Glob "npcs/**/*.md" (2 matches) Read npcs/hooded-pilgrim.md

  9. Wren is watching for something hidden — that calls for the approved `notice` check (2d6+WITS). Rolling for Wren.

  10. $ bardo roll --check notice --who wren --reason "Wren keeps watching the hooded pilgrim by the fire for something hidden"

    notice: r-2: wren rolls 2d6[5,3] +WITS(2) = 10 (success) (Wren keeps watching the hooded pilgrim by the fire for something hidden)
  11. Success (10). Wren spots what the pilgrim is carrying — I'll record the observation and teach Wren the secret she discovered.

  12. $ bardo learn wren "The hooded pilgrim is carrying the cellar key" --secret hooded-pilgrim:carries

    wren learned (observed) [k_b31c57cfa331e3dcd4faded2]: The hooded pilgrim is carrying the cellar key
  13. $ bardo record "Wren, watching the hooded pilgrim by the fire, spots what the pilgrim is carrying" --who wren

    Recorded ev-4 at The Lantern Inn. Witnesses: Wren.
  14. Your watching pays off. The grey-hooded pilgrim shifts against the firelight, and for a moment the folds of her robe part: at her belt hangs a small key, the sort that would turn in the cellar door whose boards creak behind you. Her hand keeps drifting to it whenever Hollis's eye wanders that way. She hasn't looked up once — but her stillness feels deliberate, not sleepy. She sits there with the staff across her knees, one hand near that hidden key, waiting. The fire burns low. What do you do?

The end of the turn: Bardo records what Wren learned and saw, and the agent narrates.

Bardo works with the coding agent you already use.

  • Claude Code
  • Codex
  • OpenCode
  • Antigravity
  • Copilot CLI
  • Cursor
  • Grok
  • Pi

(02) — What is Bardo?

Bardo is a CLI, a command-line tool: a small program your coding agent runs for you, much as you would reach for a calculator. Coding agents can now do far more than write code, and with the right tools they can run a whole campaign. Bardo is that toolbox, made for tabletop RPGs, from the first scene to the hundredth.

  1. Any game

    Any tabletop RPG, by the rules you give it in your own words or draft from your rulebook.

  2. Plain files

    The campaign is Markdown in a folder on your computer.

  3. Completely free

    No ads, no account, no subscriptions, no nothing. Free, period.

  4. No AI of its own

    Your agent does the talking. Bardo keeps the facts: dice, rules, clock, secrets, and much more.

Features

Your agent brings the story. Bardo brings everything a long campaign needs to stay fair and remembered.

See every feature on GitHub →
  • Session zero

    Before the first scene your agent asks how you want to play: the game, the tone, your limits. Play waits until it’s done.

  • Fair dice

    Bardo rolls every die, never the agent, and logs who rolled, why and every face. Re-rolls are flagged.

  • Secrets that stay secret

    GM-only notes, hidden names, and what each character has learned. You see only what the party knows.

  • A living world

    A world clock, travel, weather, festivals, market prices, and NPCs who keep daily routines.

  • Quests with deadlines

    A main quest, side and secret quests with ordered steps, and threats that strike on time whether or not you arrive.

  • Fights

    Turn order, sides and rounds, a defeat rule you choose, and a tally of the damage dealt and taken when it ends.

  • An oracle for solo play

    Ask a yes-or-no question at the odds the story suggests, and get yes or no, sometimes with an “and” or a “but”.

  • Undo

    Take back the latest move: its files, the clock and the fight. Its rolls stay in the log, so undo is never a free re-roll.

Install

Install it once. The command is bardo.

  • pnpmpnpm add -g @bardo-ttrpg/cli
  • npmnpm install -g @bardo-ttrpg/cli
  • bunbun add -g @bardo-ttrpg/cli
  • trypnpx @bardo-ttrpg/cli --help

Bardo needs Node.js 22 or newer and a coding agent that can run commands. Then make a campaign with bardo init the-millbrook-bell, open the folder with your agent, and ask it to be your Game Master.

Fully open source. The code is on GitHub under the MIT licence: read it, change it, share it, build on it.

Enjoying it? If Bardo earns a place at your table, you can support it on Buy Me A Coffee.

FAQ

What is Bardo?

A free command-line tool that turns your coding agent into a tabletop RPG Game Master. Your agent tells the story; Bardo rolls the dice, keeps the rules and the secrets, and remembers the world, in plain files on your computer.

How do I play?

Install Bardo, make a campaign with bardo init, and open the folder with your agent. Bardo writes a Game Master guide into the folder (AGENTS.md, the file most agents read) and ships the same guide as an agent skill, so your agent knows to use bardo for every roll, move and fact. Then tell it what you want to play.

Do I need an API key or an AI subscription?

Not for Bardo: it calls no AI of its own and needs no account. Your agent runs on the plan it already uses, or on a free model if your agent offers one.

Which coding agents work?

Bardo is tested with the first four agents shown above, and any coding agent that can run commands in a folder should work. Your agent needs your permission to run bardo.

Which games can I play?

Any tabletop RPG. Give Bardo the rules in your own words, or let your agent draft them from your rulebook; Bardo rolls a check only once you have approved its rule.

Can I play solo?

Yes. The oracle answers yes-or-no questions at the odds the story suggests, and random tables of encounters, rumours and loot fill in what nobody at the table knows.

Can the agent cheat?

Bardo rolls every die and logs who rolled, why and every face. A second roll for the same thing is flagged, and undone rolls stay in the log, marked void. Secrets stay out of your view, and Bardo warns when one slips into the story.

Where do my files go?

Nowhere. The campaign is a folder of Markdown files on your computer, and Bardo itself sends nothing anywhere. Your agent’s provider sees what the agent reads, as with any coding work.

How much does it cost, and is it open source?

Nothing: Bardo is free and open source under the MIT licence. Read the code, change it, share it. If it earns a place at your table, you can support it on Buy Me A Coffee.