How to run a single prompt and exit
This guide shows how to run mini-me with a single prompt and exit immediately after the response, without starting an interactive session. Useful for one-shot tasks, scripting, or quick queries.
Steps
-
Run mini-me with the
-por--promptflag and your prompt text:mm -p "Create a README.md file with a project description" agent.yamlOr with the long form:
mm --prompt "What is the purpose of this project?" agent.yaml -
The agent executes the prompt, displays the tool call statistics and the response, then exits.
Variants
-
Config file before or after the flag. Both syntaxes work:
mm -p "hello" agent.yaml mm agent.yaml -p "hello" -
Use with different providers. Works with any configuration file:
mm -p "list files" agent.dmr.yaml mm -p "explain this code" agent.llamacpp.yaml -
Capture the output. The response prints to stdout, so you can pipe it:
mm -p "generate a summary" agent.yaml > summary.txt -
Script it. Use in shell scripts for automated tasks:
#!/bin/sh mm -p "fix the typos in this file" agent.yaml < input.txt
Notes
- No banner is printed in prompt mode.
- No session is saved; the conversation does not persist.
- Tool calls are executed and displayed like in the line mode.
- The agent exits immediately after the response, even if tools were called.
- Not compatible with
-acp(ACP mode) or-tui(window mode) — prompt mode takes precedence.
See also
- Command line reference: Reference — command line
- For interactive use: How to use the window mode
- For editor integration: Use mini-me from an editor (ACP)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|