Getting started
Sedim is a CLI that stamps production-ready, fully-wired modules - frontend, backend, and schema - directly into your codebase. Every file it generates is yours to own, edit, and customize forever.
Run sedim init once to let the Detector learn your stack. Then sedim add <module> triggers a four-part pipeline - Detector → Thinker → Showbaby → Writer - that plans the change, shows you the diff, and stamps only what you need. Core logic files use overwriteStrategy: skip, so your customizations are never overwritten.
Install, init, add your first module in under two minutes.
What lives in sedim.config.ts and how to edit it.
How the Detector bootstraps your project.
How Detector → Thinker → Showbaby → Writer fit together.
npm install -g @sedim/cli
sedim --versioncd my-project
sedim initSedim auto-detects your framework, ORM, and language, then writes sedim.config.ts. Edit it directly if anything is detected incorrectly.
sedim add authThe CLI walks you through:
.env# Drizzle
npx drizzle-kit push
# or Prisma
npx prisma migrate dev --name add_auth
npm run devAfter sedim init, a sedim.config.ts file is written to your project root. It stores detected facts about your stack:
framework - nextjs, express, or honoorm - drizzle or prismalanguage - typescript or javascriptdb - postgresql, mysql, sqlite, etc.Re-run sedim init --force to regenerate from scratch, or edit the file directly to override detection.
Runs the Detector against your repository. Scans lockfiles, config files, folder structure, and dependencies to identify your framework, ORM, and language. Writes sedim.config.ts with the results.
sedim init
sedim init --force # reinitialize even if already set upThe main command. Loads the module manifest from the registry, runs the Thinker to build an install plan tailored to your stack and feature selections, shows the plan via Showbaby, then executes it with the Writer.
sedim add auth
sedim add auth --dry-run # preview without writing
sedim add auth --force # skip conflict checksCompute and preview the install plan without writing any files.
sedim plan authShow per-file diffs of what a module install would change in your codebase.
sedim diff authResume an interrupted module install. Sedim preserves session state when an install is cancelled mid-flow - run continue to pick up where you left off.
sedim continue authValidate your setup and diagnose common issues before stamping. Checks for sedim initialization, pending sessions, config validity, and environment readiness.
sedim doctorEvery sedim add command flows through four components. Each has a single responsibility and communicates through typed interfaces - no shared global state.
Reads your repository to identify framework, ORM, language, database, and existing conventions. Stores facts in sedim.config.ts. Also detects conflicts - like an existing auth library - and warns before proceeding.
Combines the module manifest (registry/<module>/latest.json) with your stack context and feature selections to produce an InstallPlan: a list of file operations, schema changes, and env vars required.
All CLI UX lives here - prompts, spinners, progress bars, plan summaries, and conflict resolution. Streams the plan in real time so you see diffs and choices before anything is written.
Executes the install plan atomically. Writes new files, patches existing ones, and injects imports. Core logic files use overwriteStrategy: skip - your edits are preserved. User-facing files (config, pages) use overwriteStrategy: ask.
Running sedim add auth generates a complete auth system under src/sedim/auth/:
src/sedim/auth/
├── core/ # hash-password, session, pkce, totp, rbac, rate-limit...
├── adapters/ # framework + ORM adapters
├── ui/ # headless, tailwind, themed component tiers
├── emails/ # verification templates
└── schema.ts # auto-generated for your ORM| Framework | Drizzle | Prisma |
|---|---|---|
| Next.js (App Router) | ✓ | ✓ |
| Express | ✓ | ✓ |
| Hono | ✓ | ✓ |