Init Command
Initialize a new Lucent project.
Usage
lucent init [project-name] [options]
Arguments
| Argument | Description |
|---|---|
project-name | Optional name for the new project |
Options
| Option | Description |
|---|---|
--typescript | Use TypeScript (default: true) |
--javascript | Use JavaScript |
--skip-install | Skip dependency installation |
--git | Initialize 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:
| Template | Description |
|---|---|
basic | Minimal setup with one collection |
blog | Blog with posts, categories, tags |
ecommerce | Products, orders, cart |
blank | Empty 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.