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:

cargo install unyform-cli unyform status

--verbose / -v is a global flag on every subcommand (turns on debug logging).

CommandWhat it doesKey flags
unyform initCreate .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 generateWrite 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 validateValidate 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 statusShow whether the project is initialized, detected agents, which convention files exist, API-key state, and MCP-server presence.--dir <path>
unyform loginStore your Unyform API key (masked prompt, or --api-key) at ~/.unyform/credentials.json (mode 0600).--api-key <key>
unyform mcp configPrint ready-to-paste MCP config blocks for detected agents (Claude Code JSON, Codex TOML).--dir <path>
unyform mcp statusCheck 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:

unyform init --org-id acme โœ“ Initialized Unyform in /work/acme-api unyform login โœ“ API key saved to ~/.unyform/credentials.json unyform generate โœ“ 2 convention files generated

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.

CommandWhat it doesKey flags
mx loginAuthenticate with Unyform and store credentials. Interactive by default; pass --api-key for CI.--api-key <key>, --url <url>, --browser
mx logoutClear stored Unyform credentials.โ€”
mx whoamiShow the logged-in account, email, and your organizations.โ€”
mx unyform login / logout / whoamiIdentical 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.

CommandWhat it doesKey flags
mx cc-plugin installWrite 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 uninstallRemove the Unyform hooks (and the auth config unless --keep-config).--keep-config
mx cc-plugin statusReport 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.

mx cc-plugin install --api-key uny_gw_your_key_here โœ“ installed 2 Unyform CC hook(s) in ~/.claude/settings.json โœ“ wrote cc-plugin auth config to ~/.config/unyform/cc-plugin.json (mode 0600) mx cc-plugin status Unyform CC hook status (settings: ~/.claude/settings.json) โœ“ SessionStart โ†’ mx cc-plugin session โœ“ Stop โ†’ mx cc-plugin stop

Recipes

mx recipes manages org recipes (cached locally and pulled from Unyform). Most remote operations require mx login first.

CommandWhat it doesKey flags
mx recipes listList 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).โ€”
Edit this page on GitHub