Get Started with Chic.js

Chic.js is the open-source Rails-like SvelteKit CLI created by Mark Schellhas. It creates TypeScript applications with Drizzle and SQLite, then generates validated CRUD resources, pages, APIs, and reversible migrations.

Requires Node.js ^22.18.0 or >=24.11.0.

Installation

npm install -g chic.js

Use chic --help for the full command list.

Quick start

chic new bookstore --tailwind --playwright
cd bookstore
chic generate scaffold Book title:string author:string published:boolean:index
chic db migrate
chic server --open

Open /books for the scaffold and /__chic/routes for the searchable route inspector. The inspector only runs during development unless CHIC_DEBUG=ON is explicitly set.

chic make is an alias for chic generate scaffold, and chic s still starts the server.

Create a project

chic new my-app
chic new my-app --tailwind --auth --playwright --vitest
chic new my-app --package-manager pnpm --add eslint,prettier
chic init                         # add Chic to an existing SvelteKit app

chic new delegates SvelteKit and add-on setup to sv. Drizzle uses SQLite with better-sqlite3. Extra sv add-ons can be passed with --add.

Generate resources

chic generate scaffold Post title:string body:text published:boolean
chic generate model Comment body:text post:references
chic generate controller Comment
chic generate route /about
chic generate component ContactForm
chic generate migration AddStatusToPosts
chic generate from-db
chic make Post title:string       # scaffold alias
chic add /about                   # route shorthand
chic add ContactForm              # component shorthand
chic destroy scaffold Post

Field syntax is name:type:modifier. Types include string, text, integer, number, float, boolean, date, datetime, json, and references. Modifiers include required (default), optional, unique, and index.

Scaffolds can emit REST endpoints or opt-in SvelteKit remote functions with --api=none or --api=remote. Generation is transactional: if a write fails, Chic restores every file changed by that operation. Use --dry-run, --force, or --skip on mutating generators.

Destroy removes generated application files but preserves migration history. It adds a reversible drop migration; run chic db migrate when you are ready to remove the table.

Database

chic db generate       # run drizzle-kit generate
chic db migrate        # apply pending Chic SQL migrations
chic db rollback       # revert the latest migration
chic db reset          # rollback all, then migrate
chic db seed           # run .chic/seed.mjs
chic db studio         # open Drizzle Studio
chic db console        # SQLite REPL; connection is available as `db`

If a SQLite database already exists, chic generate from-db introspects its tables and scaffolds CRUD pages, forms, services, and Drizzle schema without writing CREATE TABLE migrations. Filter with --only, --except, or --database.

Routes and development

chic routes
chic debug status
chic debug ON
chic debug OFF
chic sitemap https://example.com
chic server
chic server --open
chic doctor

chic sitemap reads static page routes from src/routes; a build is not required.

Upgrading from Chic 1

Chic 2 changes the default ORM from Sequelize to Drizzle. Back up your database, commit your project, and run:

chic upgrade --force

The command installs and configures Drizzle without deleting legacy source files or transforming existing data. Migrate existing data explicitly, then regenerate resources with --force as appropriate.

👉 See the full command reference on GitHub