zinkee 0.1.10 → 0.1.12
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/.claude/settings.local.json +29 -1
- package/AGENTS.md +1 -0
- package/README.md +12 -0
- package/dist/index.js +748 -30
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/cli-examples.ts +18 -36
- package/src/cli-runner.ts +28 -2
- package/src/completion/engine.test.ts +138 -0
- package/src/completion/engine.ts +168 -0
- package/src/completion/install.test.ts +179 -0
- package/src/completion/install.ts +260 -0
- package/src/completion/runtime.ts +150 -0
- package/src/completion/scripts.ts +91 -0
- package/src/index.test.ts +52 -0
- package/src/program.ts +3 -1
- package/src/utils/argv-rewrite.test.ts +149 -0
- package/src/utils/argv-rewrite.ts +269 -0
|
@@ -10,7 +10,35 @@
|
|
|
10
10
|
"Read(//home/guillermo/dev/z2-backend/**)",
|
|
11
11
|
"Bash(grep *)",
|
|
12
12
|
"Bash(npx vitest *)",
|
|
13
|
-
"Bash(npx tsx *)"
|
|
13
|
+
"Bash(npx tsx *)",
|
|
14
|
+
"Bash(node dist/index.js --help)",
|
|
15
|
+
"Bash(gh repo *)",
|
|
16
|
+
"WebFetch(domain:github.com)",
|
|
17
|
+
"Bash(git config *)",
|
|
18
|
+
"Read(//home/guillermo/.config/**)",
|
|
19
|
+
"Read(//home/guillermo/**)",
|
|
20
|
+
"Bash(curl *)",
|
|
21
|
+
"Bash(node dist/index.js --show-completion zsh)",
|
|
22
|
+
"Bash(node *)",
|
|
23
|
+
"Bash(_ZINKEE_COMPLETE=zsh_complete COMP_WORDS=\"zinkee\" COMP_CWORD=1 node *)",
|
|
24
|
+
"Bash(_ZINKEE_COMPLETE=zsh_complete COMP_WORDS=\"zinkee schemas\" COMP_CWORD=2 node *)",
|
|
25
|
+
"Bash(_ZINKEE_COMPLETE=zsh_complete COMP_WORDS=\"zinkee schemas fields\" COMP_CWORD=3 node dist/index.js)",
|
|
26
|
+
"Bash(_ZINKEE_COMPLETE=zsh_complete COMP_WORDS=\"zinkee schemas fields cr\" COMP_CWORD=3 node dist/index.js)",
|
|
27
|
+
"Bash(_ZINKEE_COMPLETE=zsh_complete COMP_WORDS=\"zinkee schemas list --j\" COMP_CWORD=3 node dist/index.js)",
|
|
28
|
+
"Bash(rm -rf /tmp/zinkee-install)",
|
|
29
|
+
"Bash(mkdir -p /tmp/zinkee-install)",
|
|
30
|
+
"Bash(HOME=/tmp/zinkee-install SHELL=/bin/zsh node dist/index.js --install-completion)",
|
|
31
|
+
"Read(//tmp/**)",
|
|
32
|
+
"Read(//tmp/zinkee-install/**)",
|
|
33
|
+
"Bash(rm -rf /tmp/zinkee-install-bash)",
|
|
34
|
+
"Bash(mkdir -p /tmp/zinkee-install-bash)",
|
|
35
|
+
"Bash(HOME=/tmp/zinkee-install-bash SHELL=/bin/bash node dist/index.js --install-completion)",
|
|
36
|
+
"Bash(rm -rf /tmp/zinkee-install-fish)",
|
|
37
|
+
"Bash(mkdir -p /tmp/zinkee-install-fish)",
|
|
38
|
+
"Bash(_ZINKEE_COMPLETE=zsh_complete node dist/index.js)",
|
|
39
|
+
"Bash(echo \"exit: $?\")",
|
|
40
|
+
"Bash(_ZINKEE_COMPLETE=zsh_complete COMP_WORDS=\"zinkee schemas\" COMP_CWORD=abc node dist/index.js)",
|
|
41
|
+
"Bash(_ZINKEE_COMPLETE=zsh_complete COMP_WORDS=\"zinkee config show --foo --bar baz quux ?\" COMP_CWORD=10 node dist/index.js)"
|
|
14
42
|
]
|
|
15
43
|
}
|
|
16
44
|
}
|
package/AGENTS.md
CHANGED
|
@@ -45,6 +45,7 @@ Use this order when reasoning about behavior:
|
|
|
45
45
|
- JSON/table output helpers live in `src/utils/output.ts`
|
|
46
46
|
- shared CLI error handling lives in `src/utils/errors.ts`
|
|
47
47
|
- parsers live in `src/parsers`
|
|
48
|
+
- shell completion (engine, scripts, install, runtime) lives in `src/completion`
|
|
48
49
|
|
|
49
50
|
## Testing
|
|
50
51
|
|
package/README.md
CHANGED
|
@@ -68,6 +68,18 @@ base_url = "https://api.zinkee.com"
|
|
|
68
68
|
| `--read-only` | Run in read-only mode |
|
|
69
69
|
| `--example` | Show examples for a command |
|
|
70
70
|
| `--json` | Emit JSON output |
|
|
71
|
+
| `--install-completion [shell]` | Install shell completion (bash, zsh, fish, powershell) |
|
|
72
|
+
| `--show-completion [shell]` | Print the completion script to stdout |
|
|
73
|
+
|
|
74
|
+
## Shell completion
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
zinkee --install-completion # auto-detects $SHELL and installs
|
|
78
|
+
zinkee --install-completion zsh # force a specific shell
|
|
79
|
+
zinkee --show-completion zsh # print the script (for inspection)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
After installing, restart your shell.
|
|
71
83
|
|
|
72
84
|
## Runtime Resolution
|
|
73
85
|
|