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.

These steps are for Polyhedral on the web.

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 /developers too.

The Sheet Templates window links to the SDK as well.

Build with the CLI

  1. Install the CLI (npm install -g @polyhedral/cli@beta; it needs Node.js 20 or later).
  2. polyhedral login with an API key. Make one in your avatar menu: Developer Tools, then API Keys.
  3. polyhedral init my-sheet. Choose in-app (JSX with the built-in components) or external (your own HTML).
  4. polyhedral dev pushes the sheet, opens a preview, and re-pushes on every save.
  5. polyhedral push publishes, polyhedral validate checks 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.