Build a Custom Sheet
Where to start building your own character sheet with the Polyhedral SDK and CLI, including having an AI assistant write it for you.
Custom sheets are written with the Polyhedral SDK, a React component library that runs inside the sheet's sandbox. Fields bind to the sheet's data, so there is no save button to build.
Creating and publishing sheet templates, API keys and the CLI need a paid plan: Table, Solo or Solo Plus. On Free they are refused. See Plans. Anything that runs the AI also uses AI credits: What Uses AI Credits.
The docs
The developer docs live at /developers, with an index down the left of every page (on a phone, under Browse Docs):
- SDK at
/developers/sdk: a step-by-step first sheet, core concepts and examples. - SDK Reference at
/developers/sdk/reference: components, the dice API, storage, events, theme values and the field schema. - CLI, MCP Server, REST API, Webhooks and Dice Notation, each under
/developerstoo.
The Sheet Templates window links to the SDK as well.
Build with the CLI
- Install the CLI (
npm install -g @polyhedral/cli@beta; it needs Node.js 20 or later). polyhedral loginwith an API key. Make one in your avatar menu: Developer Tools, then API Keys.polyhedral init my-sheet. Choose in-app (JSX with the built-in components) or external (your own HTML).polyhedral devpushes the sheet, opens a preview, and re-pushes on every save.polyhedral pushpublishes,polyhedral validatechecks a file offline: that it compiles, and the rules every sheet on the shelf follows (no code built from text, no network calls outside the SDK, readable source, no inline picture over 8 KB).
Then add the template to a game: Custom Sheets.
Images in a sheet
A sheet loads images only from Polyhedral, so its own images (a masthead, icons, a paper texture) go in an assets/ folder beside the sheet file. polyhedral push and polyhedral dev upload the folder, and the code loads an image with Polyhedral.asset('masthead.webp'). Each version you publish keeps its own copy, so a character keeps the images its version came with. WebP, PNG, JPEG and SVG work, up to 1 MB a file and 10 MB a version. A player's own pictures, such as a portrait, go up from the sheet with Polyhedral.storage.upload().
Import a sheet file
A sheet does not have to arrive through the CLI. In the Sheet Templates window, Import a Sheet… takes a file from your computer: a .zip of a CLI project (its polyhedral.json and the sheet file it names), or a single .jsx or .html file. The dialog shows the name, build type, version and field count before anything is saved, and the code is checked the way polyhedral validate checks it.
This is also how to pass a sheet to another GM: zip the project folder and send it. They import it into their own library, where it is theirs to change. Steps and the rules for what is accepted: Set Up Sheet Templates.
Have an AI assistant build it
With the CLI installed, an AI coding assistant can do the whole loop: it reads the SDK docs (polyhedral docs), writes the sheet, validates it, pushes it and gives you a preview link. Describe what you want, for example "a character sheet with a stress track, trauma checkboxes and rated actions", then review and iterate.
This is separate from the in-game AI GM. The AI GM uses sheets that exist and keeps them up to date. It does not write the sheet's code.
Look up a compendium's entries
When the game's book has a compendium, a sheet can look its entries up and let the player pick one, such as a weapon or an occupation from the rulebook. The picked entry fills the sheet's fields and links back to its page. A sheet should still work without one. See Browse a Compendium for the player's side and the SDK Reference at /developers/sdk/reference for the calls.
Dice in a custom sheet
Sheets roll with the SDK's dice button. See Roll From a Character Sheet.
Related Articles
- Custom SheetsWhat a custom sheet is, how a GM adds one to a game, how players use it, and how updates to the design reach existing sheets.
- Set Up Sheet TemplatesAdd a sheet template to a game by adding a system that brings its own, importing a coded sheet from a file, or enabling a template you already have, so players can make their own sheets.
- Roll From a Character SheetHow to make a roll from a sheet, which depends on whether it is a note sheet or a custom sheet.
- Browse a CompendiumBuild a compendium from a book (its spells, weapons, skills, creatures and more), then browse, search, link and look its entries up by name, with the page one click away.
- PlansWhat the Free, Table, Solo and Solo Plus plans include, what they cost, and where to see or change yours.
- What Uses AI CreditsWhich parts of a game spend AI credits, which are free, and what happens when your balance runs out.