# create-feltdb

Interactive CLI tool to scaffold new FeltDB applications.

## Usage

One command scaffolds, installs, and starts the application, Studio, and local
WebLLM agent (no global installation required):

```bash
npx --yes create-feltdb@latest my-app
```

Use the interactive menu, or accept its defaults non-interactively:

```bash
npx --yes create-feltdb@latest my-app --yes
```

### Options

- `--runtime <browser|node|self-hosted|managed>`
- `--managed` — connect the app and Studio to a managed FeltDB endpoint
- `--framework <react|vanilla>`
- `--no-distributed`
- `--no-agents`
- `--capabilities <search|vector|search,vector>`
- `--no-install` — generate without installing dependencies
- `--no-start` — do not start services after generation
- `--yes` or `-y` — skip the interactive menu and use defaults
- `--help` or `-h`
- `--version`

## What Gets Generated

```
my-app/
├── feltdb/
│   ├── capabilities/
│   ├── workflows/
│   ├── agents/
│   └── schema/
├── src/
│   ├── App.tsx
│   ├── feltdb.ts
│   └── index.ts
├── public/
│   └── index.html
├── feltdb.config.json
├── package.json
├── tsconfig.json
└── README.md
```

## Run It Again

```bash
cd my-app
npm run dev
```

This starts the app and Studio together. Self-hosted projects also start the
version-matched FeltDB server container and therefore require Docker.

## Default Configuration

The generated project uses:
- **Runtime**: Browser
- **Storage**: OPFS (with IndexedDB fallback)
- **Distributed**: Enabled by default
- **Capabilities**: Search enabled, Vector disabled
- **AI**: Private WebLLM agent enabled; model loads lazily in the browser
- **Studio**: Installed and served alongside the application

## License

MIT
