Skip to content

CLI reference

Two command surfaces, deliberately mirrored. mx works from anywhere and knows about global state: templates, recipes, the router. make works inside a project and is the same in every project. Where they overlap (dev, up, down, logs, sh, ps, build), they do the same thing.

Everything below is transcribed from mx --help, mx <verb> --help and make help against the current build. Ask any of them yourself. They are the authority, this page is a map.

mx [OPTIONS] <COMMAND>
Options:
-v, --verbose Enable verbose output
-h, --help Print help
-V, --version Print version
CommandPurpose
mx initInstall templates to ~/.mech-crate. --force to overwrite, --update to refresh templates and keep config
mx new <NAME>Create a project. --with <SERVICE> (repeatable), --infra <PROVIDER>, --no-prompt
mx add <NAME>Add a service. --recipe <RECIPE>, --domain <DOMAIN>, --opt <KEY=VALUE>
mx recipes list | lsList available recipes
mx recipes info <NAME>Recipe description, features, options, services
mx recipes apply <NAME>Apply a recipe to the current project
mx recipes versions <NAME>List available versions for a recipe
mx recipes pull <NAME>Pull a recipe from Unyform
mx recipes cacheManage cached recipes
mx upgradeUpgrade project scaffolding. --diff, --dry-run, --yes. See Upgrade
mx self-updateUpdate mx itself from the release channel. --check (exit 10 when newer exists), --dry-run, --yes, --to <VERSION>, --rollback, --from-dir <DIR>, --pull for source checkouts. See Install

All of these take an optional [SERVICE] and support -f/--follow and -v/--verbose:

CommandPurpose
mx dev [SERVICE]Start the development environment
mx up [SERVICE]Start services in production mode
mx down [SERVICE]Stop services
mx restart [SERVICE]Restart a service
mx logs [SERVICE]View service logs
mx sh [SERVICE]Open a shell in a service container
mx ps [SERVICE]List running services

mx build <SERVICE> requires the service name and takes --prod, --dev, -t/--tag <TAG>, --push, --no-cache, --platform <PLATFORM>.

mx doctor checks project health and exits non-zero on a failed check.

mx router install | up | down | restart | status | logs | inspect | network | uninstall

start aliases up, stop aliases down, ps aliases status, info aliases inspect, and remove aliases uninstall. Detail on The router.

mx infra setup [PROVIDER] | list | inspect | link | unlink | remove

ls aliases list. See Infra credentials.

CommandPurpose
mx mcp buildBuild the MCP server binaries
mx mcp status | psCorpus backend and counts
mx mcp configPrint MCP client configuration
mx mcp runRun the MCP server interactively
mx mcp info / mx mcp testServer info / smoke test
mx rag ingestIngest technique docs into the corpus
mx rag statusBackend, doc/chunk counts, embedding model
mx rag gapsMine research-gap themes from weak-scoring queries

More on AI Layer.

mx docs [INPUT] compiles Markdown to PDF/HTML. It takes a file or a directory and has a large flag surface: --output, --title, --author, --theme, --order, --markdown-only, --html-only, --no-toc, --no-recursive, --logo, --company-name, plus a docs.json config mode (--config, --list, --all, --doc). Run mx docs --help for the full list, and see the corpus guide: mx docs.

mx login, mx logout, mx whoami, and the same three under mx unyform login | logout | whoami. mx cc-plugin installs or uninstalls the Unyform Claude Code plugin hooks. All optional; see Remote blueprints.

Every scaffolded project ships these. make help prints them with descriptions. Two conventions run through all of them:

  • s=<service> (or service=<service>) selects what to act on. Verbs that operate on the whole stack treat it as optional; restart requires it. Where the compose verb underneath takes several service operands, s= takes a whitespace-separated list in quotes: make dev s="api site". The quotes are required, because make otherwise reads the second name as another goal.
  • t=<tag>, c=<command>, a=<app> follow the same short/long pattern (tag=, cmd=, …).

Which verbs take a list is decided by the verb underneath rather than by taste:

s= acceptsVerbs
a listdev, up, down, stop, restart, logs
one servicebuild, build-dev, build-prod, build-multiplatform, run, exec, sh, bash

A single-service verb handed a list refuses out loud (make build takes a single service only) rather than silently acting on the first name. An unknown name anywhere in a list fails and names it.

TargetPurpose
make helpShow available commands
make initInitialize project environment (creates .env.secrets from the template, then generates any value still missing)
make doctorCheck project health
make testRun the project’s tests
make psList running services
make devStart services in dev mode (s="[service ...]" for a subset)
make upStart services in production mode (s="[service ...]" for a subset)
make downStop and remove services (s="[service ...]" for a subset)
make stopStop services without removing (s="[service ...]" for a subset)
make startResume services from saved state
make restartRestart services (s="[service ...]" required)
make logsTail service logs (s="[service ...]" for a subset)
make sh / make bashShell into a running service (s=[service], one service)
make execExec a command in a running container (s=[service] c=[cmd], one service)
make runRun a command in a new container (s=[service] c=[cmd], one service)
make buildBuild an image (s=[service] t=[tag] prod=[0|1] push=[0|1], one service)
make build-dev / make build-prodBuild one image variant explicitly (one service)
make build-multiplatformMulti-platform production build (one service)
make make-keyGenerate a secret (BYTES=32 FORMAT=hex|base64|uuid)

Release targets (make release, release-patch, release-minor, release-major, release-dry, release-first, release-simple*, release-push, release-full, release-sync, release-changelog, release-version, release-list-apps) all take app=[app] and drive the per-app version/tag flow.

Cloudflare targets (cf-setup, cf-deploy, cf-logs, …) exist only in projects created with --infra cloudflare; they are listed on Cloudflare deploy.

The repository’s own Makefile is a different surface: make build, make test, make lint, make check, make coverage, make test-known-broken, make test-e2e, make test-mutants, make install-local. See Testing, and the corpus cards: MechCrate CLI Quick Reference and MX Rust CLI & MCP Server Quick Reference.