bunnyforge
An opinionated way to run a tabletop-RPG campaign as a plain-files workspace — designed to be managed collaboratively by a GM and an AI agent, with one-way publishing to a DokuWiki players' site.
Your campaign is a directory of Markdown files with front matter: NPCs,
factions, places, sessions, mechanics. bunnyforge gives that directory a
skeleton, reviews its integrity, generates names from culture inventories
you define, and exports the player-visible slice to DokuWiki. Everything
is a text file; the only state is your git history. Every command works
offline except the wiki deploy itself — and even that keeps a fully
offline path via deploy-export --render-only.
- Python ≥ 3.11, zero runtime dependencies.
- Agent-first doctrine.
initwrites anAGENTS.mdcontract that tells an AI agent how to behave in the workspace, and doctrine skeletons — a style guide and a situation-design guide that interview you: each section explains what belongs in it, so filling them in is answering questions, not staring at a blank file. - Player-visibility model. Every file carries a
visibilityfield; the exporter enforces it, so GM-only material cannot leak to the wiki.
Install
pip install bunnyforge
Quickstart
bunnyforge init my-campaign --name "My Campaign"
cd my-campaign
bunnyforge review checkup # 0 errors, 0 warnings on a fresh workspace
Then fill in style-guide.md and situation-design.md — they arrive as
skeletons that tell you what each section is for — and start writing
entity files from the templates in _Templates/.
Subcommands
| command | what it does |
|---|---|
init |
scaffold a new campaign workspace |
review |
run a named workspace review suite (checkup, wiki) |
export-player |
write player-safe copies of content files to Export/ |
deploy-export |
render Export/ and deploy it to the wiki (dry run by default) |
import-perceptions |
import player-authored wiki pages into Perceptions/ |
build-sheets |
build one-page HTML reference sheets for a session |
names |
generate culture-appropriate names |
test |
run the workspace test suite |
Run bunnyforge <command> --help for a command's own options.
The workspace
campaign.toml marks the workspace root and holds configuration —
directory layout, wiki namespace, name-generator inventories. Commands
work from any subdirectory (they walk up to the marker), from
$BUNNYFORGE_WORKSPACE, or from anywhere with --workspace PATH.
init also scaffolds a tests/ folder. Its README.md explains the
campaign tests it invites you to write — the setting-specific invariants
review checkup cannot know, like "every NPC's faction actually exists" —
and ships a worked example, commented out, to adapt. bunnyforge test
runs them, and checks that no test wrote into your campaign while running.
Names
bunnyforge names builds names from syllable inventories you write
yourself, one TOML file per culture. The tool ships the engine and a
worked example; it ships no cultures of its own, and takes no position on
which real-world naming tradition any fantasy species should draw on —
that is a setting-authorship decision, and it stays yours.
bunnyforge names --list
bunnyforge names <culture> -n 10
bunnyforge names <culture> --place --seed 42
The samples/ directory is a ladder of eight worked
configurations, from a single people to a full multi-culture setting with
registers and spelling variants.
DokuWiki export
export-player renders the player-visible slice; deploy-export renders it
into DokuWiki markup and deploys it to the wiki over its JSON-RPC API. Sync
is strictly one-way: the wiki is a published artifact, never a source of
truth. import-perceptions brings player-authored pages back as
perceptions — recorded belief, explicitly not canon.
Dry runs and --go
Every mutating command follows one convention: the default run is a dry
run; --go performs the writes. A bare bunnyforge deploy-export fetches
and prints the full deploy plan without writing anything; a bare
bunnyforge import-perceptions reports what it would import. Re-run with
--go to act. (deploy-export --render-only is not a rehearsal — it is a
different, offline deliverable, and needs no wiki config at all.)
Future mutating commands inherit this convention.
Development
pip install -e .
python3 -m unittest discover -s tests -t .
(bunnyforge test is for running a campaign's tests from inside a
workspace — it is not this package's test runner.)
The bunnyforge command is not a file in this repository: pip generates a
launcher from [project.scripts] in pyproject.toml at install time, and
it calls the dispatcher in src/bunnyforge/cli.py.
Every subcommand is also runnable on its own — python3 -m bunnyforge.generate_names — which is exactly what the dispatcher forwards
to.
Design history lives in docs/superpowers/specs/.
Releasing
Releases are triggered by pushing a tag, and published to PyPI by trusted publishing — there is no API token stored anywhere.
-
Land the changes on
mainin the usual way (branch, PR, review). -
Bump
versioninpyproject.toml. This is a separate step from the tag, which is why they drift — CI refuses a tag that disagrees with it. -
Tag and push:
git tag vX.Y.Z && git push origin vX.Y.Z -
Watch
publish.yml. It verifies the tag againstpyproject.toml, builds the sdist and wheel, and uploads. -
Confirm the release is actually installable, in a clean virtualenv on a path holding no checkout:
pip install bunnyforge==X.Y.Z pip show bunnyforge # check the version it really installedCheck the version it reports rather than trusting the workflow's green tick — see the note on index lag below.
-
Bump the pin in any campaign that depends on this package, in its own commit, so the upgrade is deliberate and its drift guard can report what changed underneath it.
Note that PyPI never releases a name and never lets a version number be reused, even after deletion — so step 2 is the one to get right.
Index lag, right after a release
For a few minutes after a successful publish, PyPI may still serve the previous version to some clients. Expect any of these, and do not go looking for a bug:
-
pip install bunnyforgequietly installs the older version — which is why step 5 checks what actually landed rather than assuming; -
a consuming project's CI fails with
ERROR: Could not find a version that satisfies the requirement bunnyforge==X.Y.Z (from versions: <older>)on a clean runner with no cache involved.
The fix is to wait a few minutes and re-run. Two things that mislead here:
https://pypi.org/pypi/bunnyforge/json can report the new version while the
simple index a given client reaches has not caught up, and --no-cache-dir
does not help, because the staleness is not local. Different machines
disagree at the same moment.
All three of these were observed within minutes of one release; each resolved on its own with no change.
License
MIT — see LICENSE.
Metadata
Release files for bunnyforge 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bunnyforge-0.2.1.tar.gz | 186.4 kB | With provenance | Details for bunnyforge-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bunnyforge-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for bunnyforge-0.2.1-py3-none-any.whl |
Total release size: 306.9 kB
Release files / bunnyforge-0.2.1.tar.gz
| Download URL | bunnyforge-0.2.1.tar.gz |
|---|---|
| Size | 186.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14e86873f6f6bfb0b1fae16770407226b1dff54bac2e09381e5774adc1e0a490
|
|
BLAKE2b-256 checksum How to use checksums |
ab88b7be0d51a08d0a4a0212950abc86291288924f485c8931bf301e9c2cb09d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logRelease files / bunnyforge-0.2.1-py3-none-any.whl
| Download URL | bunnyforge-0.2.1-py3-none-any.whl |
|---|---|
| Size | 120.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35902c43a34d3347ea3ad2b075b4041db9c28db0f6b05304d211256918f0002a
|
|
BLAKE2b-256 checksum How to use checksums |
2e68c7a7dd2ab9492b23d26af9f45a819f8124ca3a6979514a89b9e40fb346bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logSecurity for bunnyforge 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bunnyforge-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.