Your agent, as Game Master
A free command-line tool that lets the coding agent you already use run your tabletop RPG.
npm i -g @bardo-ttrpg/cliFair dice, agreed rules, kept secrets, a living world, easy undo, any game.
the-lost-bell
Read the transcriptBack to the video

Bardo works with any coding agent.
- Claude Code
- Codex
- Grok Build
- Copilot CLI
- Gemini CLI
- OpenCode
- Cline
- Windsurf
- Antigravity
- Devin
- Roo Code
- Kilo Code
- Amp
- Qwen Code
- Junie
- Kiro
- Warp
- Zed
- Replit
- Trae
- Droid
- Augment
- Goose
- OpenHands
- Crush
- Continue
- Kimi Code
- Mistral Vibe
- Rovo Dev
- Pi
- Hermes Agent
And any other agent that reads AGENTS.md or agent skills.
(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.
Any game
Any tabletop RPG, by the rules you give it in your own words or draft from your rulebook.
Plain files
The campaign is Markdown in a folder on your computer.
Completely free
No ads, no account, no subscription. Free and MIT-licensed; a donation is optional.
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, with modules you switch on when your game needs them.
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 with npm, pnpm or bun. The command is bardo.
- npm
npm i -g @bardo-ttrpg/cli - pnpm
pnpm add -g @bardo-ttrpg/cli - bun
bun add -g @bardo-ttrpg/cli - try
npx @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-lost-bell, open the folder with your agent, and ask it to be your Game Master. To start from a folder with no campaign yet, add the same guide as the bardo-gm agent skill: npx skills add bardo-ttrpg/bardo-cli --skill bardo-gm.
Fully open source. The code is on GitHub and the package on npm, 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 has its own plan, key or free tier, and Bardo does not touch it.
Which coding agents work?
Any coding agent that can run commands in a folder. Bardo follows each agent’s documented conventions: it writes its Game Master guide to AGENTS.md, the file most agents read, with CLAUDE.md pointing to it, and ships the same guide as an agent skill. The agents above are some of the ones that read them. 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.


