@tour-kit/studio
v0.2.0
Published
User Tour Kit Studio CLI — detect framework, install packages, scaffold tours, AST-patch providers, verify and harden selectors.
Readme
@tour-kit/studio (tourkit bin)
The User Tour Kit Studio CLI. Reads a Tour Recipe and emits owned source into the user's repo.
| Command | Does |
|---|---|
| tourkit add <recipe> | fetch recipe → detect framework + pm → install exact pinned pkgs → scaffold tours/<id>.tsx → AST-patch root layout (idempotent). Pro → write empty framework-specific client license env; claim/checkout is v0.2. |
| tourkit pull <recipe> | re-sync; 3-way diff if the generated file was edited |
| tourkit verify [recipe...] | boot dev server, Playwright-check selectors; CI gate on dead ones |
| tourkit harden [recipe...] | codemod: inject data-tour-id on referenced elements |
| tourkit init | create tourkit.config.json manifest |
Stack (confirmed in the spec): citty (commands) · ts-morph (idempotent JSX provider-wrapping;
use node.replaceWithText(), no structural .wrap()) · Playwright as a lazy/optional dep
(only verify needs it) · execa · pkg-types · semver · consola. Validates recipes with
@usetourkit/recipe.
Fetches recipes from the Studio's recipe API (GET /api/recipes/:id). Pro claim/checkout are
v0.2-only calls to tourkit-dash. Status: not scaffolded — see
../../plan/roadmap.md and the spec §4b.
