bots-garden/mini-mepublic Fork 0
d72271127802973540c648bfb372176cdaaa8e4f
Commits
Clone
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

cli.md · 79 lines · 3.5 KBmarkdown Blame HistoryRaw
💾 Saved. d722711 k33g 8h ago1# Reference: command line
2
3> Neutral description of the `mm` executable: flags, positional argument, environment variables, start-up output and exit codes.
4
5## Invocation
6
7```
8mm [-config <path>] [-acp] [<path>]
9```
10
11| Element | Type | Default | Description |
12|---------|------|---------|-------------|
13| `-config <path>` | string | `""` | Path of the YAML configuration file. |
14| `<path>` | positional | none | Same as `-config`, when `-config` is not given. A second positional argument is an error. |
15| `-acp` | bool | `false` | Serve the Agent Client Protocol on stdin/stdout instead of the terminal REPL. |
16| `-h` | — | — | Print the flag usage and exit. |
17
18## Configuration file resolution
19
20The first existing source wins.
21
22| Order | Source | Missing file |
23|-------|--------|--------------|
24| 1 | `-config` flag or positional argument | Error, exit code 1 |
25| 2 | `AGENT_CONFIG` environment variable | Error, exit code 1 |
26| 3 | `./agent.yaml` | Not an error: built-in defaults are used, the banner shows `config: built-in defaults` |
27
28## Environment variables
29
30| Variable | Effect |
31|----------|--------|
32| `AGENT_CONFIG` | Path of the configuration file (see above). |
33| `AGENT_PROVIDER` | Overrides the `provider` key. |
34| `AGENT_MODEL` | Overrides the `model` key. |
35| `AGENT_BASE_URL` | Overrides `baseUrl` and disables the fallback probe. |
36| `DMR_BASE_URL` | Same as `AGENT_BASE_URL`, for the `dmr` provider only; `AGENT_BASE_URL` wins when both are set. |
37| Variable named by `apiKeyEnv` | Holds the API key. Default name: none for `dmr`, `LLAMA_API_KEY` for `llamacpp`. |
38
39## Start-up output
40
41Printed on stdout in terminal mode, on stderr in ACP mode. Dimmed when stdout is a terminal.
42
43| Line | Content |
44|------|---------|
45| `[warning: …]` | Zero or more probe warnings: server unreachable, model not in the server's list, no chat template, compression that can never trigger. |
46| `config: … \| provider: … \| model: … \| ctx: … \| tools: … \| skills: N` | Configuration path, provider name, model identifier, context window with its origin (`config`, `/props`) or `unknown`, declared tool names, number of skills found. |
47| `Agent ready. Commands: …` | Terminal mode only. |
48| `Shortcut: Ctrl+C …` | Terminal mode only. |
49
50### Example
51
52```
53[warning: llamacpp: nothing answers at http://127.0.0.1:8080/v1 — start it: llama-server -m <model.gguf> --jinja --port 8080]
54config: agent.llamacpp.yaml | provider: llamacpp | model: jetbrains/mellum2-12b-a2.5b-instruct-gguf-q4_k_m:Q4_K_M | ctx: unknown | tools: bash, read_file, write_file, edit_file | skills: 0
55```
56
57## ACP mode specifics
58
59| Aspect | Behaviour |
60|--------|-----------|
61| stdout | JSON-RPC 2.0 messages only, one per line. |
62| stderr | Banner, warnings, `[acp] …` trail, SDK logs. |
63| Spinner | Disabled. |
64| Relative `skillsDir` | Resolved relative to the directory of the configuration file, when a file was found; otherwise from the working directory, as in terminal mode. |
65
66## Exit codes
67
68| Code | Cause |
69|------|-------|
70| 0 | `/quit`, `Ctrl+C` at the prompt, end of stdin, or the ACP client closed the connection. |
71| 1 | More than one positional argument; configuration load error; engine initialisation error (unknown provider, required key not set). |
72
73## Build and install
74
75| Command | Effect |
76|---------|--------|
77| `go build -o mm .` | Builds the binary in the current directory. |
78| `./install.sh` | Builds `mm` and copies it to `/usr/local/bin`, with `sudo` when the directory is not writable. |
79| `go test ./...` | Runs the unit tests. |