---
title: Set up an octabits app
summary: A new app on the octabits platform, set up by a coding agent from what the person wants to build.
package: @octabits-io/create
version: 0.32.1
source: https://octabits.io/platform/create
canonical_url: https://octabits.io/start.md
---

# Set up an octabits app

You are a coding agent setting up a new application on the octabits platform for the person you work with. Your job, in this order: find out what they want to build, propose a setup that fits it, create the app with one command, and turn what they want into the app's first spec. `npm create @octabits-io@latest` runs from flags alone and asks nothing without a terminal: the questions are yours to ask.

> **Stop: this does not work yet.** The `@octabits-io` packages are not public on npm until November 2026, so the command below fails. Tell the person that, point them to https://octabits.io/platform/create, and do not install anything.

Stop to ask the person only for what only they can give: what the app is for, a choice in the setup, a directory name, a Postgres URL, a model server. Never ask for an API key or a secret in the conversation; the app writes placeholders for those and the person fills them in.

**Ask with your tool's question form when it has one**: a prompt with options to pick from (Claude Code's question tool, or its equivalent in Codex or Gemini CLI). Put your recommendation first and say it is the recommended one; a free-text answer is always possible. Without one, ask in plain text.

## 1. Ask what they want to build

Ask one open question and nothing else: what do they want to build, and for whom? If their message already says, do not ask again. Ask one follow-up only when you cannot tell who uses the app and what its main records are.

Keep their answer. It decides what you recommend in step 3, and it becomes the first spec in step 5.

## 2. Check the machine

While they answer, or before you propose anything:

- `node --version` — Node.js 22 or newer. Older or missing: stop and say so.
- `pnpm --version` — without pnpm, `create` installs through Corepack, which is bundled with Node 22–24; with neither, it creates the app and skips the install. Do not install pnpm globally without asking.
- `git --version` — without git, add `--no-git`.
- `docker info` — whether Docker is there decides if you can offer `--db docker`.

## 3. Propose the setup

Send one message, or one question form, with a recommendation for each of the following, each with a line on why it fits what they described, and let them confirm or change it:

- **A name** — the app's directory, from what they described, in kebab-case. It must not exist yet, or be empty: `create` refuses one that is not.
- **Sign-in** — explain the options in a sentence each, then say which you recommend.
- **Model** — explain the options in a sentence each, then say which you recommend.
- **Database** — explain the options in a sentence each, then say which you recommend.
- **Capabilities** — explain the options in a sentence each, then say which you recommend.

If they say to choose for them, take your recommendations. Leaving a capability out costs nothing: `pnpm octabits add <capability>` brings it later, while one they do not need is code to remove by hand. `files`, `mail`, `import`, `links` and `decisions` work on the example's records and bring `example` with them.

### Sign-in — `--auth`

- `none` — None for now: development mode, which production refuses. Fits when: trying the app, or deciding later
- `better-auth` — Better Auth, inside the app: accounts and organisations in its own database, nothing to register. Fits when: an app with its own users and no company directory to sign in through
- `zitadel` — Zitadel. Fits when: they already run Zitadel
- `entra` — Microsoft Entra ID. Fits when: their users sign in with Microsoft at work
- `oidc` — Another OIDC provider. Fits when: they already run another identity provider

Recommend: Better Auth when the app has users of its own; a provider only when they already run one; none to try first. `create`'s own default is `none`. What it writes: Better Auth: `AUTH_PROVIDER=better-auth` and a generated `BETTER_AUTH_SECRET`, nothing to fill in. A provider: the `AUTH_*` block of `.env.local`, with `<placeholders>` for the ids your provider gives you (`pnpm run doctor` lists the ones still open)

### Model — `--model`

- `scripted` — Scripted: no model and no network, for trying the app. Fits when: the first run, or no model chosen yet
- `local` — A model they run (Ollama, vLLM, llama.cpp — any OpenAI-compatible server). Fits when: personal data must not leave their machines, and they run a model server. Also needs `--model-url` and `--model-id`: ask for them
- `runner` — A model a runner serves from a machine the app cannot reach (a demo laptop, a GPU box behind a firewall; it connects out). Fits when: their model runs on a machine the app cannot reach, such as a laptop or a GPU box behind a firewall. Also needs `--model-id` and `--runner-id`: ask for them
- `mistral` — Mistral, hosted in the EU (an API key). Fits when: a hosted model without a transfer out of the EU
- `anthropic` — Anthropic (Claude), hosted in the US — a third-country transfer (an API key)
- `openai` — OpenAI (GPT), hosted in the US — a third-country transfer (an API key)

