Skip to content

Headless mode runs a single prompt without the interactive TUI. It is intended for scripts, CI jobs, and programmatic integrations.

Basic usage ​

bash
m31a -p "Explain the architecture of this codebase"
m31a --prompt "Run tests and summarize failures"

The -p/--prompt prompt is appended to any input received on stdin, so you can pipe context into the agent:

bash
cat error.log | m31a -p "Group these errors by root cause"

-p cannot be combined with a positional prompt or with -i.

Prompt and continue interactively ​

bash
m31a -i "Start by reading the README"

--prompt-interactive executes the prompt and then keeps the TUI open.

Output formats ​

Use --output-format (-o) with one of:

FormatDescription
textPlain human-readable output (default).
jsonA single structured JSON result.
stream-jsonNewline-delimited JSON events as the run progresses.
bash
m31a -p "Summarize the failing tests" --output-format json
m31a -p "Run tests and summarize failures" --output-format stream-json

output.format in settings provides the same default for interactive runs.

Raw output ​

--raw-output disables sanitization of model output, allowing ANSI escape sequences. This can be unsafe with untrusted output; --accept-raw-output-risk suppresses the warning. Prefer the default sanitized output in automation.

Integrations in CI ​

A typical CI step:

bash
export NVIDIA_API_KEY="nvapi-..."
node bundle/m31a.js -p "Review the diff for security issues" \
  --output-format json > review.json

The release workflow uses the bundled entry point bundle/m31a.js, so the same command works in environments without a global install.

ACP mode ​

For IDE-style clients that need a bidirectional protocol, use --acp instead of headless prompts. See ACP.

Next steps ​

See the CLI reference for every flag and validation rule.

Built with VitePress. Powered by NVIDIA NIM.