npm.io
1.1.4 • Published 6d agoCLI

@sharpee/devkit

Licence
MIT
Version
1.1.4
Deps
4
Size
295 kB
Vulns
0
Weekly
1.1K

@sharpee/devkit

The Sharpee CLI engine — build, test, verify, and scaffold orchestration for Interactive Fiction projects.

Installation

npm install @sharpee/devkit

@sharpee/devkit provides the sharpee command. For standalone story authoring, install it globally or as a dev dependency:

npm install -g @sharpee/devkit
# then
sharpee build
sharpee init my-story

Inside the Sharpee monorepo, invoke it through the repo-root ./sharpee wrapper instead of a global install.

Overview

devkit orchestrates the build; tsf compiles (ADR-180):

  • Location-aware build — inside the monorepo it builds platform + bundle + in-repo stories; in a standalone author project it compiles src/ and emits the .sharpee bundle and browser client
  • Scaffoldinginit / init-browser create new story projects and add browser clients
  • Verifytsf build --npm plus a publish dry-run before shipping packages
  • npm-consumer testingtest:npm stands up a real npm consumer for a story and runs its transcripts
  • Story registryregister / list map a story name to a path under ~/.sharpee/devkit
  • Programmatic surfaces (runBuild, runVerify, runTestNpm, registry helpers, etc.) are also exported for embedding and testing

Usage

# Build a story (location-aware: monorepo vs standalone author project)
sharpee build my-story
sharpee build my-story --browser        # also build the self-contained browser client
sharpee build --zifmia                  # also build the zifmia multi-user server (monorepo)
sharpee build my-story --skip stdlib    # resume the platform build from a package

# Scaffold and clients
sharpee init my-story                   # new story project
sharpee init-browser                    # add a browser client to the current project
sharpee build-browser                   # build the browser client only

# Validate and inspect
sharpee verify                          # tsf build --npm + publish dry-run
sharpee clean                           # remove dist/, dist-esm/, tsbuildinfo
sharpee introspect [dir]                # emit the IDE project manifest (ADR-184/185) as JSON
sharpee ifid                            # IFID utilities (generate, validate)
sharpee bundle                          # (monorepo) assemble dist/cli/sharpee.js

# npm-consumer transcript testing
sharpee test:npm my-story --local --chain

# Story registry
sharpee register ./path/to/story --name my-story
sharpee list

Commands

Command Description
build [story|path] Build a story (location-aware: monorepo vs standalone)
build-browser Build the browser client only
init <name> Scaffold a new story project
init-browser Add a browser client to the current project
introspect [dir] Emit the IDE project manifest (ADR-184/185) as JSON
ifid IFID utilities (generate, validate)
bundle (monorepo) Assemble dist/cli/sharpee.js
clean Remove build artifacts
verify tsf build --npm + publish dry-run
test:npm <loc|name> Stand up an npm consumer for a story and run its transcripts
register <location> Register a name→path mapping in ~/.sharpee/devkit
list List registered stories

License

MIT

Keywords