CLI
Unyform ships two command-line tools. The unyform CLI manages a project's
convention files, validation, and MCP wiring. The mx CLI (the broader
Unyform toolchain) carries the Claude Code plugin and account/recipe commands.
This page is the full catalog; the in-depth guides are linked inline.
unyform CLI
The unyform binary lives in the unyform-cli crate:
--verbose / -v is a global flag on every subcommand (turns on debug logging).
| Command | What it does | Key flags |
|---|---|---|
unyform init | Create .unyform/config.yml, install a unyform validate --staged pre-commit hook, and add generated convention files to .gitignore. | --org-id <id> (required), --gateway-id <id>, --dir <path> |
unyform generate | Write convention files for each detected agent, pulling your org's conventions from the API (falls back to local config when no key). | --agent <name>, --dir <path> |
unyform validate | Validate changed files against your org's blueprints and policies; exits 1 on any error-severity violation. | --staged (validate staged files, used by the pre-commit hook), --dir <path> |
unyform status | Show whether the project is initialized, detected agents, which convention files exist, API-key state, and MCP-server presence. | --dir <path> |
unyform login | Store your Unyform API key (masked prompt, or --api-key) at ~/.unyform/credentials.json (mode 0600). | --api-key <key> |
unyform mcp config | Print ready-to-paste MCP config blocks for detected agents (Claude Code JSON, Codex TOML). | --dir <path> |
unyform mcp status | Check that the unyform-mcp binary is on your PATH and report its version. | โ |
--agent accepts: claude, codex, cursor, windsurf, aider,
openhands, devin. See Use the MCP server
for what unyform mcp config / status set up and the tools the server exposes.
Note
unyform mcp config and status only know the MCP binary (unyform-mcp), which is a separate crate โ install it with cargo install unyform-mcp-server.
A typical first run, end to end:
mx (Unyform-related commands)
The mx CLI is the same binary used across the Unyform toolchain. These are the
account, plugin, and recipe commands relevant to Unyform users; mx also has
many project/infra commands that are out of scope here. --verbose / -v is
global.
Account
mx login, mx logout, and mx whoami are top-level shortcuts; the same
commands also live under mx unyform.
| Command | What it does | Key flags |
|---|---|---|
mx login | Authenticate with Unyform and store credentials. Interactive by default; pass --api-key for CI. | --api-key <key>, --url <url>, --browser |
mx logout | Clear stored Unyform credentials. | โ |
mx whoami | Show the logged-in account, email, and your organizations. | โ |
mx unyform login / logout / whoami | Identical to the top-level shortcuts above. | (as above) |
Note
mx login --browser is not yet implemented in the Rust CLI โ it prints a notice and exits. Use --api-key for now.
Claude Code plugin
mx cc-plugin manages the local Claude Code hooks that inject your org's
blueprints into a session without re-routing inference. Full walkthrough:
Use the Claude Code plugin.
| Command | What it does | Key flags |
|---|---|---|
mx cc-plugin install | Write the SessionStart + Stop hook entries into ~/.claude/settings.json and, with a key, the auth config (mode 0600). Idempotent and additive. | --api-key <uny_gw_โฆ> (env UNYFORM_API_KEY), --base-url <url>, --force/-f |
mx cc-plugin uninstall | Remove the Unyform hooks (and the auth config unless --keep-config). | --keep-config |
mx cc-plugin status | Report which hooks are installed and whether the auth config is present (key shown redacted). | โ |
The session and stop subcommands exist but are hook handlers invoked by
Claude Code, not by you โ they're hidden from --help and not meant for
manual use.
Recipes
mx recipes manages org recipes (cached locally and pulled from Unyform). Most
remote operations require mx login first.
| Command | What it does | Key flags |
|---|---|---|
mx recipes list | List local recipes, plus your org's recipes when logged in. (mx recipes with no subcommand does the same; ls is an alias.) | โ |
mx recipes info <name> | Show a recipe's description, features, options, and services. | โ |
mx recipes pull <name[@version]> | Download a recipe from Unyform into the local cache. | โ |
mx recipes apply <name[@version]> | Apply a recipe's patterns to the current project as Cursor coding rules. | --fix |
mx recipes versions <name> | List published versions of a recipe (latest marked). | โ |
mx recipes cache [list|clear] | List or clear the local recipe cache (defaults to list). | โ |