Develop locally
After creating an app, run mistral dev from its directory to start the local stack. The command starts the app modules declared in mistral.json and a local gateway, then displays their status, URLs, and logs. Keep the command running while you edit. Each module uses its configured development command, including hot reload when that command supports it. Press Ctrl-C to stop the processes started by this run.
cd my-app
mistral devRun the dev stack
Run the dev stack
When the app has a frontend, dev opens it in your browser after every module is ready. To skip this, pass --no-open. The browser doesn't open in CI, over SSH, or on Linux without a display: open the gateway URL printed in the terminal instead. The CLI allocates ports automatically and reports a replacement when a requested port is in use.
Configure API access
Configure API access
Fill in the environment values required by your selected capabilities before starting the app. dev passes the app's .env to its modules. Modules that call Mistral themselves, such as the workflow worker, read MISTRAL_API_KEY from .env.
Mistral API calls through the local gateway run as the organization and workspace selected by mistral login. Without a login, dev uses MISTRAL_API_KEY from the shell that runs it, or apiKey from your CLI config, and looks up the key's organization and workspace. A key that is only in the app's .env is not used for this. dev prints the identity at startup.
If dev can't resolve an organization, the local modules can still start, but Mistral API calls through /api fail. Run mistral login, or check the key, and restart dev.
Run selected modules
Run selected modules
Pass module names from mistral.json, separated by commas:
mistral dev --filter api
mistral dev --filter web,apiThese examples use the modules of the app preset: web, api, and worker. To list your app's modules, run mistral apps modules. Include the backend when running a frontend that needs it: --filter doesn't start omitted modules.
Logs and gateway troubleshooting
Logs and gateway troubleshooting
In an interactive terminal, dev shows a live status and log view. When output is redirected, it prints prefixed log lines. For scripts and agents, print one JSON event per line:
mistral dev --jsonTo diagnose a gateway problem, start the modules without it and use their individual URLs:
mistral dev --no-gatewayThis mode omits the gateway's authentication and Mistral API proxy. The installed CLI includes the local gateway.
Backing services
The postgres capability runs a local database in Docker.
Start Docker before you run mistral dev. Without Docker, dev warns and starts the modules without a database.
To use a Postgres database you run yourself, set DATABASE_URL. Complete the environment settings reported by your selected capabilities, and check the terminal logs if a service isn't ready.
Work with a coding agent
Work with a coding agent
A generated app is a plain repository, with no CLI runtime or framework layer. The CLI copies capability templates into it as they are, so everything the app contains is editable source. Any coding agent, such as Mistral Vibe, can work on it directly.
Use the CLI for the operations it owns: scaffold the app with mistral init, and change its capabilities with mistral apps capability add, remove, or select. These commands also regenerate the route files. Let the agent edit the rest of the source. For the full command list, see Mistral CLI. To connect an agent to Mistral from the command line, see Mistral MCP.
Going further
Going further