@wrongstack/cli 0.3.3 → 0.3.4

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.
package/README.md CHANGED
@@ -1,114 +1,120 @@
1
- # @wrongstack/cli
2
-
3
- The terminal binary for WrongStack. Provides the `wstack` and `wrongstack` commands.
4
-
5
- Most users don't depend on this package directly — they install [`wrongstack`](../../README.md) (the umbrella) and run `wrongstack` / `wstack` from any project directory.
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm install -g wrongstack
11
- ```
12
-
13
- The `wrongstack` umbrella package transitively installs `@wrongstack/cli` along with `core`, `providers`, `tools`, `mcp`, and `tui`.
14
-
15
- ## Commands
16
-
17
- ```bash
18
- wstack # interactive REPL — no flags = default
19
- wstack --tui # Ink-based TUI
20
- wstack --yolo # auto-approve every tool call
21
- wstack "refactor src/auth.ts" # one-shot query (no interactive loop)
22
-
23
- wstack --provider <id> --model <id> # skip the picker
24
- wstack --resume <session-id> # resume a saved session
25
- wstack resume <session-id> # equivalent
26
-
27
- wstack init # interactive provider+model wizard
28
- wstack doctor # config/key/MCP/Node health check
29
- wstack export <session-id> # render a session as markdown/JSON/plain text
30
- wstack mcp add <preset> # add an MCP server (see @wrongstack/mcp)
31
- wstack mcp list # show configured MCP servers
32
- ```
33
-
34
- `--no-tui` forces REPL mode even when `--tui` is configured globally. The TUI uses Ink's alt-screen buffer by default so it can capture every keystroke (Ctrl+S/Q/Z/\\ included) and avoid live-region leaks into scrollback; pass `--no-alt-screen` if you specifically want completed chat to survive after exit.
35
-
36
- ## Slash commands inside the REPL/TUI
37
-
38
- ```
39
- /help # list of commands
40
- /help <name> # detailed help for one command
41
- /clear # wipe context + memory + visible history
42
- /model # change model mid-session
43
- /use <provider> # switch provider
44
- /mode <id> # activate a mode (debugger, code-reviewer, …)
45
- /memory # show/edit project memory
46
- /skill [name] # list skills / show a specific skill
47
- /context # show token usage breakdown; /context mode, /context repair
48
- /sessions # list past sessions
49
- /resume <id> # resume a session
50
- /todos [show|add|done|clear] # tactical task board (auto-checkpointed)
51
- /plan [show|add|start|done|remove|clear] # strategic roadmap (persistent across resume)
52
- /director # promote the current session into multi-agent director mode
53
- /fleet status|usage|kill|manifest|retry [taskId|all]|log [<id> [raw]] # inspect/control + retry + view subagent transcripts
54
- /exit # quit
55
- ```
56
-
57
- ## Configuration
58
-
59
- ```
60
- ~/.wrongstack/config.json global config (provider, model defaults, features)
61
- ~/.wrongstack/.key AES-256-GCM secret-vault key (mode 0600)
62
- ~/.wrongstack/memory.md user-global memory
63
- ~/.wrongstack/skills/ user-global skills
64
- ~/.wrongstack/projects/<hash>/ per-project state
65
- memory.md project memory (auto-gitignored)
66
- sessions/ per-session artifacts
67
- <id>.jsonl append-only event log (messages, tool calls, task_* events)
68
- <id>.summary.json fast-path manifest read by /sessions
69
- <id>.todos.json ctx.todos checkpoint (atomic-written on every mutation)
70
- <id>.plan.json /plan strategic roadmap (atomic-written on every mutation)
71
- <id>/ multi-agent (director mode) fleet workspace
72
- fleet.json director manifest (debounced ~2s; final on shutdown)
73
- director-state.json live task graph: pending/running/completed + spawn roster
74
- shared/ cross-subagent scratchpad (markdown findings)
75
- subagents/<runId>/<subagentId>.jsonl per-subagent transcripts
76
- attachments/ spooled images/files for the session
77
- trust.json per-project tool/permission trust
78
- .wrongstack/AGENTS.md committable project memory
79
- .wrongstack/skills/ committable project skills
80
- ```
81
-
82
- **Resume semantics.** `wstack --resume <id>` replays the messages JSONL into the agent context, reloads `<id>.todos.json` if present, and surfaces a banner summarizing any prior plan items and unfinished fleet tasks. Per-subagent transcripts under `subagents/` survive crashes — combine with the `director-state.json` checkpoint to inspect what each worker was doing when the run was interrupted.
83
-
84
- API keys are encrypted at rest with AES-256-GCM and the key file at `~/.wrongstack/.key`. The vault auto-bootstraps on first run; the key never leaves the machine.
85
-
86
- ## Flags
87
-
88
- | Flag | Effect |
89
- |------|--------|
90
- | `--tui` / `--no-tui` | Force/disable Ink TUI |
91
- | `--yolo` | Auto-approve every tool call (use with care) |
92
- | `--provider <id>` | Override the configured provider |
93
- | `--model <id>` | Override the configured model |
94
- | `--resume <id>` | Resume a saved session by id |
95
- | `--no-alt-screen` | Render TUI inline in scrollback (default is alt-screen so all shortcuts are captured). |
96
- | `--config <path>` | Use a non-default config file |
97
- | `--debug` | Verbose logging to `~/.wrongstack/logs/wrongstack.log` |
98
- | `--version` | Print version |
99
- | `--help` | Print help |
100
-
101
- ## Environment variables
102
-
103
- | Variable | Purpose |
104
- |----------|---------|
105
- | `WRONGSTACK_BASH_ENV_PASSTHROUGH=1` | Disable the bash-tool env allowlist (legacy unsafe mode — see [SECURITY.md](../../SECURITY.md)) |
106
- | `WRONGSTACK_CONFIG_DIR` | Override `~/.wrongstack` location |
107
- | `WRONGSTACK_DEBUG=1` | Same as `--debug` |
108
- | `NO_COLOR=1` | Disable ANSI colors |
109
-
110
- Provider API keys can be set via env (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, …) or stored encrypted via `wstack` first-run wizard.
111
-
112
- ## License
113
-
114
- MIT
1
+ # @wrongstack/cli
2
+
3
+ The terminal binary for WrongStack. Provides the `wstack` and `wrongstack` commands.
4
+
5
+ Most users don't depend on this package directly — they install [`wrongstack`](../../README.md) (the umbrella) and run `wrongstack` / `wstack` from any project directory.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g wrongstack
11
+ ```
12
+
13
+ The `wrongstack` umbrella package transitively installs `@wrongstack/cli` along with `core`, `runtime`, `providers`, `tools`, `mcp`, `plug-lsp`, `telegram`, `tui`, and `webui`.
14
+
15
+ ## Commands
16
+
17
+ ```bash
18
+ wstack # interactive REPL — no flags = default
19
+ wstack --tui # Ink-based TUI
20
+ wstack --yolo # auto-approve every tool call
21
+ wstack "refactor src/auth.ts" # one-shot query (no interactive loop)
22
+
23
+ wstack --provider <id> --model <id> # skip the picker
24
+ wstack --resume <session-id> # resume a saved session
25
+ wstack resume <session-id> # equivalent
26
+
27
+ wstack init # interactive provider+model wizard
28
+ wstack doctor # config/key/MCP/Node health check
29
+ wstack export <session-id> # render a session as markdown/JSON/plain text
30
+ wstack mcp add <preset> # add an MCP server (see @wrongstack/mcp)
31
+ wstack mcp list # show configured MCP servers
32
+ wstack plugin status # show configured plugin enablement
33
+ wstack plugin official # list bundled plugin aliases
34
+ wstack plugin install telegram # add the official bundled Telegram plugin
35
+ wstack plugin add @wrongstack/telegram # enable a plugin
36
+ wstack plugin disable @wrongstack/telegram # keep config but skip loading
37
+ wstack plugin remove @wrongstack/telegram # remove from config.plugins
38
+ ```
39
+
40
+ `--no-tui` forces REPL mode even when `--tui` is configured globally. The TUI uses Ink's alt-screen buffer by default so it can capture every keystroke (Ctrl+S/Q/Z/\\ included) and avoid live-region leaks into scrollback; pass `--no-alt-screen` if you specifically want completed chat to survive after exit.
41
+
42
+ ## Slash commands inside the REPL/TUI
43
+
44
+ ```
45
+ /help # list of commands
46
+ /help <name> # detailed help for one command
47
+ /clear # wipe context + memory + visible history
48
+ /model # change model mid-session
49
+ /use <provider> # switch provider
50
+ /mode <id> # activate a mode (debugger, code-reviewer, …)
51
+ /memory # show/edit project memory
52
+ /skill [name] # list skills / show a specific skill
53
+ /context # show token usage breakdown; /context mode, /context repair
54
+ /sessions # list past sessions
55
+ /resume <id> # resume a session
56
+ /todos [show|add|done|clear] # tactical task board (auto-checkpointed)
57
+ /plan [show|add|start|done|remove|clear] # strategic roadmap (persistent across resume)
58
+ /director # promote the current session into multi-agent director mode
59
+ /fleet status|usage|kill|manifest|retry [taskId|all]|log [<id> [raw]] # inspect/control + retry + view subagent transcripts
60
+ /exit # quit
61
+ ```
62
+
63
+ ## Configuration
64
+
65
+ ```
66
+ ~/.wrongstack/config.json global config (provider, model defaults, features)
67
+ ~/.wrongstack/.key AES-256-GCM secret-vault key (mode 0600)
68
+ ~/.wrongstack/memory.md user-global memory
69
+ ~/.wrongstack/skills/ user-global skills
70
+ ~/.wrongstack/projects/<hash>/ per-project state
71
+ memory.md project memory (auto-gitignored)
72
+ sessions/ per-session artifacts
73
+ <id>.jsonl append-only event log (messages, tool calls, task_* events)
74
+ <id>.summary.json fast-path manifest read by /sessions
75
+ <id>.todos.json ctx.todos checkpoint (atomic-written on every mutation)
76
+ <id>.plan.json /plan strategic roadmap (atomic-written on every mutation)
77
+ <id>/ multi-agent (director mode) fleet workspace
78
+ fleet.json director manifest (debounced ~2s; final on shutdown)
79
+ director-state.json live task graph: pending/running/completed + spawn roster
80
+ shared/ cross-subagent scratchpad (markdown findings)
81
+ subagents/<runId>/<subagentId>.jsonl per-subagent transcripts
82
+ attachments/ spooled images/files for the session
83
+ trust.json per-project tool/permission trust
84
+ .wrongstack/AGENTS.md committable project memory
85
+ .wrongstack/skills/ committable project skills
86
+ ```
87
+
88
+ **Resume semantics.** `wstack --resume <id>` replays the messages JSONL into the agent context, reloads `<id>.todos.json` if present, and surfaces a banner summarizing any prior plan items and unfinished fleet tasks. Per-subagent transcripts under `subagents/` survive crashes — combine with the `director-state.json` checkpoint to inspect what each worker was doing when the run was interrupted.
89
+
90
+ API keys are encrypted at rest with AES-256-GCM and the key file at `~/.wrongstack/.key`. The vault auto-bootstraps on first run; the key never leaves the machine.
91
+
92
+ ## Flags
93
+
94
+ | Flag | Effect |
95
+ |------|--------|
96
+ | `--tui` / `--no-tui` | Force/disable Ink TUI |
97
+ | `--yolo` | Auto-approve every tool call (use with care) |
98
+ | `--provider <id>` | Override the configured provider |
99
+ | `--model <id>` | Override the configured model |
100
+ | `--resume <id>` | Resume a saved session by id |
101
+ | `--no-alt-screen` | Render TUI inline in scrollback (default is alt-screen so all shortcuts are captured). |
102
+ | `--config <path>` | Use a non-default config file |
103
+ | `--debug` | Verbose logging to `~/.wrongstack/logs/wrongstack.log` |
104
+ | `--version` | Print version |
105
+ | `--help` | Print help |
106
+
107
+ ## Environment variables
108
+
109
+ | Variable | Purpose |
110
+ |----------|---------|
111
+ | `WRONGSTACK_BASH_ENV_PASSTHROUGH=1` | Disable the bash-tool env allowlist (legacy unsafe mode — see [SECURITY.md](../../SECURITY.md)) |
112
+ | `WRONGSTACK_CONFIG_DIR` | Override `~/.wrongstack` location |
113
+ | `WRONGSTACK_DEBUG=1` | Same as `--debug` |
114
+ | `NO_COLOR=1` | Disable ANSI colors |
115
+
116
+ Provider API keys can be set via env (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, …) or stored encrypted via `wstack` first-run wizard.
117
+
118
+ ## License
119
+
120
+ MIT