wispy-cli 2.7.19 → 2.7.20

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 (2) hide show
  1. package/bin/wispy.mjs +50 -0
  2. package/package.json +1 -1
package/bin/wispy.mjs CHANGED
@@ -1377,6 +1377,56 @@ if (command === "server") {
1377
1377
  // ── Default: launch REPL ──────────────────────────────────────────────────────
1378
1378
  // For no args, one-shot messages, or unrecognized commands that the REPL handles
1379
1379
 
1380
+ // ── Shell Completion ──────────────────────────────────────────────────────────
1381
+
1382
+ if (command === "completion") {
1383
+ const shell = args[1] ?? "zsh";
1384
+ const cmds = [
1385
+ "setup", "config", "doctor", "model", "trust", "ws", "skill", "teach",
1386
+ "improve", "where", "handoff", "server", "tui", "overview", "sessions",
1387
+ "resume", "fork", "review", "agents", "cost", "features", "secrets",
1388
+ "tts", "browser", "auth", "exec", "completion",
1389
+ ];
1390
+ const flags = [
1391
+ "--help", "--version", "-w", "--workstream", "-p", "--profile",
1392
+ "-i", "--image", "--name", "--model", "--provider", "--personality",
1393
+ "--agent", "--effort", "--system-prompt", "--append-system-prompt",
1394
+ "--max-budget-usd", "--allowedTools", "--disallowedTools", "--json",
1395
+ ];
1396
+
1397
+ if (shell === "zsh") {
1398
+ console.log(`#compdef wispy
1399
+ _wispy() {
1400
+ local -a commands flags
1401
+ commands=(${cmds.map(c => `'${c}'`).join(" ")})
1402
+ flags=(${flags.map(f => `'${f}'`).join(" ")})
1403
+ if (( CURRENT == 2 )); then
1404
+ _describe 'command' commands
1405
+ _describe 'flag' flags
1406
+ else
1407
+ _files
1408
+ fi
1409
+ }
1410
+ _wispy "$@"`);
1411
+ } else if (shell === "bash") {
1412
+ console.log(`_wispy_completions() {
1413
+ local cur="\${COMP_WORDS[COMP_CWORD]}"
1414
+ local commands="${cmds.join(" ")}"
1415
+ local flags="${flags.join(" ")}"
1416
+ COMPREPLY=( $(compgen -W "$commands $flags" -- "$cur") )
1417
+ }
1418
+ complete -F _wispy_completions wispy`);
1419
+ } else if (shell === "fish") {
1420
+ for (const c of cmds) {
1421
+ console.log(`complete -c wispy -n '__fish_use_subcommand' -a '${c}'`);
1422
+ }
1423
+ } else {
1424
+ console.error(`Unknown shell: ${shell}. Supported: zsh, bash, fish`);
1425
+ process.exit(1);
1426
+ }
1427
+ process.exit(0);
1428
+ }
1429
+
1380
1430
  if (command === "server" || command === "overview") {
1381
1431
  // Already set up env flags above, fall through to REPL
1382
1432
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wispy-cli",
3
- "version": "2.7.19",
3
+ "version": "2.7.20",
4
4
  "description": "🌿 Wispy — AI workspace assistant with trustworthy execution (harness, receipts, approvals, diffs)",
5
5
  "license": "MIT",
6
6
  "author": "Minseo & Poropo",