Matrix logo

CLI Reference

The Matrix command-line surfaces: mclc, mcl-execute, mcl-tools, mcl-validate, cortex-shell, cortex-mcp, deusctl, and neo, and what each subcommand does.

Matrix ships several CLIs built by make install into ./bin. They share flags like -cortex-root, -manifest, and -skills-root.

mclc -- the compiler

SubcommandPurpose
compileCompile prose + a skill + a verb into an Intent Frame
validateStrict validation of a SKILL.mtx
hashCompute the canonical AST digest
parseParse and dump the AST
./bin/mclc compile -skill skills/writing-plans/SKILL.mtx \
  -prose "Build a deployment pipeline" -verb build [-dry-run]

mcl-execute -- the runtime

SubcommandPurpose
walkCompile an intent, synthesize a PlanTree, and walk it to completion
classifyRun the materiality classifier on an intent
loaderLoad and inspect an agent manifest + its skills
daemonRun the per-user HTTP + SSE daemon
./bin/mcl-execute walk -prose "Summarise the README" \
  -manifest agents/default.json -cortex-root ./runs/dev-cortex -skills-root ./skills

mcl-tools -- MCP tool inspection

SubcommandPurpose
verifyVerify a manifest's tool bijection (declared == discovered)
listList tools exposed by the manifest's MCP servers
describeShow a tool's schema
callInvoke a tool directly

mcl-validate

Validates a single SKILL.mtx. The mtx-corpus CI job runs this across the whole corpus on every PR.

./bin/mcl-validate skills/<slug>/SKILL.mtx

cortex-shell

Inspect and maintain a cortex store. The load-bearing command is the replay verifier:

cortex-shell rebuild -verify-only   # drop derived, rebuild, assert byte-identical OverallRoot

cortex-mcp

An HTTP server that exposes cortex memory verbs as MCP tools. Runs on 127.0.0.1:4242 by default.

Transport: JSON-RPC 2.0 over HTTP POST (MCP Streamable HTTP transport). Auth: Authorization: Bearer <CORTEX_MCP_TOKEN>

MCP tools

ToolPurpose
cortex_recallLoad all persistent memories (call at session start)
cortex_guardPrint hard + firm rules fail-closed (call before destructive actions)
cortex_verifyTamper-check the memory store (Merkle journal replay)
cortex_briefSalience-ranked, budget-bounded context bundle
cortex_searchTargeted semantic search of persistent memory
cortex_remember_factStore a durable fact
cortex_remember_preferenceStore a stated preference (like/dislike)
cortex_remember_constraintStore a standing rule or guardrail
cortex_remember_decisionStore a locked decision
cortex_note_outcomeRecord the result of a completed task

Configuration

Env varDefaultPurpose
CORTEX_MCP_PORT4242Listen port
CORTEX_MCP_TOKEN(empty)Bearer token for auth
CORTEX_MEM_SCRIPT~/.cursor/cortex-mem.shBackend shell script

cortex_search accepts an optional type filter: Fact, Preference, Belief, Event, Goal, Constraint, Capability, Pattern, Identity.

deusctl

Operate the Deus marketplace control plane:

Purpose
Validate service manifests
Register and publish services
Manage deployments
Query analytics and earnings
go run ./cmd/deusctl manifest validate test/fixtures/proxy-weather.json

neo

Run the Neo conversational agent locally (CLI reporter to stdout/stderr).

./bin/neo

Web Search (MCP stdio)

The web-search MCP server gives Matrix agents real internet search. It pairs with the built-in fetch server: web_search/web_news FIND sources, fetch READS them.

Provider: Tavily (recommended) or Brave Search. Selected by WEBSEARCH_PROVIDER, else auto: Tavily if TAVILY_API_KEY is set, otherwise Brave.

Env varDefaultPurpose
TAVILY_API_KEY(required for Tavily)Tavily API key
BRAVE_API_KEY(required for Brave)Brave Search API key
WEBSEARCH_PROVIDERautotavily or brave
WEBSEARCH_TIMEOUT_MS15000Request timeout
WEBSEARCH_MAX_RESULTS10Max results per search (cap 20)

No API key is required to boot: the server always starts and advertises its tools; a missing key degrades to a structured "not configured" result at call time.

Scaffold tools

Matrix ships scaffold scripts for bootstrapping projects in multiple frameworks:

ScriptFramework
scaffold-angular.shAngular
scaffold-astro.shAstro
scaffold-cpp.shC++
scaffold-go.shGo
scaffold-kotlin.shKotlin
scaffold-nextjs.shNext.js
scaffold-node.shNode.js
scaffold-php.shPHP
scaffold-py.shPython
scaffold-react-router.shReact Router
scaffold-rust.shRust
scaffold-svelte.shSvelte
scaffold-ts.shTypeScript
scaffold-vite.shVite
scaffold-vue.shVue

paxeer (MCP stdio)

The paxeer-net MCP server exposes Paxeer blockchain tools to agents: wallet operations, RPC calls, precompile access, PaxScan explorer queries, market data, and agent auth helpers.

media (MCP stdio)

The media MCP server provides media processing tools for agents.

layerx (MCP stdio)

The layerx MCP server bridges agent access to the LayerX settlement fabric: balance queries, payments, receipt lookups, and transfers.

MCL & skill authoring

Author the skills these CLIs compile.