monkeyscode-cli 1.1.9 → 1.1.11

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
@@ -18,7 +18,7 @@ curl -fsSL https://monkeyscode.com/cli/install.sh | bash
18
18
  # Windows (PowerShell)
19
19
  irm https://monkeyscode.com/cli/install.ps1 | iex
20
20
 
21
- # npm (Node 18+)
21
+ # npm (Node 20+)
22
22
  npm install -g monkeyscode-cli
23
23
  ```
24
24
 
@@ -28,6 +28,46 @@ install script) as aliases. A Homebrew formula template lives in
28
28
 
29
29
  ## Usage
30
30
 
31
+ ### Core Skills onboarding
32
+
33
+ ```bash
34
+ mc plugin core-skills # stage MonkeysCode/core-skills from the signed catalog
35
+ mc plugin bootstrap # alias for core-skills
36
+ mc plugin enable core-skills # review capabilities, confirm version trust, then enable
37
+ mc plugin core-skills --enable # explicitly combine installation and normal enable review
38
+ ```
39
+
40
+ Installation alone displays the capability report but does not enable skills or
41
+ change existing profiles. `--enable`, `--scope user|project` and `--yes` use the
42
+ existing plugin trust policy; `--yes` never bypasses managed approval. This is
43
+ the same native pipeline as `mc plugin install MonkeysCode/core-skills`, for
44
+ catalog-managed updates, not another injection of shared legacy app content.
45
+ The packaged 24-definition library is declarative application content, not a
46
+ signed plugin or a trust root. Catalog/API unavailability or verification failure
47
+ fails closed: no unsigned local, packaged or git fallback. No automatic onboarding
48
+ runs at CLI startup.
49
+
50
+ ### Public plugin discovery
51
+
52
+ ```bash
53
+ mc plugin search [query] [--category <category>] [--app <app>] [--json]
54
+ mc plugin info <author/name>
55
+ mc plugin outdated [--json]
56
+ mc plugin update <name>
57
+ mc plugin update --all
58
+ # Interactive: /plugins browse [query] [--category <category>] [--app <app>]
59
+ ```
60
+
61
+ Discovery uses https://marketplace.monkeyscode.com by default; set
62
+ `MONKEYSCODE_CATALOG_ORIGIN` to another public HTTPS origin, or to an empty
63
+ value to turn discovery off.
64
+ It sends no account credentials. Metadata is not package trust. Signing pins
65
+ are provisioned independently with `MONKEYSCODE_PLUGIN_SIGNING_KEYS`; never
66
+ accept keys learned from discovery as trust roots. Bulk updates do not treat
67
+ `--yes` as approval for expanded capabilities; each expansion needs review.
68
+ Managed-policy pending trust must be resolved before enabling.
69
+
70
+
31
71
  ```bash
32
72
  # Interactive REPL (optionally with a first prompt)
33
73
  mc
@@ -193,6 +233,49 @@ mc team status
193
233
  mc team merge team-abc123
