Skip to content

Getting started — Local Builder

The Local Builder connects your own AI agent — Claude Code, Codex, or Gemini CLI — to the Anyknown platform. You use your own AI subscription; @anyknown/cli handles authentication, App management, and pushing changes.

  • An Anyknown account.
  • Node.js 18 or later.
  • Your AI agent of choice (Claude Code recommended).
Terminal window
npm install -g @anyknown/cli

Or use it without installing:

Terminal window
npx @anyknown/cli <command>
Terminal window
anyknown login

This opens a browser for device-pair authentication and stores your token at ~/.anyknown/credentials.json.

Check who you are authenticated as:

Terminal window
anyknown whoami

Sign out:

Terminal window
anyknown logout

Add the Anyknown MCP server to Claude Code so your agent can read and write App files directly:

Terminal window
claude mcp add anyknown 'npx -y @anyknown/mcp'

The MCP server provides five tools your agent can call:

ToolWhat it does
list_appsList Apps in your Anyknown org
read_app_treeList every source file in an App
read_fileRead a source file from the App
write_fileWrite a source file to the local working tree
request_buildPush local changes and trigger a build
Terminal window
anyknown apps list
Terminal window
anyknown apps clone my-app

Files land in ~/anyknown-apps/my-app/ by default (override with ANYKNOWN_APPS_DIR).

Terminal window
anyknown apps init

Sets up the framework boundary files (manifest, server entry, SDK stub) for a new App. Does not generate any page or component content — the AI generates that.

Terminal window
anyknown apps dev

Starts a local dev server for the App using Cloudflare Workers tooling. Live-reloads on file changes.

Terminal window
anyknown apps push

Uploads the local working tree to the Anyknown platform.

Terminal window
anyknown apps build

Triggers a build on the platform. Surfaces build errors and exits non-zero on failure.

Terminal window
anyknown apps deploy --preview

Pushes the local tree, builds it, and deploys to the App’s isolated preview slot. Add --verify to run smoke verification after deploy.

To deploy directly to production (skipping the preview slot):

Terminal window
anyknown apps deploy
Terminal window
anyknown apps verify

Runs smoke verification against the deployed preview and prints a structured verdict: pass, broken, or inconclusive. Exits non-zero only on broken.

Terminal window
anyknown context plan <appSlug>
anyknown context db-schema <appSlug>
anyknown context feedback <appSlug>
anyknown context build-history <appSlug>

Pulls cloud-side context (latest plan, current DB schema, redacted Visitor feedback, build history) into your local agent’s context window. Use --json for structured output.

Terminal window
anyknown --env=staging apps list

Pass --env=staging to any command to target the staging environment.

Customer-facing workflow skills (automated iterate/build/read flows for your agent) are forthcoming.