mirror of
https://github.com/jakejarvis/stanza.git
synced 2026-08-30 23:05:33 -04:00
c044a564874e9d0f9941d4f1607f3b4cae3eb2df
- Add `apps/cli/src/lib/git.ts` with `worktreeStatus()` (runs `git status --porcelain` in the target dir; treats missing git / non-repo as clean) and `ensureCleanWorktree()` which prints a formatted error listing the dirty paths and returns false so callers can bail before writing anything - Wire the guard into `cmdInit`, `cmdAdd`, and `cmdRemove` — all three check the worktree before the interactive wizard or any file mutations; `--dry-run` skips the check since nothing is written - Add `--dangerously-allow-dirty` boolean flag (registered in `mri` and documented in the `--help` output) to override the refusal with a warning when callers explicitly opt in
Stanza
Modular monorepo template CLI — shadcn for full-stack TypeScript stacks.
pnpm create stanza my-app
Pick a framework, ORM, database, auth provider, styling — get a clean monorepo with idiomatic code, vendored into your repo. Add modules later with stanza add.
Generated projects keep slot boundaries explicit: auth, db, and orm install into their own internal workspace packages (packages/auth/, packages/db/, named @<your-app>/auth, @<your-app>/db), and your app consumes them via workspace:* deps. Swapping an auth provider replaces the contents of packages/auth/ without touching your app's imports.
What's inside
apps/
cli/ # @stanza/cli — the CLI binary
web/ # https://stanza.tools (TanStack Start)
packages/
registry/ # shared schema, slot/peer/capability resolver
codemods/ # ts-morph helpers for region-aware patching
create-stanza/ # `pnpm create stanza` shim
registry/
modules/ # first-party modules (framework, orm, db, auth, styling)
Status
Work in progress. See CLAUDE.md, TODO.md, and REGISTRY.md for current state.
License
MIT — see LICENSE.
Languages
TypeScript
91.5%
MDX
6.1%
CSS
2.2%
JavaScript
0.2%