A CLI for wrangling directories of source files. Like a static generator, but for whatever.
Find a file
2025-03-20 14:43:00 -04:00
src Improved readme 2025-03-20 14:41:00 -04:00
.gitignore Improved HTML output 2025-03-08 20:23:29 -05:00
biome.json Organize into folders 2025-03-10 20:58:11 -04:00
bun.lock Concept jsx usage 2025-03-17 20:48:37 -04:00
package.json Concept jsx usage 2025-03-17 20:48:37 -04:00
README.md check 2025-03-20 14:43:00 -04:00
tsconfig.json Muse owns muse-shaped files now 2025-03-17 17:20:30 -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: some-hypenated-id # defaults to a slugified version of the file name
name: The Name of the Component # defaults to the file name
description: A markdown-enabled description # defaults to a placeholder
categories: # defaults to no categories
  - list
  - of
  - categories

Ability Definition

$define: ability
type: <ability type>      # Default: 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>
rarity: <rarity>
affinity: <roll type>
damage: 0
damageType: <damage type>
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
abilities:
  - [rank-1-ability-id-one, rank-1-ability-id-two]
  - [rank-2-ability-id-one]

Resource Definition

$define: resource
type: <resource type>
url: https://example.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
abilities:
  - some-ability-id
  - another-ability-id
ap: 0
hp: 0
ep: 0
xp: 0
muscle: <prowess>
focus: <prowess>
knowledge: <prowess>
charm: <prowess>
cunning: <prowess>
spark: <prowess>