Skip to content

CLI Reference

The Booking Kit CLI scaffolds project files, manages copy-paste UI components from the registry, and provides health-check utilities.

Terminal window
npx thebookingkit <command> [arguments] [flags]

All commands are run from your project root (the directory containing package.json).


Scaffold the required project files to get started with The Booking Kit.

Terminal window
npx thebookingkit init [--auth <adapter>] [--jobs <adapter>] [--email <adapter>]

What it creates

File / DirectoryDescription
thebookingkit.config.tsMain configuration file with your chosen adapter wiring
.env.localEnvironment variable template with all required keys
src/components/thebookingkit/Default directory for installed UI components
.thebookingkit-manifest.jsonComponent manifest tracking installed versions and checksums

If .env.local is not already listed in .gitignore, init appends it automatically.

Interactive mode

When no adapter flags are provided and stdin is a TTY, init prompts for each adapter interactively:

The Booking Kit — interactive setup
Auth adapter [nextauth, clerk, supabase, lucia] (default: nextauth):
Job adapter [inngest, trigger, bullmq, none] (default: inngest):
Email adapter [resend, sendgrid, ses, none] (default: resend):

Non-interactive mode flags

FlagOptionsDefaultDescription
--auth <adapter>nextauth, clerk, supabase, lucianextauthAuth adapter to configure
--jobs <adapter>inngest, trigger, bullmq, noneinngestBackground job adapter
--email <adapter>resend, sendgrid, ses, noneresendEmail delivery adapter

Example — non-interactive CI setup

Terminal window
npx thebookingkit init --auth clerk --jobs inngest --email resend

Next steps after init

1. Update .env.local with your database URL
2. Run: npx thebookingkit add booking-calendar
3. Run: npx thebookingkit migrate

Add one or more UI components from the registry to your project. Dependencies are resolved and fetched automatically.

Terminal window
npx thebookingkit add <components...> [flags]

Arguments

ArgumentDescription
<components...>One or more component names (e.g. booking-calendar time-slot-picker)

Flags

FlagDefaultDescription
-d, --dir <path>src/components/thebookingkitDirectory to write components into
-f, --forcefalseOverwrite locally modified files
--registry <url>https://docs.thebookingkit.dev/registryCustom registry base URL (must be https://)
--dry-runfalsePrint what would be written without creating any files

The CLI detects your package manager from lockfiles (pnpm-lock.yaml, yarn.lock, bun.lockb, or package-lock.json) and prints the correct install command for npm dependencies.

Components that have been locally modified are skipped unless --force is passed. The manifest checksum is used to detect modifications.

Examples

Terminal window
# Add a single component
npx thebookingkit add booking-calendar
# Add multiple components at once
npx thebookingkit add booking-calendar time-slot-picker booking-confirmation
# Preview without writing
npx thebookingkit add booking-calendar --dry-run
# Overwrite a locally modified component
npx thebookingkit add booking-calendar --force
# Write to a custom directory
npx thebookingkit add time-slot-picker --dir src/components/ui/booking

List all components available in the registry, grouped by category.

Terminal window
npx thebookingkit list [--category <category>] [--json]

Flags

FlagDescription
-c, --category <category>Filter output to a single category
--jsonOutput the full registry as a JSON array

Example output

BOOKING
booking-calendar Full booking calendar with slot picker
time-slot-picker Standalone time slot grid (depends: booking-calendar)
booking-confirmation Post-booking confirmation screen
ADMIN
admin-schedule-view Provider schedule management view
availability-editor Weekly availability editor
17 components available
Run 'npx thebookingkit add <name>' to add a component.

Show which installed components have been locally modified since they were fetched from the registry.

Terminal window
npx thebookingkit diff

Reads .thebookingkit-manifest.json and compares the stored SHA-256 checksum of each component against the current file content. Reports one of three states per component:

StateMeaning
CLEANFile matches the registry checksum
MODIFIEDFile has been edited since it was added
MISSINGFile was deleted but is still in the manifest
CLEAN booking-confirmation
MODIFIED booking-calendar (src/components/thebookingkit/booking-calendar.tsx)
MISSING time-slot-picker (expected at src/components/thebookingkit/time-slot-picker.tsx)
3 component(s) checked — 1 modified, 1 missing.

Re-fetch one or more components from the registry, replacing the local file with the latest version.

Terminal window
npx thebookingkit update [components...] [flags]

Arguments

ArgumentDescription
[components...]Component name(s) to update. Omit to update all installed components.

Flags

FlagDefaultDescription
-f, --forcefalseOverwrite locally modified components
--registry <url>https://docs.thebookingkit.dev/registryCustom registry base URL
--dry-runfalseShow what would be updated without writing files

Locally modified components are skipped unless --force is passed. The manifest is updated with the new checksum after each successful update.

Examples

Terminal window
# Update all installed components
npx thebookingkit update
# Update a specific component
npx thebookingkit update booking-calendar
# Force-update a locally modified component
npx thebookingkit update booking-calendar --force
# Preview updates without writing
npx thebookingkit update --dry-run

Run a health check on your Booking Kit setup and report any configuration problems.

Terminal window
npx thebookingkit doctor

Checks the following and reports PASS or FAIL for each:

CheckHint on failure
thebookingkit.config.ts existsRun npx thebookingkit init
@thebookingkit/core in package.jsonRun npm install @thebookingkit/core
.thebookingkit-manifest.json existsRun npx thebookingkit init
Each installed component file is presentRun npx thebookingkit add <name> to reinstall
Each installed component checksum is cleanFile has local modifications (informational)

Exits with code 1 if any check fails, making it suitable for CI pipelines.

The Booking Kit — doctor
PASS thebookingkit.config.ts exists
PASS @thebookingkit/core is in package.json
PASS .thebookingkit-manifest.json exists
PASS booking-calendar file present (src/components/thebookingkit/booking-calendar.tsx)
PASS booking-calendar checksum clean
5 passed, 0 failed.

Run pending Booking Kit database migrations.

Terminal window
npx thebookingkit migrate

This command is a guided wrapper. It prints the Drizzle commands needed to apply your schema:

Migration support requires @thebookingkit/db.
Run: npx drizzle-kit push
Or: npx drizzle-kit migrate

For custom migrations (extensions, exclusion constraints, audit triggers), use runCustomMigrations from @thebookingkit/db directly.


The .thebookingkit-manifest.json file tracks installed components. It is created by init and updated by add and update. Commit this file to version control so your team can see which component versions are installed.

{
"version": "0.2.0",
"components": {
"booking-calendar": {
"name": "booking-calendar",
"kitVersion": "0.2.0",
"installedPath": "src/components/thebookingkit/booking-calendar.tsx",
"checksum": "a3f2...",
"installedAt": "2026-04-04T10:00:00.000Z"
}
}
}

thebookingkit.config.ts is generated by init and wires your chosen adapters together. Example output for the default adapter combination:

import type { BookingKitConfig } from "@thebookingkit/core";
const config: BookingKitConfig = {
auth: {
adapter: "nextauth",
},
jobs: {
adapter: "inngest",
},
email: {
adapter: "resend",
},
};
export default config;