Mapples CLI
The mapples CLI (npm package mapples) is the link between a Creator project and an Expo app on your machine. Screens and components live as generated, editable TSX in your repo; the CLI pulls Creator's changes into them, pushes your edits back, and merges the two.
Run it
No install is needed; npx runs the published version:
npx mapples <command> [options]
An app from mapples create also has the CLI as a dev dependency and a sync script, so npm run sync works inside it.
Three channels are published. latest matches the production Creator; beta and rc match the development and staging ones. The Build dialog shows the channel that matches the Creator you are using.
npx mapples@beta sync
Commands
| Command | What it does |
|---|---|
create <app> | Scaffold a new Expo app linked to a project |
init | Link an existing Expo Router app to a project |
sync | Pull remote changes and push local edits in one run |
adopt <file> | Bring one hand-written file under Mapples without a prompt |
doctor | Check the synced files, the project packages and the types |
watch | Live two-way sync while you work |
agent … | Set up a coding agent and manage the agent-session lease |
selected | Find the element selected on the Creator canvas in the code |
nav … | Set navigator options, route items and route order |
api import | Import an OpenAPI, Swagger, Postman or cURL source as API requests |
check | Check for a newer CLI, stale skills, new commands and package updates |
Every command takes --json for machine-readable output.
Authentication
The CLI authenticates with a project API key from Creator (Project → Settings → API key). Pass it once as --secret to create or init; it is stored in .mapples/secret, which is git-ignored, and can also come from the MAPPLES_SECRET environment variable. A read-scoped key pulls only; pushes need a write-scoped key. See API keys and Configuration.
Exit codes
| Code | Meaning |
|---|---|
0 | ok |
1 | error |
2 | a sync (or a watch run) finished with conflicts: files were deprecated, never overwritten |
3 | the agent lease is gone (the session expired, was released or disconnected in Creator), or the key was revoked |
4 | the project is busy: another agent session holds it (agent start --takeover) |
Quick start
npx mapples create my-app --secret <key> # scaffold a connected Expo app
cd my-app && npx expo start # run it
npx mapples sync # after editing in Creator or in the files
npx mapples doctor # when something looks off
Or with a coding agent:
npx mapples create my-app --secret <key> --agent claude
cd my-app && MAPPLES_SECRET=$(cat .mapples/secret) claude