Init Command

Initialize a new Lucent project.

Usage

lucent init [project-name] [options]

Arguments

ArgumentDescription
project-nameOptional name for the new project

Options

OptionDescription
--typescriptUse TypeScript (default: true)
--javascriptUse JavaScript
--skip-installSkip dependency installation
--gitInitialize git repository (default: true)
--template <name>Use a specific template

Examples

Interactive Mode

lucent init

Prompts for all options:

? Project name: my-app
? Database adapter: postgres
? Auth strategy: jwt
? Template: basic

Direct Mode

lucent init my-blog --template basic

Creates my-blog/ with basic template.

Skip Installation

lucent init my-app --skip-install

Creates project but skips bun install.

Templates

Available templates:

TemplateDescription
basicMinimal setup with one collection
blogBlog with posts, categories, tags
ecommerceProducts, orders, cart
blankEmpty project with no collections

Output Structure

my-project/
├── src/
│   ├── collections/
│   │   └── Posts.ts
│   ├── index.ts
│   └── lucent.config.ts
├── package.json
├── tsconfig.json
├── .env.example
└── README.md

After Initialization

cd my-project
bun install
lucent dev

Visit http://localhost:3000 to see your app.