Build from the terminal
npm install -g @offline-protocol/cliThe Offline Protocol CLI installs one command, offline. Sign in to the developer portal, wire a project to your application, add packages, plan an app from a sentence, check your environment, and run the local MCP server your coding agent connects to. Version 0.2.6 on npm, for Node 18 or later on macOS, Linux, and Windows.
Illustration: a terminal session that installs the CLI, logs in through the browser, runs offline init, adds the Mesh SDK, and runs offline doctor. Beside it, the three files offline init writes into the project: offline.config.json, .mcp.json, and AGENTS.md.
From install to a wired project in five commands. Logging in is the one step that opens a browser.
Commands
Every informational command takes --json, so a script or an agent can read the output. offline <command> --help lists the options.
login, logout, whoamiSign in to the developer portal, clear local credentials, and show who is signed in. whoami --verify checks the stored key and app ID against the developer API.Starts itcreateStart a project from a workflow, a template, or a sentence, for Next.js, React with Vite, or React Native. --mesh and --pol add the Mesh SDK and Proof of Location to React Native.Optional, fills in the app IDinitWire an existing JavaScript or TypeScript project that has a package.json.Optional, or pass --app-idaddAdd a package and its registry requirements to package.json, then print its peer dependencies and the skills to read. --dry-run shows the change first.NoneplanTurn a description into a workflow, packages, and two documents: an architecture and an implementation plan.Noneregistry, skillsSearch and show packages, workflows, templates, capabilities, and examples; print the integration skills; export the registry as an llms.txt digest.Nonemcp serve, mcp install, mcp toolsRun the local MCP server over stdio, print the configuration for a client, and list its 18 tools. MCP server.Nonesetup, orgs, apps, keysCreate an organization, an application, and a default key in one step, or list and create each one on its own.Email logindoctor, update, completionsCheck Node, npm, git, and the iOS and Android toolchains; check for a newer release; generate shell completions.NoneStart or adopt a project
A new app starts from create or plan. An app you already have gets init, then packages one at a time.
# from a sentence, a workflow, or a template
$ offline create --platform react-native \
--prompt "nearby chat for a festival crew"
# or plan first and read the documents it writes
$ offline plan "nearby chat for a festival crew" --out docs/ # in a folder with a package.json
$ offline init
$ offline add mesh-sdk --dry-run
$ offline add mesh-sdk
$ offline skills show mesh-networking Signing in
The registry, the skills, and the local MCP server work without an account. Signing in lets create and init fill in your application, and unlocks account management.
offline loginAn application API key. The browser opens dev.offlineprotocol.com/cli-auth, you approve, and you pick an existing key or create one for this CLI.Everyday work on your own machineoffline login --no-browserThe same key, approved from a browser on another machine through the printed link.Remote and headless machinesoffline login --emailA developer session, from a one-time code sent to your email and entered in the terminal.setup, orgs, apps, and keysoffline login --api-keyAn application API key you supply. OFFLINE_API_KEY in the environment works the same way.CI, from your secret managerOrganization keys are not accepted. offline logout clears local credentials and revokes the key if it was created on the CLI login page; --local-only skips the revocation. A key you picked at login stays active until you delete it in the portal.
Requirements
@offline-protocol/cli. Without a global install, put npx -y @offline-protocol/cli in front of any command. The crate on crates.io is a placeholder, not the released CLI.~/.offline/config.json. Keep keys out of source control and logs.Reference
offline.config.json points at.offline.config.json schema
