mini-code-cli 0.1.1.4__tar.gz → 0.2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/PKG-INFO +62 -10
  2. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/README.md +61 -9
  3. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/agent_loop.py +448 -77
  4. mini_code_cli-0.2.1.0/mini_code_cli/background.py +494 -0
  5. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/persistence.py +14 -7
  6. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/runner.py +10 -2
  7. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/sandbox.py +1 -0
  8. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/subagents/__init__.py +4 -3
  9. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/subagents/base.py +3 -2
  10. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/tools.py +215 -23
  11. mini_code_cli-0.2.1.0/mini_code_cli/tui.py +1060 -0
  12. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/ui.py +141 -59
  13. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/utils.py +25 -10
  14. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli.egg-info/PKG-INFO +62 -10
  15. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli.egg-info/SOURCES.txt +4 -0
  16. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/pyproject.toml +8 -3
  17. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_advanced_features.py +5 -0
  18. mini_code_cli-0.2.1.0/tests/test_background.py +221 -0
  19. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_interactive.py +67 -5
  20. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_runner.py +13 -0
  21. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_subagents.py +4 -3
  22. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_tools.py +74 -0
  23. mini_code_cli-0.2.1.0/tests/test_tui.py +1180 -0
  24. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_utils.py +19 -1
  25. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/LICENSE +0 -0
  26. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/__init__.py +0 -0
  27. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/__main__.py +0 -0
  28. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/agent_files.py +0 -0
  29. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/compaction.py +0 -0
  30. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/config.py +0 -0
  31. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/permissions.py +0 -0
  32. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/plan.py +0 -0
  33. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/planning.py +0 -0
  34. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/prompts.py +0 -0
  35. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/shell_safety_utils.py +0 -0
  36. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/skills.py +0 -0
  37. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/subagents/builtin.py +0 -0
  38. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli/tokens.py +0 -0
  39. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli.egg-info/dependency_links.txt +0 -0
  40. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli.egg-info/entry_points.txt +0 -0
  41. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli.egg-info/requires.txt +0 -0
  42. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/mini_code_cli.egg-info/top_level.txt +0 -0
  43. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/setup.cfg +0 -0
  44. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_cli_features.py +0 -0
  45. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_config.py +0 -0
  46. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_e2e_agent_loop.py +0 -0
  47. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_permissions.py +0 -0
  48. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_release_script.py +0 -0
  49. {mini_code_cli-0.1.1.4 → mini_code_cli-0.2.1.0}/tests/test_tokens.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mini-code-cli
3
- Version: 0.1.1.4
3
+ Version: 0.2.1.0
4
4
  Summary: Mini Coding Agent. Allows you to easily experiment with a small coding agent.
5
5
  Author-email: Nikolai Rozanov <nikolai.rozanov@gmail.com>
6
6
  License-Expression: AGPL-3.0-only