Recommend: Scripted for the first run unless they already have a model; the app runs with it end to end and a real one is one line in `.env.local` later. `create`'s own default is `scripted`. What it writes: `AI_MODEL=local`, the server URL and the model id; `AI_MODEL=runner`, the model id and the runner tags (the runner is registered on the settings page, `octarun` started on its machine); or `AI_MODEL=mistral`, `anthropic` or `openai` and a placeholder for the API key (the vendor becomes a subprocessor; Anthropic and OpenAI are a third-country transfer, and `.env.local`, the closing summary and `pnpm run doctor` say so)

### Database — `--db`

- `pglite` — Embedded PGlite: nothing to run. Fits when: starting out: Postgres inside the app process, its data in a folder of the app; nothing to install, and the same SQL as the real one
- `docker` — Postgres in Docker, the app’s own local stack. Fits when: Docker is installed and they want what production runs: a real Postgres server, other tools can connect to it
- `postgres` — A Postgres they already have. Fits when: they have a database ready for this app. Also needs `--database-url`: ask for it

Recommend: PGlite unless they asked for a server; moving to Postgres later is one `DATABASE_URL`. `create`'s own default is `pglite`. What it writes: `DATABASE_URL`

### Capabilities — `--with`

`all`, `none`, or several of the others, comma-separated.

- `all` — All of them, the template as it is tested whole. Fits when: exploring the template, not building one app
- `none` — None: the bare core, for an app that starts from its own domain. Fits when: an app whose main records are nothing like people a team works with
- `example` — The example: contacts, their notes and the AI brief a person reviews. Fits when: the app is about records people work on (customers, cases, candidates, requests): it becomes the first of them, renamed
- `files` — Files on a contact. Fits when: documents or attachments belong to a record
- `mail` — Mail to a contact. Fits when: the app writes to the people in it
- `knowledge` — The knowledge base: answers from their documents with checked citations. Fits when: they want questions answered from a body of their own documents (handbooks, policies, contracts)
- `import` — Spreadsheet import, reviewed before it is applied. Fits when: their data lives in spreadsheets today
- `links` — Signed links. Fits when: someone without an account opens something from a link (an export, a form)
- `decisions` — The AI decision: applies itself when it is sure, asks a person when it is not. Fits when: incoming items are sorted, routed or classified
- `mcp` — The MCP endpoint, so their coding agent can work in the app as a person. Fits when: they want an AI assistant to read or change the app’s data from outside it
- `assistant` — The assistant: a chat in the app that reads and proposes with the MCP endpoint’s tools. Fits when: people should ask the app questions and start work in it by chat, confirming every change

Recommend: Only the capabilities what they want to build calls for, each with a line on why, and name the ones you leave out. `all` only when they ask for it or want to look around the template. `create`'s own default is `all`. What it writes: the code itself: what you leave out is not in the app

## 4. Create it

```sh
npm create @octabits-io@latest <dir> -- --auth <answer> --model <answer> --db <answer> --with <answers>
```

Always pass every flag, `--with` above all: without a terminal, what no flag says takes `create`'s default, and for `--with` that is `all`. Use `npm create`, not `pnpm create`: pnpm serves a cached `@latest` for up to a day. The flags go after `--`. A Postgres URL is never guessed: `--db postgres` without `--database-url` fails.

Then:

- `cd <dir>` and `pnpm run doctor`: it lists the settings in `.env.local` that are still `<placeholders>` (an API key, a provider's ids). Tell the person which ones and where they come from; they fill them in.
- `pnpm dev` serves the app at http://localhost:3107.
- With `mcp` among the capabilities, connect Claude Code to the app: `claude mcp add --transport http <app> http://localhost:3107/api/mcp` (`<app>` is the directory name). How the agent signs in follows the Sign-in answer; `create`'s closing message says which.
- Tell the person to keep `PII_MASTER_KEY` from `.env.local` with their other secrets and to give production its own: losing it loses every value encrypted under it.

## 5. Write the first spec

Read `AGENTS.md` before changing anything: it holds the app's rules, each with the check behind it. `pnpm guard` runs those checks, and the Stop hook runs it for you at the end of every turn.

Then turn what they described in step 1 into the first feature, with the app's own skills:

- With `example` in the app, its contacts are meant to become their main records: the `replace-the-example` skill.
- `write-a-spec` drafts `specs/<feature>.md`. Ask now the questions the spec needs and nothing more — what a record holds, who may do what, what is refused — and put what you had to guess under its open questions.
- Show them the acceptance criteria and wait. Build only once they approve it.

Later, `pnpm octabits upgrade` moves the app to a newer template and `pnpm octabits add <capability>` brings one it was created without. The full account is https://octabits.io/platform/create.

---

Written from the README of @octabits-io/create 0.32.1.
