Implement shell completions for CLI (Workstream N-Completions)

Add `reviq completions bash/zsh` command with dynamic shell completions:

- Create bash-complete.ts entry point using stricli's proposeCompletions API
- Add completions command with bash and zsh support (fish planned)
- Extract app export to separate app.ts for shared imports
- Add @stricli/auto-complete dependency and __reviq_bash_complete bin entry

Also fix lint/type errors in api-server tests and helpers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
RevIQ
2026-01-09 17:11:10 +08:00
parent 2655c57b9e
commit c4b0509023
9 changed files with 151 additions and 13 deletions

View File

@@ -4,10 +4,11 @@
"private": true,
"type": "module",
"bin": {
"reviq": "./dist/index.js"
"reviq": "./dist/index.js",
"__reviq_bash_complete": "./dist/bash-complete.js"
},
"scripts": {
"build": "bun build src/bin/reviq.ts --outdir dist --target bun",
"build": "bun build src/bin/reviq.ts --outfile dist/index.js --target bun && bun build src/bin/bash-complete.ts --outfile dist/bash-complete.js --target bun",
"cli": "bun run src/bin/reviq.ts",
"typecheck": "tsc --noEmit",
"lint": "eslint . --cache",
@@ -15,6 +16,7 @@
},
"dependencies": {
"@stricli/core": "^1.2.5",
"@stricli/auto-complete": "^1.0.0",
"@reviq/db": "workspace:*",
"@noble/hashes": "^2.0.1"
},