A CLI for wrangling directories of source files. Like a static generator, but for whatever.
Find a file
2025-04-01 15:43:48 -04:00
src Generic muse 2025-04-01 15:43:48 -04:00
.gitignore Generic muse 2025-04-01 15:43:48 -04:00
biome.json Style updates 2025-03-21 12:20:51 -04:00
bun.lock Generic muse 2025-04-01 15:43:48 -04:00
package.json Generic muse 2025-04-01 15:43:48 -04:00
README.md Add and comment all schemas 2025-03-20 14:46:58 -04:00
tsconfig.json Generic muse 2025-04-01 15:43:48 -04:00

Playbill Builder CLI

This is a CLI tool for compiling Markdown and YAML files into a validated Playbill for Proscenium

Usage

Usage:
  muse [/path/to/binding.yaml] <options>

Options:
  --check         Only load and check the current binding and resources, but do not compile
  --outfile,  -o  Specify the output file path. If not specified, output to stdout
  --watch,    -w  Watch the directory for changes and recompile
  --renderer, -r  Specify the output renderer. Options: json, html
  --help,     -h  Show this help message

Binding File

Each Muse project should specify a binding.yaml file with the following shape:

name: My Playbill           # Required
author: My Name             # Required
version: 0.0.1              # Required
extend: ../another-playbill # Optional
files:                      # Optional
  - "**/*.yaml"
styles:                     # Optional
  - stylesheet.css
terms:                      # Optional
  Some Term: Some Definition
  Another Term: Another Definition

The Binding file is used to specify the metadata for the Playbill, as well as the files to be compiled. It is also the entry point for a project.

When using the muse CLI, you must provide either a path to a binding.yaml file or a directory which contains a binding.yaml file.

Common Types

Many Playbill components share common properties that expect a value from a predefined list. These are the common types used in the Playbill.

Roll Options

  • none
  • attack
  • fate
  • muscle
  • focus
  • knowledge
  • charm
  • cunning
  • spark

Damage Type Options

  • phy (denotes "physical damage")
  • arc (denotes "arcane damage")

Prowess Options

  • novice
  • adept
  • master

Challenge Options

  • novice
  • adept
  • master
  • theatrical

Ability Type Options

  • action
  • cue
  • trait

Definition Shapes

These YAML representations of definitions show the properties available for each Playbill component.

Note that every Playbill component definition can define the following properties:

id: an-id                         # defaults to a slugified version of the file name
name: Component Name              # defaults to the file name
description: Markdown description # defaults to a placeholder
categories:                       # defaults to no categories
  - list
  - of
  - categories

Ability Definition

$define: ability
type: <ability type>      # Defaults to action
ap: 0                     # AP cost to use this ability (default 0)
hp: 0                     # HP cost to use this ability (default 0)
ep: 0                     # EP cost to use this ability (default 0)
xp: 0                     # XP cost to learn this ability (default 1)
damage: 0                 # Damage dealt by this ability (default 0)
damageType: <damage type> # Type of damage dealt by this ability (default phy)
roll: <roll type>         # Roll type for this ability (default none)

Blueprint Definition

$define: blueprint
species: species-id  # ID of the species this blueprint is for
items:               # List of item IDs (default empty)
  - item-id
abilities:           # List of ability IDs (default empty)
  - ability-id
ap: 0                # Starting AP (default 4)
hp: 0                # Starting HP (default 5)
ep: 0                # Starting EP (default 1)
xp: 0                # Starting XP (default 0)
muscle: <prowess>    # Starting muscle prowess (default novice)
focus: <prowess>     # Starting focus prowess (default novice)
knowledge: <prowess> # Starting knowledge prowess (default novice)
charm: <prowess>     # Starting charm prowess (default novice)
cunning: <prowess>   # Starting cunning prowess (default novice)
spark: <prowess>     # Starting spark prowess (default novice)

Item Definition

$define: item
type: <item type>         # Defaults to wielded
rarity: <rarity>          # Defaults to common
affinity: <roll type>     # Defaults to none
damage: 0                 # Defaults to 0
damageType: <damage type> # Defaults to phy
hands: 1 | 2              # Only for wielded items
slot: <item slot>         # Only for worn items

Item Type Options

  • wielded
  • worn
  • trinket

Rarity Options

  • common
  • uncommon
  • rare
  • legendary

Item Slot Options

  • headgear
  • outfit
  • gloves
  • boots
  • adornment

Method Definition

$define: method
curator: Someone  # The name of the curator
abilities:        # A 2-d array of ability IDs
  - [rank-1-ability-id-one, rank-1-ability-id-two]
  - [rank-2-ability-id-one]

Resource Definition

$define: resource
type: <resource type>           # Defaults to text
url: https://url.com/image.jpeg # Only for image resources
data: <a 2-d array of strings>  # Only for table resources

Resource Type Options

  • text
  • image
  • table

Rule Definition

$define: rule
overrule: another-rule-id # Optional
order: 0                  # Optional

Species Definition

$define: species
hands: 2                # Defaults to 2
abilities:              # A list of innate ability IDs
  - some-ability-id
  - another-ability-id
ap: 0                   # Starting AP modifier
hp: 0                   # Starting HP modifier
ep: 0                   # Starting EP modifier
xp: 0                   # Starting XP modifier
muscle: <prowess>       # Defaults to novice
focus: <prowess>        # Defaults to novice
knowledge: <prowess>    # Defaults to novice
charm: <prowess>        # Defaults to novice
cunning: <prowess>      # Defaults to novice
spark: <prowess>        # Defaults to novice