Configuration
The CLI keeps a linked app's state in a .mapples/ folder at the app root. There is no other config file.
.mapples/config.json
Written by create and init. Commit it.
| Field | Meaning |
|---|---|
projectId | The Creator project the app is linked to |
apiUrl | The Mapples API the CLI talks to (default https://prod-us.mapples.org) |
routesDir | Where route files live: src/app for an app from create |
pagesDir | Screens outside the navigation: <mapplesDir>/pages |
componentsDir | Saved components: <mapplesDir>/components |
mapplesDir | Everything else the CLI writes: src/mapples next to src/app, else mapples |
backend | The data backend chosen at link time: supabase, firebase, neon, postman, openapi or none |
schema | The config schema version |
The key
.mapples/secret holds the project API key and is git-ignored. The MAPPLES_SECRET environment variable overrides it, which is how a coding agent's MCP entry reads the key. Never put the key in config.json.
The other state files
| File | Meaning |
|---|---|
head | The last synced head of the project |
pages.json, components.json | Which file each page and component maps to |
base/ | The canonical JSON of every synced entity at the last head, the base for three-way merges |
outbox/ | Transactions parked while offline, drained on the next run |
packages.json | The optional packages the CLI added for the project |
cli.json | The CLI version and command list the agent bundle was installed with |
agent.json | The agent-session lease held by this checkout; git-ignored, present during a run |
selection.png | The last screenshot from mapples selected --screenshot |
Keep head, base/ and pages.json: without them the next sync is a cold bootstrap of the whole project.
Environment variables
| Variable | Purpose |
|---|---|
MAPPLES_SECRET | The project API key, instead of .mapples/secret |
MAPPLES_ENV | dev, staging or prod: which Creator stage to talk to when config.json has no apiUrl |
Precedence for the API endpoint: --api-url on the command line, then config.json, then MAPPLES_ENV, then production.
Git
create writes a .gitignore with Expo's entries plus .mapples/secret, .mapples/agent.json and .mapples/outbox/. init adds the same entries to an existing one.