JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q28322F
  • License MIT

CLI tool for local Polyhedral custom sheet template development

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@polyhedral/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @polyhedral/cli

    CLI for building custom character sheet templates on Polyhedral. Edit locally in your own editor, push to the server, and preview changes live.

    Install

    npm install -g @polyhedral/cli

    Requires Node.js 20+. Or use npx @polyhedral/cli without installing.

    Quick Start

    # Log in with your API key (get one from Connected Apps in your account settings)
    polyhedral login
    
    # Scaffold a new template project
    polyhedral init my-sheet
    cd my-sheet
    
    # Start the live preview loop — edit, save, see it update
    polyhedral dev

    Commands

    Command Description
    polyhedral login Authenticate with your API key
    polyhedral logout Remove stored credentials
    polyhedral whoami Show current login status
    polyhedral init Scaffold a new template project
    polyhedral dev Watch file, auto-push on save, open live preview
    polyhedral push Validate, upload, and publish a new version
    polyhedral pull Download a template to a local file
    polyhedral delete Delete a template
    polyhedral list List all your custom sheet templates
    polyhedral versions List version history for a template
    polyhedral validate Check a template file for syntax errors (offline)

    Push Options

    polyhedral push                # Patch bump (default)
    polyhedral push --minor        # Minor version bump
    polyhedral push --major --changelog "breaking changes description"
    polyhedral push -f             # Skip confirmation prompt

    Global Options

    Flag Description
    --json Output structured JSON (skips prompts, useful for CI)
    --version Show CLI version
    --help Show help

    Commands that modify data (push, pull, delete) prompt for confirmation. Use --force / -f to skip, or --json which implies --force.

    How It Works

    Templates are JSX files using the Polyhedral SDK component library. The CLI wraps the REST API to manage templates from the terminal.

    The dev command is the main workflow: it pushes your template, opens the preview page, and watches for file changes (including polyhedral.json). When you save, it validates locally and pushes automatically. The preview page uses realtime subscriptions, so it updates without a manual refresh.

    Validation runs offline using Babel — no network connection or login required.

    Docs

    Full documentation at polyhedral.co/developers/cli.

    License

    MIT