MAQPNADocs

maqpna dev run

Run a command as an agent session of the local MAQPNA, then print what it did

Get started-o json | yaml

Synopsis#

maqpna dev run [--agent coder] [--namespace dev] [--user you@localhost] [--scope S]... [--session S] [--ttl 1h] -- CMD [ARG]...

Description#

From the help of maqpna dev:

up starts maqpna-identity, maqpna-gateway and (unless --no-echo) mcp-echo from the installed binaries (next to maqpna or on PATH); in a source checkout with --from-source, or when they are missing, they are built with go build. run mints a session token from the local broker and runs CMD with the same environment the operator gives a sandbox (MAQPNA_GATEWAY_URL, MAQPNA_TOKEN, MAQPNA_SESSION, MAQPNA_AGENT, MAQPNA_TOOL_<NAME>_URL), then prints what the session did. Exit code: CMD's.

Flags#

FlagTypeDescriptionDefault
--agentstringagent name (token claim; policies match on it)coder
--dirstringstate directory (keys, config, ledger, logs).maqpna
--namespacestringnamespace (token claim)dev
--scopestringtoken scope (repeatable; default: tools:<each MCP server> and models:*)none
--sessionstringsession id (default: dev-<random>)none
--ttldurationtoken lifetime1h0m0s
--userstringon-behalf-of useryou@localhost

The global flags (--context, -o, --no-color, ...) work with every command.

Examples#

maqpna dev run -- python agent.py

What happens when you run it#

  • Prints a table by default; -o json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)
CMDthe exit code of the command it ran

Terminal demo#

maqpna dev run.cast