@@ -30,6 +30,8 @@ Dynamic: license-file
30
30
  [![License: AGPL v3](https://img.shields.io/badge/license-AGPL--3.0-blue?style=flat-square)](LICENSE)
31
31
  [![Cite](https://img.shields.io/badge/cite-BibTeX-blueviolet?style=flat-square&logo=latex&logoColor=white)](#citation)
32
32
 
33
+ ![mini-code in a terminal](https://raw.githubusercontent.com/ai-nikolai/mini-code-cli/9337471d2848cfc59cc1ddd256239efd389cf3c4/docs/assets/mini-code-demo.gif)
34
+
33
35
  **Purpose:** a no-bloat, minimal coding CLI to enjoy experimenting and researching!
34
36
 
35
37
  **Install** · [Quick start](#quick-start) · [Modes &amp; safety](#modes--safety) · [Options](#command-line-options) · [Tools](#available-tools) · [Sub-agents](#sub-agents) · [In-session commands](#in-session-commands) · [Development](#development) · [Docs](#documentation) · [Citation](#citation)
@@ -67,7 +69,7 @@ mini-code --url "https://api.deepseek.com" --model "deepseek-v4-flash"
67
69
  **3 — The shortcuts** (plan mode, sub-agents, shell, auto-mode, no permission prompts):
68
70
 
69
71
  ```bash
70
- mini-code --all # = --plan --enable-subagents --enable-shell --skills --auto-mode --sudo
72
+ mini-code --all # = --plan --enable-subagents --enable-shell --skills --auto-mode --sudo --background
71
73
  mini-code --all-last # ...and continue your last session
72
74
  ```
73
75
 
@@ -100,6 +102,8 @@ given a reference implementation.
100
102
  | `--allowed-dir DIR` | `./` | sandbox for **file** tools (does not restrict the shell) |
101
103
  | `-s`, `--enable-shell` | off | allow shell execution (classifier always applies) |
102
104
  | `-g`, `--enable-subagents` | off | expose sub-agents as tools |
105
+ | `--background` | off | enable background shell/sub-agent tasks and the `background` tool; needs `--enable-shell` or `--enable-subagents` |
106
+ | `--tui [auto\|on\|off]` | `auto` | fixed full-screen dashboard. `auto` enables it only on a known interactive TTY; `on` forces it; `off` uses the scrolling console |
103
107
  | `--skills` | off | enable the `.mini` skills directory (`skill.md`s, `SKILLS.md`, runnable scripts). **`run_skill` executes those Python scripts — arbitrary code execution, even without `--enable-shell`**; only enable it for a directory you trust |
104
108
  | `-p`, `--plan` | off | plan mode (`CURRENT_GOAL.md` / `CURRENT_PLAN.md`, printed plan, `/plan`, `/skip-plan`) |
105
109
  | `--plan-strategy NAME` | `plan-verify-step` | `plan-verify-step`, `plan-verify` or `open-plan` (implies `--plan`) |
@@ -111,7 +115,7 @@ given a reference implementation.
111
115
  | `--cache-dir DIR` | `~/.cache/mini/sessions/` | where session histories are stored |
112
116
  | `--restore-session PATH` | — | continue a specific previous session |
113
117
  | `-l`, `--load-last-session` | off | continue the session recorded in the `.mini` pointer |
114
- | `--all` | off | `--plan --enable-subagents --enable-shell --skills --auto-mode --sudo` |
118
+ | `--all` | off | `--plan --enable-subagents --enable-shell --skills --auto-mode --sudo --background` |
115
119
  | `--all-last` | off | `--all` + `--load-last-session` |
116
120
  | `--verbose` | off | print full detail (default: user/assistant turns, token usage, tool calls only) |
117
121
  | `-h`, `--help` | — | show the built-in help |
@@ -123,14 +127,15 @@ parameter a model does not need is defaulted, so omitting it keeps the previous
123
127
 
124
128
  | Tool | What it does |
125
129
  | --- | --- |
126
- | `read_file` | read a file; `offset` (1-based line) and `limit` page through large files |
130
+ | `read_file` | read a file; `offset` (1-based line) and `limit` page through large files. Output is capped at 100k characters, so page or narrow instead of relying on a whole-file read |
127
131
  | `write_file` | write/overwrite; `append` adds to the end, `create_dirs` creates parents |
128
132
  | `edit` | replace an **exact** string (`old_string` → `new_string`); refuses a missing or ambiguous match unless `replace_all` |
129
- | `grep` | regex search a file or directory; `recursive`, `include`, `ignore_case`, `line_numbers`, `max_results` (noise dirs skipped) |
130
- | `glob` | list files matching a glob (one per line, `**` supported), optionally against a `root` |
133
+ | `grep` | regex search a file or directory; `recursive`, `include`, `ignore_case`, `line_numbers`, `max_results` (noise dirs skipped). Output is capped at 100k characters |
134
+ | `glob` | list files matching a glob (one per line, `**` supported), optionally against a `root`; capped at 2000 matches / 100k characters |
131
135
  | `web_search` | best-effort lookup: related queries + a short Wikipedia extract. Never raises |
132
- | `read_website` | fetch raw text/HTML of a URL (bounded by `--tool-timeout`), `max_chars` caps size |
136
+ | `read_website` | fetch raw text/HTML of a **public http/https** URL (other schemes and private/link-local hosts are rejected; `MINI_CODE_ALLOW_PRIVATE_URLS=1` overrides); `max_chars` caps size |
133
137
  | `run_shell_command` | run a shell command (needs `--enable-shell`); `cwd`, `timeout`, and stdout/stderr/exit code are all reported |
138
+ | `background` | start/list/output/wait/cancel background **shell** tasks (needs `--background --enable-shell`) or **sub-agent** tasks (needs `--background --enable-subagents`); output is captured in a per-task log |
134
139
 
135
140
  ## Sub-agents
136
141
 
@@ -185,6 +190,24 @@ to the model automatically when `--enable-subagents` is set. See
185
190
 
186
191
  </details>
187
192
 
193
+ ## Background tasks
194
+
195
+ When `--background` is enabled together with shell execution or sub-agents, the agent also gets a `background` tool:
196
+
197
+ - `background(action="start", command="pytest -q")` starts a long command in its own process group;
198
+ - `background(action="start", kind="subagent", subagent="software_engineer", task="...")` starts
199
+ a nested agent task;
200
+ - `list`, `output`, `wait` and `cancel` inspect or control the tasks.
201
+
202
+ Each task has an id (`bg-1`), a status, a log under the session folder
203
+ (`background/bg-1.log`), an output tail, and a cancellation path. Shell tasks are killed as a
204
+ process group; sub-agent tasks receive a cancellation event between steps. Background tasks are
205
+ session-local and do not survive a restart (the logs do).
206
+
207
+ Use `/background` to see the foreground activity and all tasks, or `/background bg-1` for one
208
+ task's output. Note that the main loop is synchronous, so `/background` can be typed between
209
+ steps; it shows the last/current blocking activity rather than live-during the call.
210
+
188
211
  ## In-session commands
189
212
 
190
213
  | Command | What it does |
@@ -196,6 +219,8 @@ to the model automatically when `--enable-subagents` is set. See
196
219
  | `/clear` | clear the screen (keeps the conversation history) |
197
220
  | `/plan` | show the current goal + plan (plan mode only) |
198
221
  | `/context` | show how the context window is used: tokens and percentages by category (system prompt, user/assistant messages, tool calls/outputs, reasoning, overhead) |
222
+ | `/background [id]` | show foreground activity + background tasks, or one task's output tail |
223
+ | `/expand [n]` | show the full detail of the nth most recent tool call (default: the last one) |
199
224
  | `/skip-plan <prompt>` | send `<prompt>` once without generating or reviewing a plan |
200
225
  | `/help` | show this help |
201
226
  | `/quit`, `/exit` | save the session and exit |
@@ -205,6 +230,28 @@ to the model automatically when `--enable-subagents` is set. See
205
230
  reminds you. Terminals that report `Shift+Enter` as a CSI-u/modifyOtherKeys
206
231
  sequence are recognised; elsewhere `Ctrl-J` inserts the newline.
207
232
 
233
+ With `--tui`, mini-code switches to a fixed alternate-screen dashboard: a
234
+ **Mini-Code** summary box (version/session/model/context) at the top, a core
235
+ conversation view of user/assistant turns in the middle, and an input box with
236
+ a one-line help hint at the bottom. The whole screen is redrawn on changes, so the view never
237
+ scrolls; tool/thinking status is a transient line that disappears when the
238
+ operation finishes. `Shift+↑`/`Shift+↓` scroll the middle pane one line at a
239
+ time and show `(lines scrolled / total)`; `Esc` returns to the bottom or closes
240
+ command output (`/help`, `/history`, ...). Info/warnings sit below a small
241
+ separator at the bottom of the body. The dashboard is coloured when the
242
+ terminal supports it; info/warnings/errors are shown as coloured
243
+ `ℹ`/`⚠`/`✖`/`✔` lines. Each assistant block also carries a dim line with
244
+ that turn's tool calls, background tasks and assistant-message count.
245
+ Questions (resume/permission) use a yellow "Question to User" box just above
246
+ the input. Restored sessions load their history into
247
+ the core view and mark the summary as `[restored]`; generated plans append to
248
+ the core view. Tool details can be expanded with `/expand [n]`.
249
+
250
+ The prompt has a small line editor: `↑`/`↓` recall previous turns, `←`/`→` move
251
+ the cursor, Home/End jump within the line, and `Ctrl-A/E/K/U/L` provide the
252
+ usual editing/clear shortcuts. `--tui` defaults to `auto` (known TTY only); use `--tui=off` for the old
253
+ scrolling console or `--tui=on` to force it. It is not part of `--all`.
254
+
208
255
  > [!NOTE]
209
256
  > `/history` and `/reset` are driven by `summary_history.json`, a flat recorder that maps every
210
257
  > turn to the `history_{n}.json` segment and message index it lives in — so no full history is
@@ -384,19 +431,24 @@ transcript and the segment left untouched.
384
431
  ### Exiting — the good-bye box
385
432
 
386
433
  Quitting (`/quit`, `exit`, or EOF on stdin) saves the session and then prints a short yellow
387
- box: the version, a sign-off, and what the session left behind — session id, folder, the
388
- history segments on disk, how many turns were recorded, and the token / call totals.
434
+ box: the version, a sign-off, and what the session left behind — session id, model, folder,
435
+ the history segments on disk, how many turns were recorded, run duration, token / call totals,
436
+ background tasks cancelled on exit, and a `--load-last-session` resume hint.
389
437
 
390
438
  ```
391
439
  ╔══════════ MiniCodeCLI v0.1.1.2 - goodbye ═════════════════════╗
392
440
  ║ Goodbye, and thanks for using MiniCodeCLI! ║
393
441
  ║ ║
394
442
  ║ session id : 1792666273983619-36ca3c2e ║
443
+ ║ model : ornith-ai/Ornith-1.5-35B-A3B ║
395
444
  ║ saved under : ~/.cache/mini/sessions/1792…-36ca3c2e/ ║
396
445
  ║ history : history_0.json (segment 0), 5 messages ║
397
446
  ║ conversation : 2 recorded turns ║
447
+ ║ duration : 12m 34s ║
398
448
  ║ tokens : 20 in / 10 out (30 total) ║
399
449
  ║ calls : 2 LLM, 0 tool ║
450
+ ║ background : none running ║
451
+ ║ resume : mini-code --load-last-session ║
400
452
  ╚═══════════════════════════════════════════════════════════════╝
401
453
  ```
402
454
 
@@ -429,7 +481,7 @@ If you use `mini-code-cli` in your research or writing, please cite it:
429
481
  author = {Rozanov, Nikolai},
430
482
  title = {mini-code-cli: A minimal, dependency-light coding agent},
431
483
  year = {2026},
432
- version = {0.1.1.4},
484
+ version = {0.2.0.0},
433
485
  howpublished = {\url{https://github.com/ai-nikolai/mini-code-cli}},
434
486
  note = {A no-bloat, dependency-light agent CLI for experimenting.}
435
487
  }
@@ -11,6 +11,8 @@
11
11
  [![License: AGPL v3](https://img.shields.io/badge/license-AGPL--3.0-blue?style=flat-square)](LICENSE)
12
12
  [![Cite](https://img.shields.io/badge/cite-BibTeX-blueviolet?style=flat-square&logo=latex&logoColor=white)](#citation)
13
13
 
14
+ ![mini-code in a terminal](https://raw.githubusercontent.com/ai-nikolai/mini-code-cli/9337471d2848cfc59cc1ddd256239efd389cf3c4/docs/assets/mini-code-demo.gif)
15
+
14
16
  **Purpose:** a no-bloat, minimal coding CLI to enjoy experimenting and researching!
15
17
 
16
18
  **Install** · [Quick start](#quick-start) · [Modes &amp; safety](#modes--safety) · [Options](#command-line-options) · [Tools](#available-tools) · [Sub-agents](#sub-agents) · [In-session commands](#in-session-commands) · [Development](#development) · [Docs](#documentation) · [Citation](#citation)
@@ -48,7 +50,7 @@ mini-code --url "https://api.deepseek.com" --model "deepseek-v4-flash"
48
50
  **3 — The shortcuts** (plan mode, sub-agents, shell, auto-mode, no permission prompts):
49
51
 
50
52
  ```bash
51
- mini-code --all # = --plan --enable-subagents --enable-shell --skills --auto-mode --sudo
53
+ mini-code --all # = --plan --enable-subagents --enable-shell --skills --auto-mode --sudo --background
52
54
  mini-code --all-last # ...and continue your last session
53
55
  ```
54
56
 
@@ -81,6 +83,8 @@ given a reference implementation.
81
83
  | `--allowed-dir DIR` | `./` | sandbox for **file** tools (does not restrict the shell) |
82
84
  | `-s`, `--enable-shell` | off | allow shell execution (classifier always applies) |
83
85
  | `-g`, `--enable-subagents` | off | expose sub-agents as tools |
86
+ | `--background` | off | enable background shell/sub-agent tasks and the `background` tool; needs `--enable-shell` or `--enable-subagents` |
87
+ | `--tui [auto\|on\|off]` | `auto` | fixed full-screen dashboard. `auto` enables it only on a known interactive TTY; `on` forces it; `off` uses the scrolling console |
84
88
  | `--skills` | off | enable the `.mini` skills directory (`skill.md`s, `SKILLS.md`, runnable scripts). **`run_skill` executes those Python scripts — arbitrary code execution, even without `--enable-shell`**; only enable it for a directory you trust |
85
89
  | `-p`, `--plan` | off | plan mode (`CURRENT_GOAL.md` / `CURRENT_PLAN.md`, printed plan, `/plan`, `/skip-plan`) |
86
90
  | `--plan-strategy NAME` | `plan-verify-step` | `plan-verify-step`, `plan-verify` or `open-plan` (implies `--plan`) |
@@ -92,7 +96,7 @@ given a reference implementation.
92
96
  | `--cache-dir DIR` | `~/.cache/mini/sessions/` | where session histories are stored |
93
97
  | `--restore-session PATH` | — | continue a specific previous session |
94
98
  | `-l`, `--load-last-session` | off | continue the session recorded in the `.mini` pointer |
95
- | `--all` | off | `--plan --enable-subagents --enable-shell --skills --auto-mode --sudo` |
99
+ | `--all` | off | `--plan --enable-subagents --enable-shell --skills --auto-mode --sudo --background` |
96
100
  | `--all-last` | off | `--all` + `--load-last-session` |
97
101
  | `--verbose` | off | print full detail (default: user/assistant turns, token usage, tool calls only) |
98
102
  | `-h`, `--help` | — | show the built-in help |
@@ -104,14 +108,15 @@ parameter a model does not need is defaulted, so omitting it keeps the previous
104
108
 
105
109
  | Tool | What it does |
106
110
  | --- | --- |
107
- | `read_file` | read a file; `offset` (1-based line) and `limit` page through large files |
111
+ | `read_file` | read a file; `offset` (1-based line) and `limit` page through large files. Output is capped at 100k characters, so page or narrow instead of relying on a whole-file read |
108
112
  | `write_file` | write/overwrite; `append` adds to the end, `create_dirs` creates parents |
109
113
  | `edit` | replace an **exact** string (`old_string` → `new_string`); refuses a missing or ambiguous match unless `replace_all` |
110
- | `grep` | regex search a file or directory; `recursive`, `include`, `ignore_case`, `line_numbers`, `max_results` (noise dirs skipped) |
111
- | `glob` | list files matching a glob (one per line, `**` supported), optionally against a `root` |
114
+ | `grep` | regex search a file or directory; `recursive`, `include`, `ignore_case`, `line_numbers`, `max_results` (noise dirs skipped). Output is capped at 100k characters |
115
+ | `glob` | list files matching a glob (one per line, `**` supported), optionally against a `root`; capped at 2000 matches / 100k characters |
112
116
  | `web_search` | best-effort lookup: related queries + a short Wikipedia extract. Never raises |
113
- | `read_website` | fetch raw text/HTML of a URL (bounded by `--tool-timeout`), `max_chars` caps size |
117
+ | `read_website` | fetch raw text/HTML of a **public http/https** URL (other schemes and private/link-local hosts are rejected; `MINI_CODE_ALLOW_PRIVATE_URLS=1` overrides); `max_chars` caps size |
114
118
  | `run_shell_command` | run a shell command (needs `--enable-shell`); `cwd`, `timeout`, and stdout/stderr/exit code are all reported |
119
+ | `background` | start/list/output/wait/cancel background **shell** tasks (needs `--background --enable-shell`) or **sub-agent** tasks (needs `--background --enable-subagents`); output is captured in a per-task log |
115
120
 
116
121
  ## Sub-agents
117
122
 
@@ -166,6 +171,24 @@ to the model automatically when `--enable-subagents` is set. See
166
171
 
167
172
  </details>
168
173
 
174
+ ## Background tasks
175
+
176
+ When `--background` is enabled together with shell execution or sub-agents, the agent also gets a `background` tool:
177
+
178
+ - `background(action="start", command="pytest -q")` starts a long command in its own process group;
179
+ - `background(action="start", kind="subagent", subagent="software_engineer", task="...")` starts
180
+ a nested agent task;
181
+ - `list`, `output`, `wait` and `cancel` inspect or control the tasks.
182
+
183
+ Each task has an id (`bg-1`), a status, a log under the session folder
184
+ (`background/bg-1.log`), an output tail, and a cancellation path. Shell tasks are killed as a
185
+ process group; sub-agent tasks receive a cancellation event between steps. Background tasks are
186
+ session-local and do not survive a restart (the logs do).
187
+
188
+ Use `/background` to see the foreground activity and all tasks, or `/background bg-1` for one
189
+ task's output. Note that the main loop is synchronous, so `/background` can be typed between
190
+ steps; it shows the last/current blocking activity rather than live-during the call.
191
+
169
192
  ## In-session commands
170
193
 
171
194
  | Command | What it does |
@@ -177,6 +200,8 @@ to the model automatically when `--enable-subagents` is set. See
177
200
  | `/clear` | clear the screen (keeps the conversation history) |
178
201
  | `/plan` | show the current goal + plan (plan mode only) |
179
202
  | `/context` | show how the context window is used: tokens and percentages by category (system prompt, user/assistant messages, tool calls/outputs, reasoning, overhead) |
203
+ | `/background [id]` | show foreground activity + background tasks, or one task's output tail |
204
+ | `/expand [n]` | show the full detail of the nth most recent tool call (default: the last one) |
180
205
  | `/skip-plan <prompt>` | send `<prompt>` once without generating or reviewing a plan |
181
206
  | `/help` | show this help |
182
207
  | `/quit`, `/exit` | save the session and exit |
@@ -186,6 +211,28 @@ to the model automatically when `--enable-subagents` is set. See
186
211
  reminds you. Terminals that report `Shift+Enter` as a CSI-u/modifyOtherKeys
187
212
  sequence are recognised; elsewhere `Ctrl-J` inserts the newline.
188
213
 
214
+ With `--tui`, mini-code switches to a fixed alternate-screen dashboard: a
215
+ **Mini-Code** summary box (version/session/model/context) at the top, a core
216
+ conversation view of user/assistant turns in the middle, and an input box with
217
+ a one-line help hint at the bottom. The whole screen is redrawn on changes, so the view never
218
+ scrolls; tool/thinking status is a transient line that disappears when the
219
+ operation finishes. `Shift+↑`/`Shift+↓` scroll the middle pane one line at a
220
+ time and show `(lines scrolled / total)`; `Esc` returns to the bottom or closes
221
+ command output (`/help`, `/history`, ...). Info/warnings sit below a small
222
+ separator at the bottom of the body. The dashboard is coloured when the
223
+ terminal supports it; info/warnings/errors are shown as coloured
224
+ `ℹ`/`⚠`/`✖`/`✔` lines. Each assistant block also carries a dim line with
225
+ that turn's tool calls, background tasks and assistant-message count.
226
+ Questions (resume/permission) use a yellow "Question to User" box just above
227
+ the input. Restored sessions load their history into
228
+ the core view and mark the summary as `[restored]`; generated plans append to
229
+ the core view. Tool details can be expanded with `/expand [n]`.
230
+
231
+ The prompt has a small line editor: `↑`/`↓` recall previous turns, `←`/`→` move
232
+ the cursor, Home/End jump within the line, and `Ctrl-A/E/K/U/L` provide the
233
+ usual editing/clear shortcuts. `--tui` defaults to `auto` (known TTY only); use `--tui=off` for the old
234
+ scrolling console or `--tui=on` to force it. It is not part of `--all`.
235
+
189
236
  > [!NOTE]
190
237
  > `/history` and `/reset` are driven by `summary_history.json`, a flat recorder that maps every
191
238
  > turn to the `history_{n}.json` segment and message index it lives in — so no full history is
@@ -365,19 +412,24 @@ transcript and the segment left untouched.
365
412
  ### Exiting — the good-bye box
366
413
 
367
414
  Quitting (`/quit`, `exit`, or EOF on stdin) saves the session and then prints a short yellow
368
- box: the version, a sign-off, and what the session left behind — session id, folder, the
369
- history segments on disk, how many turns were recorded, and the token / call totals.
415
+ box: the version, a sign-off, and what the session left behind — session id, model, folder,
416
+ the history segments on disk, how many turns were recorded, run duration, token / call totals,
417
+ background tasks cancelled on exit, and a `--load-last-session` resume hint.
370
418
 
371
419
  ```
372
420
  ╔══════════ MiniCodeCLI v0.1.1.2 - goodbye ═════════════════════╗
373
421
  ║ Goodbye, and thanks for using MiniCodeCLI! ║
374
422
  ║ ║
375
423
  ║ session id : 1792666273983619-36ca3c2e ║
424
+ ║ model : ornith-ai/Ornith-1.5-35B-A3B ║
376
425
  ║ saved under : ~/.cache/mini/sessions/1792…-36ca3c2e/ ║
377
426
  ║ history : history_0.json (segment 0), 5 messages ║
378
427
  ║ conversation : 2 recorded turns ║
428
+ ║ duration : 12m 34s ║
379
429
  ║ tokens : 20 in / 10 out (30 total) ║
380
430
  ║ calls : 2 LLM, 0 tool ║
431
+ ║ background : none running ║
432
+ ║ resume : mini-code --load-last-session ║
381
433
  ╚═══════════════════════════════════════════════════════════════╝
382
434
  ```
383
435
 
@@ -410,7 +462,7 @@ If you use `mini-code-cli` in your research or writing, please cite it:
410
462
  author = {Rozanov, Nikolai},
411
463
  title = {mini-code-cli: A minimal, dependency-light coding agent},
412
464
  year = {2026},
413
- version = {0.1.1.4},
465
+ version = {0.2.0.0},
414
466
  howpublished = {\url{https://github.com/ai-nikolai/mini-code-cli}},
415
467
  note = {A no-bloat, dependency-light agent CLI for experimenting.}
416
468
  }