# init

> Scaffold an app, with a manifest and a server to start from.

Source: https://storeware.ai/docs/cli/commands/init

```bash
npx @storeware/cli init [directory] [flags]
```

## Arguments

| Argument | Required | What it is |
| --- | --- | --- |
| `[directory]` | No | Where to make it. This directory when not given. A file already there is kept. |

## Flags

| Flag | What it does |
| --- | --- |
| `--slug <slug>` | The app's handle. Made from the directory's name when not given. |
| `--name <name>` | The name merchants see. Made from the slug when not given. |
| `--url <url>` | Where your server runs. `http://localhost:4000` when not given. Not used by `--template hosted`. |
| `--template <name>` | What to start from: `node` (plain JavaScript, the default), `typescript` (Hono), `react-router`, `nextjs`, or `hosted` (run by Storeware, in beta). Each comes with an `AGENTS.md` for coding agents. |

## Examples

```bash
npx @storeware/cli init my-app
npx @storeware/cli init my-app --template react-router
npx @storeware/cli init my-app --template nextjs --name "Size guide"
npx @storeware/cli init my-app --template hosted
```

More in [Quickstart](https://storeware.ai/docs/get-started/quickstart). Every command also takes the [flags on the reference page](https://storeware.ai/docs/cli/commands#flags-every-command-takes).
