Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kazzle.com/llms.txt

Use this file to discover all available pages before exploring further.

Kazzle CLI

Generated apps should run through:
kazzle run -- <command>
Everything after -- is the real command. Kazzle injects the runtime environment first.

What kazzle run injects

  • secrets from the component’s env entry in kazzle.config.ts
  • PORT and HOST
  • sibling component URLs like KAZZLE_APP_COMPONENT_SERVER_URL
  • Kazzle runtime identity such as app ID and component name

Example

{
  "scripts": {
    "dev": "kazzle run -- vite --host 0.0.0.0",
    "start": "kazzle run -- bun server/index.ts"
  }
}
Do not put secret collection names in package.json. Put them in kazzle.config.ts.
components: [
  {
    name: 'server',
    type: 'process',
    path: './server/index.ts',
    env: { collection: 'my-app', environment: 'local' },
  },
]

Linking a checkout to an app

kazzle run needs to know which app this directory belongs to. Resolution order:
  1. --app=<appId> on the command line
  2. KAZZLE_APP_ID env var (set automatically when Kazzle starts a supervised component)
  3. .kazzle/link.json walked up from the current directory
If none of those resolve, kazzle run exits with:
Error: This directory is not linked to a Kazzle app. Run `kazzle link` to fix.
app { action: "create" } writes <checkout>/.kazzle/link.json automatically — like Vercel’s .vercel/project.json. The file is per-clone and gitignored. After a fresh git clone of an existing app, run:
kazzle link              # match the current directory against your space's app checkouts
kazzle link --app=<id>   # force a specific app
kazzle unlink            # delete the link file
The AI can repair a missing link from a thread with app { action: "link", appId }.