bsmnt
v0.2.7
Published
CLI to scaffold basement projects and add integrations
Readme
bsmnt 0.2.7
Your project starts here. One command to go from zero to a fully configured Next.js project with our stack, CMS, agent skills, and everything wired up.
bsmntWhat's in 1.0
Instant project scaffolding from templates
Spin up a new project based on the stack we actually use. Pick a template, answer a few prompts, and you're running.
| Template | What you get | |----------|-------------| | Default | Next.js 16 + React 19 + Tailwind v4 + Biome + Zustand | | WebGL | + React Three Fiber + Three.js + optional WebGPU renderer toggle | | Experiment | + Creative coding setup with navigation UI |
Every template ships with TypeScript strict mode, React Compiler, Turbopack, PostCSS functions (tovw, torem, columns), component generation scripts, and the full lib/ architecture.
Full Sanity integration — code and infrastructure
Not just boilerplate files. The CLI sets up your entire Sanity stack:
- Embedded Studio at
/studiowith schemas, structure builder, and live preview - GROQ queries with TypeScript type generation
- Draft mode with visual editing
- API routes for revalidation webhooks
.env.localwith all credentials
Automated project creation — The CLI creates a Sanity project on your dashboard, generates API tokens, and wires everything into your repo. If you're not logged in, it opens sanity login inline — you never leave the terminal.
Add Sanity to existing projects
Already have a project running? The integrate command injects Sanity into it. It detects your project structure (app/ or src/app/) and smart-merges layout, sitemap, and integration files without overwriting your code.
Real-world validated — this is how we integrated Sanity into the ROX project.
bsmnt integrate --sanityAgent skills out of the box
Pick your agent (Claude Code or OpenCode) and the CLI installs curated skills so it understands our stack from the start:
- React + Next.js performance patterns
- Web design and accessibility guidelines
- Frontend design standards
- WebGPU/TSL guides (for WebGL and Experiment templates)
- Sanity agent toolkit (when Sanity is selected)
For Claude Code + Sanity, it also registers the Sanity MCP server automatically.
Project Structure
Single TypeScript package published as bsmnt on npm:
src/
├── index.ts # Commander program, prompts, routing
├── paths.ts # Centralized path resolution
├── configs/animations.ts # GSAP / Motion dependency configs
├── helpers/
│ ├── create/ # Project creation pipeline
│ ├── integrate/ # CMS integration injection
│ │ └── sanity/ # Sanity files, config, mergers
│ └── add/ # Hook injection
└── utils/ # detect-project, format-results
templates/ # Standalone project templates
template-hooks/ # Reusable React hooks
plugins/ # Biome linting rules (Grit patterns)(SOON) Installation
npm install -g bsmntFor local development -- clone the repo and run:
bun install
npm link .Release Channels
This repo follows a two-channel release model similar to the Next.js stable/canary approach, while keeping Changesets as the version source of truth.
latest(stable): production releases from the Changesets release PR flow.canary: snapshot prereleases frommainunder npm dist-tagcanarytriggered manually.
Install stable:
npm install -g bsmnt@latestInstall canary:
npm install -g bsmnt@canaryVerify dist-tags:
npm view bsmnt dist-tagsHow to trigger stable releases:
- Add a changeset in your feature PR (
bun run changeset). - Merge PR(s) into
main. - GitHub Actions updates/opens the release PR with version/changelog changes.
- Merge that release PR to publish to npm
latest.
How to trigger canary releases:
- Add a changeset in your feature PR (
bun run changeset). - Merge the PR into
main. - In GitHub Actions, run
Canary Releasewithworkflow_dispatchon themainbranch. - The workflow publishes snapshot builds to npm tag
canarywhen pending changesets exist.
Usage
Interactive mode — answer prompts step by step:
bsmntSkip prompts with flags:
bsmnt create my-app --webgpu --sanity --gsap --claude --no-hooksAdd Sanity to an existing project:
bsmnt integrate --sanityAll Flags
bsmnt [command]
Commands:
create|c [project-name] Create a new project
integrate|i Add CMS integration to existing project
add|a Add hooks to an existing project
Templates:
-d, --default Next.js starter
--webgpu Three.js/WebGPU starter
--experiment Creative coding
CMS:
--sanity Sanity CMS
--no-cms No CMS
Animation:
--gsap GSAP
--motion Framer Motion
--no-animation No animation library
Agent:
--claude Claude Code
--opencode OpenCode
Hooks:
--no-hooks Skip hook selection
Other:
-h, --help Show helpGenerated Project Commands
bun dev # Dev server with Turbopack
bun build # Production build
bun lint # Biome linter
bun lint:fix # Auto-fix lint issues
bun typecheck # Type check with tsgo
bun generate # Scaffold components/hooks
bun analyze # Bundle size analysisWith Sanity:
bun sanity:extract # Extract Sanity schema
bun sanity:typegen # Generate TS types from schemaLicense
ISC
