Build from the terminal

npm install -g @offline-protocol/cli

The 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.

CommandWhat it doesSign-in
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 it
createStart 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 ID
initWire an existing JavaScript or TypeScript project that has a package.json.Optional, or pass --app-id
addAdd 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.None
planTurn a description into a workflow, packages, and two documents: an architecture and an implementation plan.None
registry, skillsSearch and show packages, workflows, templates, capabilities, and examples; print the integration skills; export the registry as an llms.txt digest.None
mcp serve, mcp install, mcp toolsRun the local MCP server over stdio, print the configuration for a client, and list its 18 tools. MCP server.None
setup, orgs, apps, keysCreate an organization, an application, and a default key in one step, or list and create each one on its own.Email login
doctor, update, completionsCheck Node, npm, git, and the iOS and Android toolchains; check for a newer release; generate shell completions.None

Start 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.

New project
# 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/
Existing project
# 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.

CommandWhat it storesUse it for
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 machine
offline login --no-browserThe same key, approved from a browser on another machine through the printed link.Remote and headless machines
offline login --emailA developer session, from a one-time code sent to your email and entered in the terminal.setup, orgs, apps, and keys
offline login --api-keyAn application API key you supply. OFFLINE_API_KEY in the environment works the same way.CI, from your secret manager

Organization 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

NeedsDetail
Node.js 18 or laterFor npm and npx. The command itself is a prebuilt binary.
PlatformsmacOS on Apple silicon and Intel, Linux on x64 and arm64, Windows on x64.
Install sourcenpm, as @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.
CredentialsStored in ~/.offline/config.json. Keep keys out of source control and logs.

Reference

ResourceWhat it isWhere
CLI and MCP docsInstall, login, initialization, and client setup, kept in step with each release.docs/tools/overview
npm packageReleases and the install command.@offline-protocol/cli
Config schemaThe JSON Schema that offline.config.json points at.offline.config.json schema
Agent setup promptInstructions a coding agent can follow to install the CLI, register the MCP server, log in, and verify.agent-setup/prompt.md
Developer portalOrganizations, applications, and API keys.dev.offlineprotocol.com

Your coding agent can run all of this. Connect it to the Offline Protocol MCP server.