Skip to main content
The factory command group drives the Machina Factory coding-agent — the “build me an app from a prompt” runtime behind customers.machina.gg/c — directly from your terminal. It builds an app in a sandbox, wires it to your project’s live data, and opens a pull request. It talks to the Factory customer surface (customers.machina.gg/c/api/*) and authenticates with the studio session you already have — the same login the /c web UI uses. No new credential to manage.

Authentication

Two modes, picked automatically:
If you see “Factory requires a studio session”, run machina login. An API-key-only login works for other commands, but factory needs either a studio session or MACHINA_API_KEY set for the headless path.

Usage

All commands accept --project / -p <id> and --json / -j.

run — start a build

--mode is an optional category chip: skill · connector · workflow · agent · template. run returns a job id that you pass to the other commands.

status / watch / logs

Build lifecycle:
(or failed / cancelled).

Iterate, cancel, ship

Headless / CI

No browser available? Use a project API key — the client-api-named key from machina credentials list, or generate one with machina credentials generate:
In this mode the CLI sends X-Api-Token; Factory validates it against core-api and scopes all factory operations to the key’s organization. The build’s pod credentials are derived from the key, so generated apps can still talk to your project’s live data via the pod.

Environment variables

The factory_url config key lives in ~/.machina/config.json; credentials live in ~/.machina/credentials.json (chmod 600).

Troubleshooting