# snizu app init

Source: https://snizu.dev/docs/cli/app/init

## Usage [#usage]

```sh title="Usage"
snizu app init [dir] [--app <handle>]
snizu app init [dir] --name <name> --handle <handle> [--category <category>] [--distribution <distribution>]
```

## Flags [#flags]

<Fields>
<Field name="[dir]" type="path">
The app's folder. The current one by default. A folder that already has `snizu.app.json` is refused: change the file instead.
</Field>

<Field name="--app" type="handle">
Link to an app your organization has, by its handle or ID. It takes the app's newest manifest.
</Field>

<Field name="--name" type="text">
Register a new app with this name. Asked for at a terminal.
</Field>

<Field name="--handle" type="handle">
The new app's handle: lower case and dashes, and permanent. Made from the name when you don't say.
</Field>

<Field name="--category" type="category">
Where it's listed: `payments`, `shipping`, `marketing`, `sales`, `customer_support`, `inventory`, `analytics`, `finance`, `productivity` (the default) or `developer_tools`.
</Field>

<Field name="--distribution" type="public">
Who can install it: `public` (the default), `unlisted` or `custom`.
</Field>
</Fields>

In CI, pass `--app`, or `--name` and the rest: nobody is there to answer.

## The version it starts at [#the-version-it-starts-at]

- A new app starts at `0.1.0`.
- A linked app whose newest version is a draft keeps that draft's number, so the next deploy updates it.
- Otherwise it's the next patch: `1.4.2` was released, so the folder deploys `1.4.3`.

## snizu.app.json [#snizuappjson]

```json title="snizu.app.json"
{
  "app_id": "app_01k9a4n7x2c8v5m3q0d6t1w9hz",
  "handle": "gift-wrap",
  "version": "0.1.0",
  "release_notes": "",
  "manifest": {
    "scopes": [],
    "access_reasons": [],
    "admin_url": null,
    "webhooks": [],
    "settings": [],
    "api_version": "2026-10"
  }
}
```

<Fields>
<Field name="app_id" type="string">
The app this folder deploys. Leave it out and the app is your organization's app with this `handle`, so one file can deploy to every server your organization is on.
</Field>

<Field name="handle" type="string" required>
The app's handle.
</Field>

<Field name="version" type="MAJOR.MINOR.PATCH" required>
The version `snizu app deploy` makes or updates.
</Field>

<Field name="release_notes" type="string">
What changed, for merchants. `release_notes_ar` holds the Arabic.
</Field>

<Field name="manifest" type="object" required>
Scopes and why it needs each, the embedded page's `admin_url`, webhooks, settings, checkout blocks, and the API version the app is written for.
</Field>
</Fields>

## Examples [#examples]

```shellsession title="Terminal"
$ snizu app init --name "Gift wrap" --category sales
Registered gift-wrap in Nakhla Studio. Its client secret is in the console.
✓ Wrote snizu.app.json for gift-wrap.
Edit the manifest in it, then run snizu app deploy.
```

Link a folder to an app you already have:

```shellsession title="Terminal"
$ snizu app init --app gift-wrap
✓ Wrote snizu.app.json for gift-wrap.
```