Commands

Every command accepts --help for inline documentation.

Command summary

CommandDescription
clawnify init [dir]Scaffold a new app (blank or CRUD template)
clawnify loginAuthenticate via OAuth 2.1 PKCE flow
clawnify deploy [dir]Deploy to production
clawnify deploy --from owner/repoDeploy from a GitHub repo that contains a clawnify.json
clawnify lsList deployed apps in the active org
clawnify open <slug>Open an app in the browser, with an auth token attached
clawnify logs <app-id>Tail build logs
clawnify rm <app-id>Delete an app
clawnify whoamiShow the current user and active org
clawnify --mcpStart an MCP server (for Claude Code integration)

clawnify init [dir]

Scaffolds a new Clawnify app in dir (or the current directory if omitted). The scaffold is a Preact + Hono + D1 project, already wired for Clawnify’s build pipeline.

What ends up in the directory:

my-app/
  clawnify.json           # App manifest — name, framework, database
  package.json            # Dependencies: hono, preact, wrangler, vite
  tsconfig.json           # TypeScript with jsxImportSource: preact
  vite.config.ts          # Vite + Preact preset + API proxy to wrangler dev
  wrangler.toml           # Local dev only — skipped on deploy
  index.html              # Vite entry
  .gitignore
  src/
    server/
      index.ts            # Hono app with D1 middleware (worker entry)
      routes.ts           # API routes
      db.ts               # D1-native database adapter
      schema.sql          # Applied to D1 on first deploy
    client/
      main.tsx            # Preact mount
      app.tsx             # Root component

clawnify deploy [dir]

Deploys dir (or the current directory) to production.

clawnify deploy                    # deploy current directory
clawnify deploy ./my-app           # deploy a specific directory
clawnify deploy --from owner/repo  # deploy from a GitHub repository

Both paths converge on the same build pipeline on the Clawnify side. The local deploy packages your source into a tarball and ships it to the POST /v1/apps/deploy endpoint; the GitHub deploy fetches the repo tarball from GitHub and feeds it into the same builder.

On success the CLI polls GET /v1/apps/{id} until the app is live, then prints the URL.

What happens under the hood

  1. CLI reads clawnify.json (name, framework, database)
  2. Runs git ls-files to collect tracked files, packs them into a gzipped tar
  3. POST /v1/apps/deploy with the tarball as multipart body
  4. API worker writes files to R2 and enqueues a build message
  5. Build queue consumer pulls the files back from R2, detects D1-native vs better-sqlite3, applies schema.sql, runs vite build + wrangler deploy inside a sandboxed container
  6. App is live at https://{slug}.apps.clawnify.com
  7. CLI prints the URL

clawnify ls

Lists every app in your active organization.

clawnify ls

clawnify open <slug>

Opens the deployed app in your browser with an authentication token attached to the URL so protected routes work immediately.

clawnify open my-app

clawnify logs <app-id>

Fetches the build status and log output for a given app.

clawnify logs <app-id>

clawnify rm <app-id>

Deletes an app — tears down the Workers for Platforms script, the D1 database, the R2 source files, and the auth records.

clawnify rm <app-id>

clawnify whoami

Prints the currently logged-in user’s email and the active organization.

clawnify whoami

clawnify --mcp

Starts the CLI as an MCP server exposing deploy tools to AI coding agents. See the MCP page for wiring instructions.