✓ Verify: the mica command name The command parser, the part that reads what you typed, is built with prog="mica" in mica/cli/main.py. This page uses python -m mica.cli.main because the installed command name is not settled. There is no installer yet. The code also has mcp and project commands that this page does not cover.
How every command behaves
- Exit code
0 means success. 1 means the command ran but its work failed, for example a build with failed tasks. 2 means MicaError, a problem that stopped the command before it could run. That message appears as error: ... on stderr, the error output. - How much the program logs, and in what format, comes from
MicaConfig (log_level, log_format).
Starting and checking a project
init: create a project workspace
mica init <slug> [--name NAME] [--brief BRIEF]
| Argument | Required | What it does |
|---|
slug | yes | The project's short name, in lowercase, for example ai-glasses. |
--name | no | The name people will read, for example Sensor Board. |
--brief | no | One line that describes what you want to build. |
status: list projects or show one project
mica status [<slug>]
Leave out the slug to list every project.
Design commands
build: make a design from a brief
mica build <slug> "<brief>"
| Argument | Required | What it does |
|---|
slug | yes | The short name of the project to build. |
brief | yes | Your description of what you want, in ordinary words. |
The command prints how many requirements it compiled, what happened on each task ([ok] or [FAIL], with details), the files it produced, and how many provenance links it recorded. Provenance links record where each fact came from. Note: paid mode is planned and not live. If a license server were configured, build would need an active subscription.
propose: ask the AI helper for a set of changes
mica propose <slug> "<instruction>" [--apply]
| Argument | Required | What it does |
|---|
slug | yes | The short name of the project to change. |
instruction | yes | The change you want, in ordinary words. |
--apply | no | Make the change instead of only showing it. Without this flag, you get a review only. |
twin: rebuild and show the digital twin (a model of the design held in software)
mica twin <slug>
vision: read a part's data sheet or other technical text
mica vision "<text>" [--type TYPE]
| Argument | Required | What it does |
|---|
text | yes | The text you want it to read. |
--type | no | What kind of document it is. The default is datasheet. |
Design and factory outputs
pcb: route the board and export the factory files
mica pcb <slug>
This draws the copper paths that connect the parts on the printed circuit board (PCB). A PCB is the flat board inside a device that holds and connects the electronic parts. The command exports three things. Gerber RS-274X files are the files a factory uses to make the board. A DRC report is a design rule check that tests the board against manufacturing rules. The BOM, or bill of materials, is the list of parts to buy. A board that did not route is never exported. note The real command line has no pcb gerber, pcb drill or pcb pickplace sub-commands, even though older docs mention them. Use pcb <slug>.
mech: design the case and export it as a STEP file, a 3D file format
mica mech <slug>
firmware: generate, compile and test placeholder firmware on your computer
mica firmware <slug> [--cross]
| Flag | What it does |
|---|
--cross | Try the arm-none-eabi-gcc cross-compiler instead of the host cc. This only checks that the code compiles for an ARM target. The tests do not run, and the result must not be flashed to a chip. |
It reads design/firmware.json from the project folder, writes the source files, compiles them, and runs the tests on your computer against a simulated register map. It prints Firmware compiled: ...; tests run: ... and the test output. This firmware is a placeholder. It does not run on a real board.
mfg: run a manufacturing estimate
mica mfg <slug>
test: build a test plan
mica test <slug>
docs: build the documentation
mica docs <slug>
Server commands
serve: run the JSON-RPC server on stdio (standard input and output)
mica serve
serve-ui: run the desktop app's server over HTTP (the web request rules)
mica serve-ui [--port PORT]
| Flag | What it does |
|---|
--port | The numbered door the server listens on. The default is 9876. |
Settings the command line reads from your computer
| Variable | What it does |
|---|
MICA_LICENSE_SERVER_URL | Would turn on the account plans and the included AI models. Both are planned and not live. Without it, MICA runs in free local mode. |
MICA_LICENSE_KEY | A license key, for the planned paid mode. This is an alternative to ~/.mica/license.json. |
MICA_HOSTED_MODEL | The model name that would be sent to the planned gateway. |
MICA_MODEL_PROVIDER | Chooses the model provider yourself. This always wins over automatic detection. |
MICA_BILLING_MODE=dev or MICA_DEV=1 | Development mode: every feature is allowed and no license check runs. |