194
234
  ```
195
235
 
236
+ ## Command-line Command Families
237
+
238
+ These are the root registrations in `src/main.ts` (slash commands are a
239
+ separate REPL interface). Run `mc --help`, `mc <family> --help`, and then
240
+ `mc <family> <subcommand> --help` for exact arguments and nested flags.
241
+
242
+ | Root command/family | Purpose |
243
+ |---------------------|---------|
244
+ | `mc auth` | Login, logout, token, status and refresh |
245
+ | `mc status` | Account and agent status |
246
+ | `mc doctor`, `mc setup` | Health checks and setup wizard |
247
+ | `mc update`, `mc telemetry [action]`, `mc bug [description]` | Updates, telemetry and bug reports |
248
+ | `mc config` | Layered settings, origins and migration |
249
+ | `mc index [path]`, `mc context` | Workspace indexing and semantic retrieval |
250
+ | `mc mcp` | Server configuration, approval, OAuth, browsing and serving tools |
251
+ | `mc import <from>`, `mc plugin` | Import other tools' setups and manage plugins |
252
+ | `mc agents`, `mc team`, `mc worktrees` | Agent dashboard, parallel teams and worktree lifecycle |
253
+ | `mc triggers`, `mc schedule` | Event-driven triggers and scheduled runs |
254
+ | `mc completions <shell>` | Shell completion scripts |
255
+ | `mc sessions` | List, inspect, export, fork, delete and prune saved conversations |
256
+ | `mc jobs` | Background job status, logs, cancellation, retry, diff and pull |
257
+ | `mc cloud` | Persistent remote workspaces (distinct from one-shot jobs) |
258
+ | `mc messages`, `mc join <sessionId>`, `mc share` | Cross-session messages and live collaboration |
259
+ | `mc hooks`, `mc trust` | Lifecycle hooks and execution trust records |
260
+ | `mc models`, `mc usage` | Model catalog/pricing and account or session usage |
261
+ | `mc init`, `mc memory`, `mc rules`, `mc dream` | Project conventions and memory consolidation |
262
+ | `mc review`, `mc bugfind [target]` | Code review and bug scanning |
263
+ | `mc trace`, `mc benchmark` | Execution traces and benchmarks |
264
+ | `mc marketplace`, `mc design` | Skill marketplace and local design artboard |
265
+ | `mc ci` (hidden integration family) | GitHub Actions protocol helpers; used by the action |
266
+
267
+ Root flags also include `--json-schema <file>`, `--append-system-prompt <text>`,
268
+ `--system-prompt-file <file>`, `--settings <fileOrJson>`,
269
+ `--ignore-repo-settings`, `--mcp-config <files...>`, `--strict-mcp-config`,
270
+ `--add-dir <dirs...>` and the resume/fork and stdio permission flags described
271
+ below. MCP config files passed explicitly are trusted for that run;
272
+ `--strict-mcp-config` requires at least one such file. See `mc --help` and
273
+ [headless](../../docs/cli/headless.md),
274
+ [permissions](../../docs/cli/permissions.md) and
275
+ [extensibility](../../docs/cli/extensibility.md) for constraints. Nested commands
276
+ have their own options: for example, `mc sessions export --help` and
277
+ `mc mcp serve --help` describe different output/permission flags than the root.
278
+
196
279
  ## Output Formats
197
280
 
198
281
  | Format | Use Case |
@@ -221,9 +304,20 @@ mc --effort high "find the race condition" # low | medium | high
221
304
 
222
305
  In a session: Shift+Tab cycles `default` → `acceptEdits` → `plan`, `/plan` jumps to plan mode, `/effort high` changes
223
306
  effort from the next request, and `/permissions` lists every effective rule
224
- and the file it came from. Headless runs never prompt. A call that would
225
- prompt is denied and reported in `permissionDenials`. If *only* denials
226
- happened, the exit code is **6**.
307
+ and the file it came from. Print/headless runs are non-interactive: they do
308
+ not open TTY approval dialogs. By default, calls that would ask are denied
309
+ and reported in `permissionDenials`. The explicit exception is
310
+ `mc -p --permission-prompt stdio -o stream-json --input-format stream-json`: a
311
+ protocol client sends user messages on stdin and answers `control_request`
312
+ permission messages with `control_response` messages (not terminal input).
313
+ See the [headless protocol](../../docs/cli/headless.md) for message shapes and timeouts.
314
+ If *only* denials happened, the exit code is **6**.
315
+
316
+ `--auto-approve`, bypass mode and background delegation are not blanket trust:
317
+ explicit deny rules, protected/guarded operations and destructive-command
318
+ checks still apply; these cannot be silently auto-approved. Prefer narrow
319
+ allow rules for CI. Plugins and MCP tools remain subject to trust and
320
+ permission checks, including when invoked by custom commands.
227
321
 
228
322
  The rule syntax, evaluation order and shell-command handling are in
229
323
  [docs/cli/permissions.md](../../docs/cli/permissions.md).
@@ -257,24 +351,168 @@ mc completions pwsh >> $PROFILE
257
351
 
258
352
  ## Slash Commands (REPL)
259
353
 
260
- | Command | Description |
261
- |---------|-------------|
262
- | `/help` | Show all commands |
263
- | `/clear` | Start a fresh conversation (the old one stays resumable); Ctrl+L only clears the screen |
264
- | `/model <name>` | Switch model |
265
- | `/plan` | Switch to plan (read-only) mode; Shift+Tab to cycle back |
266
- | `/effort [low\|medium\|high]` | Show or set reasoning effort |
267
- | `/permissions` | Show rules and their sources; `allow`/`deny`/`ask`/`remove` |
268
- | `/status` | Model, mode, effort, context and cost at a glance |
269
- | `/compact ["focus"]` | Summarise the conversation to free context |
270
- | `/diff` | Show session changes |
271
- | `/undo` | Revert the last turn's file changes |
272
- | `/commit [msg]` | Commit changes |
273
- | `/files` | List touched files |
274
- | `/cost [all]` | Session cost totals plus a per-turn breakdown |
275
- | `/vim` | Toggle Vim keybindings |
276
- | `/cloud` | Hand off to cloud |
277
- | `/context [file]` | Show context usage, or add a file to it |
354
+ The 54 visible built-ins below follow the default registry and its full
355
+ `usageOf(c)` strings. `/help` and the palette reflect the live registry.
356
+
357
+ <!-- BEGIN SLASH COMMANDS -->
358
+ ### Session
359
+
360
+ | Command | Usage | Description |
361
+ |---------|-------|-------------|
362
+ | `/exit` | `/exit` | Exit the REPL |
363
+ | `/clear` | `/clear` | Start a fresh conversation; the old one stays resumable (Ctrl+L only clears the screen) |
364
+ | `/sessions` | `/sessions` | List saved sessions |
365
+ | `/resume` | `/resume [id]` | Resume a saved session |
366
+ | `/vim` | `/vim` | Toggle Vim keybindings in the composer |
367
+ | `/logout` | `/logout` | Sign out and exit |
368
+ | `/copy` | `/copy [n]` | Copy the last reply (or the n-th last) |
369
+ | `/export` | `/export [file]` | Save the conversation as Markdown |
370
+ | `/rewind` | `/rewind` | Roll back conversation and files to an earlier prompt (Esc Esc) |
371
+
372
+ ### Model & Mode
373
+
374
+ | Command | Usage | Description |
375
+ |---------|-------|-------------|
376
+ | `/model` | `/model [id]` | Show or switch the model |
377
+ | `/mode` | `/mode <plan\|fast\|thinking>` | Switch legacy mode; prefer effort for fast/thinking |
378
+ | `/plan` | `/plan` | Research and propose without edits |
379
+ | `/ask` | `/ask` | Read-only Q&A about the codebase |
380
+ | `/effort` | `/effort [low\|medium\|high\|default]` | Show or set reasoning effort |
381
+ | `/output-style` | `/output-style [name] [--save]` | Show or switch output style |
382
+
383
+ ### Context & Stats
384
+
385
+ | Command | Usage | Description |
386
+ |---------|-------|-------------|
387
+ | `/cost` | `/cost [all]` | Session token usage and cost, per turn |
388
+ | `/context` | `/context [file]` | Show context usage or add a file |
389
+ | `/compact` | `/compact ["focus"]` | Compact the conversation to free context |
390
+ | `/status` | `/status` | Model, permissions, effort, MCP and usage |
391
+
392
+ ### Git & Files
393
+
394
+ | Command | Usage | Description |
395
+ |---------|-------|-------------|
396
+ | `/files` | `/files` | List files read and modified this session |
397
+ | `/diff` | `/diff [session\|staged] [--plain]` | Open Diff; --plain prints git diff |
398
+ | `/undo` | `/undo [--force]` | Revert the last turn's file changes; keep conversation |
399
+ | `/redo` | `/redo [--force]` | Re-apply changes reverted by undo |
400
+ | `/commit` | `/commit [message]` | Stage everything and commit |
401
+ | `/review` | `/review [staged\|session\|<path>] [--chat]` | Open Code Review or review in chat |
402
+
403
+ ### Agents & Delegation
404
+
405
+ | Command | Usage | Description |
406
+ |---------|-------|-------------|
407
+ | `/agents` | `/agents [create <name> ["purpose"] \| edit <name> \| run <name> <task>]` | List, create, edit or run custom subagents |
408
+ | `/goal` | `/goal "target" \| /goal status \| /goal cancel` | Autonomous plan → execute → verify loop |
409
+ | `/loop` | `/loop [iterations] "command"` | Iterate until a command passes |
410
+ | `/subtask` | `/subtask "task" \| /subtask status \| /subtask cancel <id>` | Spawn or manage isolated background subtasks |
411
+ | `/fork` | `/fork "task"` | Isolated background task; no conversation inherited |
412
+ | `/delegate` | `/delegate "task 1" "task 2" [...]` | Parallel agents and merged results |
413
+ | `/search` | `/search "query"` | Web search via the agent |
414
+ | `/docs` | `/docs <topic>` | Look up documentation |
415
+
416
+ ### Skills, Hooks & Permissions
417
+
418
+ | Command | Usage | Description |
419
+ |---------|-------|-------------|
420
+ | `/permissions` | `/permissions [show \| allow\|deny\|ask <rule> [--project] \| remove <rule> \| edit]` | Effective rules and origins; add or remove rules |
421
+ | `/add-dir` | `/add-dir <path> [--save]` | Allow another directory this session |
422
+ | `/skill` | `/skill [create <name>]` | List or create skills |
423
+ | `/hooks` | `/hooks [create <name>]` | List or create hooks |
424
+ | `/trust` | `/trust [revoke]` | Review and trust workspace hooks/status line |
425
+ | `/setup` | `/setup [step]` | Setup wizard |
426
+ | `/terminal-setup` | `/terminal-setup` | Configure Shift+Enter and Option-as-Meta |
427
+ | `/shells` | `/shells [id \| kill <id\|all>]` | List, inspect or stop background shells |
428
+ | `/mcp` | `/mcp [tools\|approve\|reconnect\|disable\|enable] [server]` | Inspect/control session MCP servers |
429
+ | `/plugins` | `/plugins [list \| browse [query] \| install <author>/<name>[@version] [--enable] \| info <name> \| enable <name> \| disable <name> \| update <name> \| rollback <name> \| remove <name> \| reload]` | Find, install, review, enable, update and remove plugins without leaving the session. `enable` on a new plugin shows its capabilities and asks before trusting it; `disable` is session-only |
430
+
431
+ ### Project & Memory
432
+
433
+ | Command | Usage | Description |
434
+ |---------|-------|-------------|
435
+ | `/init` | `/init` | Initialize rules, permissions, skills and hooks |
436
+ | `/memory` | `/memory [show\|add [--user] "rule"\|edit [project\|user\|local]]` | Show memory, add rules or edit a memory file |
437
+
438
+ ### Cloud & Messaging
439
+
440
+ | Command | Usage | Description |
441
+ |---------|-------|-------------|
442
+ | `/cloud` | `/cloud` | Hand current task off to a hosted cloud job |
443
+ | `/message` | `/message <session-id> "text"` | Message another session |
444
+ | `/broadcast` | `/broadcast "text"` | Message all active sessions |
445
+
446
+ ### Info & Help
447
+
448
+ | Command | Usage | Description |
449
+ |---------|-------|-------------|
450
+ | `/bug` | `/bug` | Diagnostic context for a bug report |
451
+ | `/doctor` | `/doctor` | System health check |
452
+ | `/config` | `/config [key [value]]` | Show/change user settings |
453
+ | `/update` | `/update [check]` | Check for or install updates |
454
+ | `/help` | `/help` | Show live help |
455
+
456
+ ### Custom (project, user, plugins, MCP)
457
+
458
+ | Command | Usage | Description |
459
+ |---------|-------|-------------|
460
+ | `/commands` | `/commands [reload]` | List and reload custom commands |
461
+
462
+ **Aliases** — each row maps every registered alias to its canonical command
463
+ (name without the leading slash). Aliases accept the same arguments and are
464
+ not additional built-ins.
465
+
466
+ | Canonical name | Aliases |
467
+ |----------------|---------|
468
+ | `exit` | `/quit`, `/q` |
469
+ | `clear` | `/cls`, `/new` |
470
+ | `resume` | `/continue` |
471
+ | `model` | `/models` |
472
+ | `output-style` | `/style` |
473
+ | `context` | `/ctx` |
474
+ | `subtask` | `/sub` |
475
+ | `delegate` | `/del` |
476
+ | `permissions` | `/allowed-tools` |
477
+ | `skill` | `/skills` |
478
+ | `hooks` | `/hook` |
479
+ | `shells` | `/bashes`, `/bg` |
480
+ | `plugins` | `/plugin` (legacy alias until the next release) |
481
+ | `bug` | `/feedback` |
482
+ | `config` | `/settings` |
483
+ | `update` | `/upgrade` |
484
+ | `help` | `/h`, `/?` |
485
+ <!-- END SLASH COMMANDS -->
486
+
487
+ Aliases (for example `/h`, `/quit`, `/ctx`, `/models`, `/skills`, `/plugin`)
488
+ resolve to their primary commands, not additional built-ins. Project/user
489
+ Markdown commands, enabled plugins and connected MCP prompts can add dynamic
490
+ entries; `/help` shows their sources and name conflicts (built-ins win).
491
+ Use `/commands reload` after editing command files and `/plugins reload` to
492
+ refresh extensions. Custom command shell expansions and their tool scopes
493
+ remain permission-gated; enabling a plugin does not bypass MCP trust or tool rules.
494
+
495
+ `/plugins` defaults to `list`; `browse` searches the configured public catalog
496
+ (default app: `cli`; `--app` accepts `ide`, `agent` or `cli`).
497
+ `info <name>` shows capabilities and version trust,
498
+ and `reload` refreshes extensions. `enable <name>` and `disable <name>` change
499
+ only the current session, never persistent settings or trust. Install and review
500
+ version-pinned trust explicitly with `mc plugin install` and `mc plugin enable`;
501
+ no slash command automatically grants trust. `/plugin` is the legacy Markdown
502
+ command alias until the next release; migrate examples to `/plugins`.
503
+
504
+ Local authoring commands are `mc plugin init [dir]`, `mc plugin validate [dir]`
505
+ and `mc plugin migrate-skills <from> <to>` (copies skills without changing
506
+ originals or granting trust). `mc plugin remove <name>` also accepts
507
+ `mc plugin uninstall <name>`. Catalog discovery uses https://marketplace.monkeyscode.com unless
508
+ `MONKEYSCODE_CATALOG_ORIGIN` overrides it; an empty value reports
509
+ unavailability rather than sending a remote request. Plugin publishing remains unavailable until Phase 6.
510
+
511
+ **Two different kinds of fork:** `/fork "task"` starts an isolated background
512
+ task without inheriting conversation history. `mc sessions fork <id>` copies
513
+ a saved conversation to a new id. `mc -r <id> --fork-session` (or
514
+ `mc -c --fork-session`) resumes history in a new session, leaving the original
515
+ untouched; it is not a background task.
278
516
 
279
517
  Type `/` to open the commands menu: it filters as you type and shows 5 rows
280
518
  at a time (↑↓ move, PgUp/PgDn jump, Tab completes, Enter runs the
@@ -292,11 +530,13 @@ and context size, and Enter switches to the highlighted one.
292
530
  | Ctrl+] | Next tab (works in every terminal) |
293
531
 
294
532
  The ⌥ keys work with your terminal's default settings (Terminal.app, iTerm2,
295
- VS Code, kitty, WezTerm, Ghostty, Windows Terminal). On Diff and Code Review
296
- you can also click a tab and scroll with the wheel; hold Shift (⌥ in iTerm2
297
- and Terminal.app) while dragging to select text there. Set `mouse` to `all`
298
- to click the Chat footer as well (the wheel then stops scrolling the chat
299
- history), or to `off` to turn the mouse off.
533
+ VS Code, kitty, WezTerm, Ghostty, Windows Terminal). You can click a tab and
534
+ scroll with the wheel in every tab: the wheel scrolls whichever pane is under
535
+ the pointer (chat history, the Changes column, Diff, Code Review). Hold Shift
536
+ (⌥ in iTerm2 and Terminal.app) while dragging to select text, or use `/copy`
537
+ for the last answer. Set `mouse` to `tabs` to keep the mouse to Diff / Code
538
+ Review (plain drag selects in Chat, but the wheel no longer scrolls it), or to
539
+ `off` to turn the mouse off.
300
540
 
301
541
  **In-app chat scrolling:** The chat viewport is internally scrollable — the
302
542
  composer and status line stay fixed while you navigate history. Use the mouse
@@ -304,6 +544,11 @@ wheel, PageUp/PageDown, or Ctrl+G to jump to the latest. Scrolling anchors
304
544
  survive streaming, tab switches, and terminal resizes. A "new output"
305
545
  indicator appears when you're scrolled up during a run.
306
546
 
547
+ **Changes column:** on terminals 120 columns or wider, the chat shows the
548
+ session's changed files and their diffs on the right. Ctrl+F focuses it (←/→
549
+ file, ↑/↓ or the wheel to scroll), Ctrl+Y hides or shows it, and
550
+ `changesPane: false` starts without it. `/diff` opens the full Diff tab.
551
+
307
552
  **Multi-line input:** Press **Shift+Enter** for a newline (or **Alt+Enter**,
308
553
  or end a line with `\`). Enter sends the message. Run `mc setup` to configure
309
554
  your terminal for distinguishable Shift+Enter if it isn't already.