Skip to main content

meridian-governance-cli

Scriptable command-line client for Meridian Governance Router, over meridian-client. Installs as the mdn command — one short command, same shape as mta or claude.

The PyPI package is meridian-governance-cli; the command it installs is mdn. Not to be confused with the unrelated meridian-cli package also on PyPI.

Closer in spirit to the aws or stripe CLIs than to an app's own CLI: subcommands over an API, scriptable, mostly no interactive loop required — with one exception. chat absorbed Local-AI's reference implementation upstream (meridian-agent-v1.0.py, decided 2026-10-18) so customers get one governed resolve -> dispatch -> audit loop from Meridian itself, interactively or scripted, rather than writing that sequence themselves against the SDK.

Install

curl -fsSL https://dev-meridian.mytrustworthy.ai/install.sh | bash

Detects Python 3.9+, installs via pipx if present, otherwise into an isolated venv under ~/.local/share/mdn with a shim on ~/.local/bin. One command, nothing else to figure out.

Or plain pip, if you'd rather manage the venv yourself:

pip install meridian-governance-cli

Get credentials

mdn signup          # new org — prompts for org name, email, password
# or
mdn login           # existing account — authenticates, mints a new key
mdn whoami           # confirm what's saved

Credentials live in ~/.meridian/config.json (mode 600 — api_key is in there in plaintext, same tradeoff mta-cli makes for its own token). Override the location with MERIDIAN_CLI_HOME if you want more than one profile.

Commands

mdn resolve my_agent [--project-id ID] [--json]
mdn explain ROUTING_LOG_ID
mdn audit ROUTING_LOG_ID --input-tokens N --output-tokens N

mdn projects create --name NAME [--quality Q] [--cost C] [--risk R]
mdn projects list

mdn agents create PROJECT_ID AGENT_NAME [--pinned-model M] [--quality-override Q] [--allowed-hubs h1,h2]
mdn agents list PROJECT_ID

mdn keys list [--json]
mdn keys create [--name NAME]
mdn keys revoke KEY_ID

mdn catalog
mdn logout

mdn chat [--agent NAME] [--project-id ID] [--max-tokens N]
mdn chat --one-shot "message" [--json] [--max-tokens N]
mdn chat --daemon [--host HOST] [--port PORT] [--refresh-interval SECS]

Every data-returning command without a dedicated human-readable format (explain, audit, catalog, projects list, agents list) prints raw JSON — pipe into jq.

chat

Per-turn flow: resolve(agent) -> catalog/hubs join -> dispatch to the chosen hub's OpenAI-compatible endpoint -> audit. Routing, scoring and governance all live in Meridian; chat just drives the loop. OpenAI-compat hubs only for now (vLLM, Ollama, OpenAI-shaped endpoints) — bedrock/ anthropic/etc. need a protocol translator, not yet added.

  • No args: interactive REPL. /help inside it for slash commands (/catalog, /hubs, /refresh, /history, /export, /window, …).
  • --one-shot "message": single turn, prints the response, exits. --json emits structured output (response, model, hub, routing_log_id, latency_ms, usage) instead of plain text.
  • --daemon: long-lived local OpenAI-compatible endpoint (POST /v1/chat/completions, GET /v1/models, GET /health) — point an existing OpenAI-SDK-based app at http://127.0.0.1:8700 and it works unchanged, with Meridian's governance and audit trail in the middle. The F9 "broker" shape from Local-AI's feedback. Stateless across requests, same as the real OpenAI API: your app holds history and sends the full messages array each call.
  • --max-tokens: reasoning models can need a much larger budget than the default (8192) just to reach visible content — confirmed live against a real deployment where the same five-word prompt burned anywhere from ~2400 to the full 8192-token budget purely on reasoning, before any answer. If a response comes back as a token-budget notice instead of text, raise this — unless the prompt matches the pattern below, where raising it won't help.
  • Exact-count / constraint-satisfaction prompts can make reasoning never converge, at any budget. Isolated live against qwen3.6:35b: "Say hello in exactly five words." burned the entire reasoning budget at 8192, then again at 16384 — raising --max-tokens didn't make it converge faster, it just filled whatever ceiling it was given. The same model answers the unconstrained version ("Say hello.") normally in 186 reasoning tokens, and a substantive non-counting prompt normally in ~700. So this isn't the model's reasoning budget being too small — it's a specific model failure mode where exact-count constraints seem to trap it in verifying the count. Not a Meridian or CLI bug; a model characteristic to know about before raising --max-tokens in response to a stuck "exactly N words/items" prompt — raising it will not fix that case.

What this deliberately doesn't do

  • No hub/model/deployment registration commands yet. The routes themselves are tenant-scoped (fixed 2026-10-18 — POST /api/v1/hubs and /api/v1/backends both correctly bind the caller's org now), so this is purely "not built yet," not "would 403." Tracked separately.

Metadata

Release files for meridian-governance-cli 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meridian-governance-cli 0.3.0
File Size Uploaded Provenance
meridian_governance_cli-0.3.0.tar.gz 22.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for meridian-governance-cli 0.3.0
File Interpreter ABI Platform
meridian_governance_cli-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.1 kB

Release files / meridian_governance_cli-0.3.0.tar.gz

Download URL meridian_governance_cli-0.3.0.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fd98cf81dd1046812cb0dbeeabe5046f3286b2611bdf6c98ab296a67f3a00f32
BLAKE2b-256 checksum
How to use checksums
51aa52e9002009fd868d29ac11c325223f9614f58ca0e3767aae422c04227fc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / meridian_governance_cli-0.3.0-py3-none-any.whl

Download URL meridian_governance_cli-0.3.0-py3-none-any.whl
Size 21.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c80ce3ad8370beec7f7b9a1a49ba92832ce4801f46e328181bffeedc6318d70a
BLAKE2b-256 checksum
How to use checksums
b059bda8f675ba972de73aa8b59f69c52d7f66878cae910e38f6cc6868ec8693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for meridian-governance-cli 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page