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.
Prerequisites
Section titled “Prerequisites”- An Anyknown account.
- Node.js 18 or later.
- Your AI agent of choice (Claude Code recommended).
Install the CLI
Section titled “Install the CLI”npm install -g @anyknown/cliOr use it without installing:
npx @anyknown/cli <command>Authenticate
Section titled “Authenticate”anyknown loginThis opens a browser for device-pair authentication and stores your token at ~/.anyknown/credentials.json.
Check who you are authenticated as:
anyknown whoamiSign out:
anyknown logoutConnect the MCP server (Claude Code)
Section titled “Connect the MCP server (Claude Code)”Add the Anyknown MCP server to Claude Code so your agent can read and write App files directly:
claude mcp add anyknown 'npx -y @anyknown/mcp'The MCP server provides five tools your agent can call:
| Tool | What it does |
|---|---|
list_apps | List Apps in your Anyknown org |
read_app_tree | List every source file in an App |
read_file | Read a source file from the App |
write_file | Write a source file to the local working tree |
request_build | Push local changes and trigger a build |
Work with Apps
Section titled “Work with Apps”List your Apps
Section titled “List your Apps”anyknown apps listClone an App to work on locally
Section titled “Clone an App to work on locally”anyknown apps clone my-appFiles land in ~/anyknown-apps/my-app/ by default (override with ANYKNOWN_APPS_DIR).
Initialize a new local App workspace
Section titled “Initialize a new local App workspace”anyknown apps initSets 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.
Run the local dev server
Section titled “Run the local dev server”anyknown apps devStarts a local dev server for the App using Cloudflare Workers tooling. Live-reloads on file changes.
Push changes to the platform
Section titled “Push changes to the platform”anyknown apps pushUploads the local working tree to the Anyknown platform.
Build the App
Section titled “Build the App”anyknown apps buildTriggers a build on the platform. Surfaces build errors and exits non-zero on failure.
Deploy (push + build + preview)
Section titled “Deploy (push + build + preview)”anyknown apps deploy --previewPushes 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):
anyknown apps deployVerify a deployed preview
Section titled “Verify a deployed preview”anyknown apps verifyRuns smoke verification against the deployed preview and prints a structured verdict: pass, broken, or inconclusive.
Exits non-zero only on broken.
Pull context for your agent
Section titled “Pull context for your agent”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.
Targeting staging
Section titled “Targeting staging”anyknown --env=staging apps listPass --env=staging to any command to target the staging environment.
Workflow skills
Section titled “Workflow skills”Customer-facing workflow skills (automated iterate/build/read flows for your agent) are forthcoming.
Next steps
Section titled “Next steps”- Framework Contract — understand the App boundary your code must satisfy
- Capabilities — per-capability guides for Identity, Storage, Payments, and more
- Concepts & Glossary — platform vocabulary reference