@basementstudio/cli
v0.2.3
Published
CLI to scaffold basement projects and add integrations
Downloads
329
Readme
basement 1.0.0
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.
basementWhat'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 | | WebGPU | + R3F WebGPU renderer (alpha) | | 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 --add 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.
basement --addAgent 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 WebGPU and Experiment templates)
- Sanity agent toolkit (when Sanity is selected)
For Claude Code + Sanity, it also registers the Sanity MCP server automatically.
Git worktrees for parallel agent work
Run multiple Claude Code instances on separate branches without conflicts. The CLI manages worktree creation, switching, and cleanup.
basement -wc -b=feature/auth,feature/dashboard,fix/bug-123Creates three isolated worktrees with dependencies auto-installed. Each one is a full working copy your agent can run in independently.
(SOON) Installation
npm install -g basementFor local development — clone the repo and run:
npm linkUsage
Interactive mode — answer prompts step by step:
basementSkip everything with flags:
basement --create my-app --webgpu --sanity --gsap --claudeAdd Sanity to an existing project:
basement --addManage worktrees:
basement --worktreeAll Flags
basement [mode] [project-name] [flags]
Modes:
-c, --create Setup a new project
-a, --add Add integration to existing project
-w, --worktree Manage git worktrees
Templates:
-d, --default Next.js starter
--webgl Three.js WebGL
--webgpu WebGPU graphics
--experiment Creative coding
CMS:
--sanity Sanity CMS
--basehub BaseHub 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
Worktrees:
-wc, --worktree-create Create worktree(s)
-wl, --worktree-list List worktrees
-ws, --worktree-switch Switch to a worktree
-wr, --worktree-remove Remove a worktree
-wp, --worktree-prune Clean up stale references
-b=<branch> Branch name (comma-separated for multiple)
-db Delete branch on remove
-f Skip confirmations
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
