dc-ops-cli 1.1.2 → 1.2.0
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 +76 -12
- package/dist/commands/completion.d.ts +11 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +445 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ Easy secret retrieval from 1Password with smart fallbacks and interactive prompt
|
|
|
17
17
|
- 💡 **Smart suggestions** - Get hints when secrets or fields aren't found
|
|
18
18
|
- 🎨 **Beautiful UI** - Colored output and progress indicators
|
|
19
19
|
- 🔒 **Secure** - Never exposes secrets in logs or chat
|
|
20
|
+
- ⌨️ **Shell completion** - Tab completion for bash, zsh, and fish
|
|
20
21
|
|
|
21
22
|
## Installation
|
|
22
23
|
|
|
@@ -212,6 +213,33 @@ ops vaults
|
|
|
212
213
|
ops vaults --json
|
|
213
214
|
```
|
|
214
215
|
|
|
216
|
+
### Shell Completion
|
|
217
|
+
|
|
218
|
+
Generate shell completion scripts for bash, zsh, or fish:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Bash - add to ~/.bashrc
|
|
222
|
+
source <(ops completion bash)
|
|
223
|
+
|
|
224
|
+
# Or append permanently
|
|
225
|
+
ops completion bash >> ~/.bashrc
|
|
226
|
+
|
|
227
|
+
# Zsh - add to ~/.zshrc
|
|
228
|
+
source <(ops completion zsh)
|
|
229
|
+
|
|
230
|
+
# Or save to completions directory
|
|
231
|
+
ops completion zsh > ~/.zsh/completions/_ops
|
|
232
|
+
|
|
233
|
+
# Fish - save to completions directory
|
|
234
|
+
ops completion fish > ~/.config/fish/completions/ops.fish
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Features:
|
|
238
|
+
- Tab completion for all commands and options
|
|
239
|
+
- Dynamic vault name completion (from 1Password)
|
|
240
|
+
- Dynamic item name completion (from 1Password)
|
|
241
|
+
- Field name suggestions
|
|
242
|
+
|
|
215
243
|
### Smart suggestions
|
|
216
244
|
|
|
217
245
|
When a secret or field isn't found, ops provides helpful suggestions:
|
|
@@ -233,24 +261,59 @@ The clipboard `copy` command also confirms when it clears the clipboard after th
|
|
|
233
261
|
|
|
234
262
|
## Contributing
|
|
235
263
|
|
|
236
|
-
We use [Conventional Commits](https://www.conventionalcommits.org/) with [semantic-release](https://semantic-release.gitbook.io/) for automated versioning
|
|
264
|
+
We use [Conventional Commits](https://www.conventionalcommits.org/) with [semantic-release](https://semantic-release.gitbook.io/) for automated versioning.
|
|
237
265
|
|
|
238
|
-
|
|
239
|
-
# Bug fixes → patch release (1.0.1)
|
|
240
|
-
git commit -m "fix: handle empty secrets correctly"
|
|
266
|
+
### Commit Convention
|
|
241
267
|
|
|
242
|
-
|
|
243
|
-
|
|
268
|
+
| Type | Release | Example |
|
|
269
|
+
|------|---------|---------|
|
|
270
|
+
| `fix:` | Patch (1.0.x) | `fix: handle empty secrets correctly` |
|
|
271
|
+
| `feat:` | Minor (1.x.0) | `feat: add vault search command` |
|
|
272
|
+
| `feat!:` | Major (x.0.0) | `feat!: redesign API` |
|
|
273
|
+
| `docs:` | None | `docs: update README` |
|
|
274
|
+
| `chore:` | None | `chore: update dependencies` |
|
|
275
|
+
| `refactor:` | None | `refactor: simplify error handling` |
|
|
276
|
+
| `test:` | None | `test: add get command tests` |
|
|
244
277
|
|
|
245
|
-
|
|
246
|
-
git commit -m "feat!: redesign API"
|
|
247
|
-
# or
|
|
248
|
-
git commit -m "feat: new feature
|
|
278
|
+
### Release Process
|
|
249
279
|
|
|
250
|
-
|
|
280
|
+
**Fully automated** - just follow these steps:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
# 1. Run quality gates (required before pushing)
|
|
284
|
+
npm run typecheck && npm run build && npm test
|
|
285
|
+
|
|
286
|
+
# 2. Commit with conventional format
|
|
287
|
+
git add .
|
|
288
|
+
git commit -m "feat: your new feature"
|
|
289
|
+
|
|
290
|
+
# 3. Push to master - CI handles everything
|
|
291
|
+
git push origin master
|
|
251
292
|
```
|
|
252
293
|
|
|
253
|
-
|
|
294
|
+
**What happens automatically:**
|
|
295
|
+
1. CI runs typecheck, build, and tests
|
|
296
|
+
2. semantic-release analyzes your commits
|
|
297
|
+
3. Version is bumped in package.json
|
|
298
|
+
4. CHANGELOG.md is updated
|
|
299
|
+
5. GitHub release is created
|
|
300
|
+
6. Package is published to npm
|
|
301
|
+
|
|
302
|
+
**Do NOT manually:**
|
|
303
|
+
- Edit version in package.json
|
|
304
|
+
- Edit CHANGELOG.md
|
|
305
|
+
- Create GitHub releases
|
|
306
|
+
- Publish to npm
|
|
307
|
+
|
|
308
|
+
### Quality Gates
|
|
309
|
+
|
|
310
|
+
All must pass before pushing:
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
npm run typecheck # TypeScript type checking
|
|
314
|
+
npm run build # Compile to dist/
|
|
315
|
+
npm test # Run all tests
|
|
316
|
+
```
|
|
254
317
|
|
|
255
318
|
## Integration with AGENTS.md Pattern
|
|
256
319
|
|
|
@@ -318,6 +381,7 @@ curl -H "Authorization: Bearer $API_KEY" https://api.example.com
|
|
|
318
381
|
| `resolve <shareLink>` | Resolve share link to ops reference | `-j, --json` |
|
|
319
382
|
| `inspect <name>` | Show available fields for a secret | `-v, --vault`, `-j, --json` |
|
|
320
383
|
| `vaults` | List available vaults | `-j, --json` |
|
|
384
|
+
| `completion [shell]` | Generate shell completion script | Shells: `bash`, `zsh`, `fish` |
|
|
321
385
|
|
|
322
386
|
## Development
|
|
323
387
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell completion script generator for ops CLI
|
|
3
|
+
* Supports bash, zsh, and fish shells
|
|
4
|
+
*/
|
|
5
|
+
interface CompletionOptions {
|
|
6
|
+
quiet?: boolean;
|
|
7
|
+
color?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function completionCommand(shell: string | undefined, options: CompletionOptions): Promise<void>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=completion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkZH,UAAU,iBAAiB;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAiCf"}
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell completion script generator for ops CLI
|
|
3
|
+
* Supports bash, zsh, and fish shells
|
|
4
|
+
*/
|
|
5
|
+
// Bash completion script
|
|
6
|
+
const bashCompletion = `# ops CLI bash completion
|
|
7
|
+
# Add to ~/.bashrc or ~/.bash_completion:
|
|
8
|
+
# source <(ops completion bash)
|
|
9
|
+
# # or: ops completion bash >> ~/.bashrc
|
|
10
|
+
|
|
11
|
+
_ops_completion() {
|
|
12
|
+
local cur prev commands
|
|
13
|
+
COMPREPLY=()
|
|
14
|
+
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
15
|
+
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
16
|
+
|
|
17
|
+
commands="get set copy list search favorites vaults inspect export import resolve run completion"
|
|
18
|
+
|
|
19
|
+
case "\${COMP_CWORD}" in
|
|
20
|
+
1)
|
|
21
|
+
COMPREPLY=( $(compgen -W "\${commands}" -- "\${cur}") )
|
|
22
|
+
return 0
|
|
23
|
+
;;
|
|
24
|
+
*)
|
|
25
|
+
case "\${prev}" in
|
|
26
|
+
get|set|copy|inspect)
|
|
27
|
+
# Complete with vault items (expensive, so only if op is fast)
|
|
28
|
+
if command -v op &> /dev/null && [ -z "\${cur}" ]; then
|
|
29
|
+
local items
|
|
30
|
+
items=$(op item list --format=json 2>/dev/null | jq -r '.[].title' 2>/dev/null | head -20)
|
|
31
|
+
COMPREPLY=( $(compgen -W "\${items}" -- "\${cur}") )
|
|
32
|
+
fi
|
|
33
|
+
return 0
|
|
34
|
+
;;
|
|
35
|
+
-v|--vault)
|
|
36
|
+
# Complete with vault names
|
|
37
|
+
if command -v op &> /dev/null; then
|
|
38
|
+
local vaults
|
|
39
|
+
vaults=$(op vault list --format=json 2>/dev/null | jq -r '.[].name' 2>/dev/null)
|
|
40
|
+
COMPREPLY=( $(compgen -W "\${vaults}" -- "\${cur}") )
|
|
41
|
+
fi
|
|
42
|
+
return 0
|
|
43
|
+
;;
|
|
44
|
+
-f|--field)
|
|
45
|
+
COMPREPLY=( $(compgen -W "password credential username notesPlain api-key token" -- "\${cur}") )
|
|
46
|
+
return 0
|
|
47
|
+
;;
|
|
48
|
+
--format)
|
|
49
|
+
COMPREPLY=( $(compgen -W "env json" -- "\${cur}") )
|
|
50
|
+
return 0
|
|
51
|
+
;;
|
|
52
|
+
import)
|
|
53
|
+
COMPREPLY=( $(compgen -f -- "\${cur}") )
|
|
54
|
+
return 0
|
|
55
|
+
;;
|
|
56
|
+
*)
|
|
57
|
+
# Complete options based on command
|
|
58
|
+
local opts=""
|
|
59
|
+
case "\${COMP_WORDS[1]}" in
|
|
60
|
+
get)
|
|
61
|
+
opts="-v --vault -f --field -s --silent --plain --json --no-input -q --quiet --no-color"
|
|
62
|
+
;;
|
|
63
|
+
set)
|
|
64
|
+
opts="-v --vault -f --field --value --value-file --force --no-input -q --quiet --no-color"
|
|
65
|
+
;;
|
|
66
|
+
copy)
|
|
67
|
+
opts="-v --vault -f --field --ttl -q --quiet --no-color"
|
|
68
|
+
;;
|
|
69
|
+
list)
|
|
70
|
+
opts="-v --vault -s --search -j --json --plain --favorites -q --quiet --no-color"
|
|
71
|
+
;;
|
|
72
|
+
search)
|
|
73
|
+
opts="-v --vault -j --json --plain -q --quiet --no-color"
|
|
74
|
+
;;
|
|
75
|
+
favorites)
|
|
76
|
+
opts="-v --vault -j --json --plain -q --quiet --no-color"
|
|
77
|
+
;;
|
|
78
|
+
vaults)
|
|
79
|
+
opts="-j --json -q --quiet --no-color"
|
|
80
|
+
;;
|
|
81
|
+
inspect)
|
|
82
|
+
opts="-v --vault -j --json -q --quiet --no-color"
|
|
83
|
+
;;
|
|
84
|
+
export)
|
|
85
|
+
opts="-v --vault -f --format -j --json -o --output -q --quiet --no-color"
|
|
86
|
+
;;
|
|
87
|
+
import)
|
|
88
|
+
opts="-v --vault --dry-run -q --quiet --no-color"
|
|
89
|
+
;;
|
|
90
|
+
resolve)
|
|
91
|
+
opts="-j --json -q --quiet --no-color"
|
|
92
|
+
;;
|
|
93
|
+
run)
|
|
94
|
+
opts="-v --vault -f --field -e --env --env-file --verbose --no-color"
|
|
95
|
+
;;
|
|
96
|
+
completion)
|
|
97
|
+
opts="bash zsh fish"
|
|
98
|
+
;;
|
|
99
|
+
esac
|
|
100
|
+
COMPREPLY=( $(compgen -W "\${opts}" -- "\${cur}") )
|
|
101
|
+
return 0
|
|
102
|
+
;;
|
|
103
|
+
esac
|
|
104
|
+
;;
|
|
105
|
+
esac
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
complete -F _ops_completion ops
|
|
109
|
+
`;
|
|
110
|
+
// Zsh completion script
|
|
111
|
+
const zshCompletion = `#compdef ops
|
|
112
|
+
# ops CLI zsh completion
|
|
113
|
+
# Add to ~/.zshrc:
|
|
114
|
+
# source <(ops completion zsh)
|
|
115
|
+
# # or: ops completion zsh > ~/.zsh/completions/_ops
|
|
116
|
+
|
|
117
|
+
_ops() {
|
|
118
|
+
local -a commands
|
|
119
|
+
commands=(
|
|
120
|
+
'get:Get a secret from 1Password'
|
|
121
|
+
'set:Store a secret in 1Password'
|
|
122
|
+
'copy:Copy a secret to clipboard'
|
|
123
|
+
'list:List all items in a vault'
|
|
124
|
+
'search:Search items by title'
|
|
125
|
+
'favorites:List favorite items'
|
|
126
|
+
'vaults:List available vaults'
|
|
127
|
+
'inspect:Inspect item fields'
|
|
128
|
+
'export:Export secrets as .env or JSON'
|
|
129
|
+
'import:Import secrets from .env file'
|
|
130
|
+
'resolve:Resolve 1Password share link'
|
|
131
|
+
'run:Run command with secrets injected'
|
|
132
|
+
'completion:Generate shell completion script'
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
local -a common_opts
|
|
136
|
+
common_opts=(
|
|
137
|
+
'-v[Vault name]:vault:_ops_vaults'
|
|
138
|
+
'--vault[Vault name]:vault:_ops_vaults'
|
|
139
|
+
'-q[Suppress non-essential output]'
|
|
140
|
+
'--quiet[Suppress non-essential output]'
|
|
141
|
+
'--no-color[Disable color output]'
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
_arguments -C \\
|
|
145
|
+
'1:command:->command' \\
|
|
146
|
+
'*::arg:->args'
|
|
147
|
+
|
|
148
|
+
case "\$state" in
|
|
149
|
+
command)
|
|
150
|
+
_describe 'ops command' commands
|
|
151
|
+
;;
|
|
152
|
+
args)
|
|
153
|
+
case "\$words[1]" in
|
|
154
|
+
get)
|
|
155
|
+
_arguments \\
|
|
156
|
+
'1:secret name:_ops_items' \\
|
|
157
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
158
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
159
|
+
'-f[Field name]:field:(password credential username notesPlain api-key token)' \\
|
|
160
|
+
'--field[Field name]:field:(password credential username notesPlain api-key token)' \\
|
|
161
|
+
'-s[Output only secret value]' \\
|
|
162
|
+
'--silent[Output only secret value]' \\
|
|
163
|
+
'--plain[Output only secret value]' \\
|
|
164
|
+
'--json[Output as JSON]' \\
|
|
165
|
+
'--no-input[Disable prompts]' \\
|
|
166
|
+
'-q[Suppress output]' \\
|
|
167
|
+
'--quiet[Suppress output]' \\
|
|
168
|
+
'--no-color[Disable colors]'
|
|
169
|
+
;;
|
|
170
|
+
set)
|
|
171
|
+
_arguments \\
|
|
172
|
+
'1:secret name:' \\
|
|
173
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
174
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
175
|
+
'-f[Field name]:field:(password credential username notesPlain api-key token)' \\
|
|
176
|
+
'--field[Field name]:field:(password credential username notesPlain api-key token)' \\
|
|
177
|
+
'--value[Secret value]:value:' \\
|
|
178
|
+
'--value-file[Read from file]:file:_files' \\
|
|
179
|
+
'--force[Overwrite without confirm]' \\
|
|
180
|
+
'--no-input[Disable prompts]' \\
|
|
181
|
+
'-q[Suppress output]' \\
|
|
182
|
+
'--quiet[Suppress output]' \\
|
|
183
|
+
'--no-color[Disable colors]'
|
|
184
|
+
;;
|
|
185
|
+
copy)
|
|
186
|
+
_arguments \\
|
|
187
|
+
'1:secret name:_ops_items' \\
|
|
188
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
189
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
190
|
+
'-f[Field name]:field:(password credential username notesPlain api-key token)' \\
|
|
191
|
+
'--field[Field name]:field:(password credential username notesPlain api-key token)' \\
|
|
192
|
+
'--ttl[Clear after N seconds]:seconds:' \\
|
|
193
|
+
'-q[Suppress output]' \\
|
|
194
|
+
'--quiet[Suppress output]' \\
|
|
195
|
+
'--no-color[Disable colors]'
|
|
196
|
+
;;
|
|
197
|
+
list)
|
|
198
|
+
_arguments \\
|
|
199
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
200
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
201
|
+
'-s[Search query]:query:' \\
|
|
202
|
+
'--search[Search query]:query:' \\
|
|
203
|
+
'-j[Output as JSON]' \\
|
|
204
|
+
'--json[Output as JSON]' \\
|
|
205
|
+
'--plain[Tab-delimited output]' \\
|
|
206
|
+
'--favorites[Show favorites only]' \\
|
|
207
|
+
'-q[Suppress output]' \\
|
|
208
|
+
'--quiet[Suppress output]' \\
|
|
209
|
+
'--no-color[Disable colors]'
|
|
210
|
+
;;
|
|
211
|
+
search)
|
|
212
|
+
_arguments \\
|
|
213
|
+
'1:search query:' \\
|
|
214
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
215
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
216
|
+
'-j[Output as JSON]' \\
|
|
217
|
+
'--json[Output as JSON]' \\
|
|
218
|
+
'--plain[Tab-delimited output]' \\
|
|
219
|
+
'-q[Suppress output]' \\
|
|
220
|
+
'--quiet[Suppress output]' \\
|
|
221
|
+
'--no-color[Disable colors]'
|
|
222
|
+
;;
|
|
223
|
+
favorites|vaults)
|
|
224
|
+
_arguments \\
|
|
225
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
226
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
227
|
+
'-j[Output as JSON]' \\
|
|
228
|
+
'--json[Output as JSON]' \\
|
|
229
|
+
'-q[Suppress output]' \\
|
|
230
|
+
'--quiet[Suppress output]' \\
|
|
231
|
+
'--no-color[Disable colors]'
|
|
232
|
+
;;
|
|
233
|
+
inspect)
|
|
234
|
+
_arguments \\
|
|
235
|
+
'1:item name:_ops_items' \\
|
|
236
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
237
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
238
|
+
'-j[Output as JSON]' \\
|
|
239
|
+
'--json[Output as JSON]' \\
|
|
240
|
+
'-q[Suppress output]' \\
|
|
241
|
+
'--quiet[Suppress output]' \\
|
|
242
|
+
'--no-color[Disable colors]'
|
|
243
|
+
;;
|
|
244
|
+
export)
|
|
245
|
+
_arguments \\
|
|
246
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
247
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
248
|
+
'-f[Output format]:format:(env json)' \\
|
|
249
|
+
'--format[Output format]:format:(env json)' \\
|
|
250
|
+
'-j[Alias for --format json]' \\
|
|
251
|
+
'--json[Alias for --format json]' \\
|
|
252
|
+
'-o[Output file]:file:_files' \\
|
|
253
|
+
'--output[Output file]:file:_files' \\
|
|
254
|
+
'-q[Suppress output]' \\
|
|
255
|
+
'--quiet[Suppress output]' \\
|
|
256
|
+
'--no-color[Disable colors]'
|
|
257
|
+
;;
|
|
258
|
+
import)
|
|
259
|
+
_arguments \\
|
|
260
|
+
'1:env file:_files' \\
|
|
261
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
262
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
263
|
+
'--dry-run[Preview without modifying]' \\
|
|
264
|
+
'-q[Suppress output]' \\
|
|
265
|
+
'--quiet[Suppress output]' \\
|
|
266
|
+
'--no-color[Disable colors]'
|
|
267
|
+
;;
|
|
268
|
+
resolve)
|
|
269
|
+
_arguments \\
|
|
270
|
+
'1:share link:' \\
|
|
271
|
+
'-j[Output as JSON]' \\
|
|
272
|
+
'--json[Output as JSON]' \\
|
|
273
|
+
'-q[Suppress output]' \\
|
|
274
|
+
'--quiet[Suppress output]' \\
|
|
275
|
+
'--no-color[Disable colors]'
|
|
276
|
+
;;
|
|
277
|
+
run)
|
|
278
|
+
_arguments \\
|
|
279
|
+
'*:command:_command_names' \\
|
|
280
|
+
'-v[Vault name]:vault:_ops_vaults' \\
|
|
281
|
+
'--vault[Vault name]:vault:_ops_vaults' \\
|
|
282
|
+
'-f[Field name]:field:(password credential username notesPlain api-key token)' \\
|
|
283
|
+
'--field[Field name]:field:(password credential username notesPlain api-key token)' \\
|
|
284
|
+
'*-e[Map env to secret]:mapping:' \\
|
|
285
|
+
'*--env[Map env to secret]:mapping:' \\
|
|
286
|
+
'--env-file[Env mapping file]:file:_files' \\
|
|
287
|
+
'--verbose[Show injected secrets]' \\
|
|
288
|
+
'--no-color[Disable colors]'
|
|
289
|
+
;;
|
|
290
|
+
completion)
|
|
291
|
+
_arguments '1:shell:(bash zsh fish)'
|
|
292
|
+
;;
|
|
293
|
+
esac
|
|
294
|
+
;;
|
|
295
|
+
esac
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
# Dynamic completion functions
|
|
299
|
+
_ops_vaults() {
|
|
300
|
+
local -a vaults
|
|
301
|
+
if command -v op &> /dev/null; then
|
|
302
|
+
vaults=(\${(f)"$(op vault list --format=json 2>/dev/null | jq -r '.[].name' 2>/dev/null)"})
|
|
303
|
+
_describe 'vault' vaults
|
|
304
|
+
fi
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
_ops_items() {
|
|
308
|
+
local -a items
|
|
309
|
+
if command -v op &> /dev/null; then
|
|
310
|
+
items=(\${(f)"$(op item list --format=json 2>/dev/null | jq -r '.[].title' 2>/dev/null | head -20)"})
|
|
311
|
+
_describe 'item' items
|
|
312
|
+
fi
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
compdef _ops ops
|
|
316
|
+
`;
|
|
317
|
+
// Fish completion script
|
|
318
|
+
const fishCompletion = `# ops CLI fish completion
|
|
319
|
+
# Add to ~/.config/fish/completions/ops.fish:
|
|
320
|
+
# ops completion fish > ~/.config/fish/completions/ops.fish
|
|
321
|
+
|
|
322
|
+
# Disable file completion by default
|
|
323
|
+
complete -c ops -f
|
|
324
|
+
|
|
325
|
+
# Commands
|
|
326
|
+
complete -c ops -n __fish_use_subcommand -a get -d 'Get a secret from 1Password'
|
|
327
|
+
complete -c ops -n __fish_use_subcommand -a set -d 'Store a secret in 1Password'
|
|
328
|
+
complete -c ops -n __fish_use_subcommand -a copy -d 'Copy a secret to clipboard'
|
|
329
|
+
complete -c ops -n __fish_use_subcommand -a list -d 'List all items in a vault'
|
|
330
|
+
complete -c ops -n __fish_use_subcommand -a search -d 'Search items by title'
|
|
331
|
+
complete -c ops -n __fish_use_subcommand -a favorites -d 'List favorite items'
|
|
332
|
+
complete -c ops -n __fish_use_subcommand -a vaults -d 'List available vaults'
|
|
333
|
+
complete -c ops -n __fish_use_subcommand -a inspect -d 'Inspect item fields'
|
|
334
|
+
complete -c ops -n __fish_use_subcommand -a export -d 'Export secrets as .env or JSON'
|
|
335
|
+
complete -c ops -n __fish_use_subcommand -a import -d 'Import secrets from .env file'
|
|
336
|
+
complete -c ops -n __fish_use_subcommand -a resolve -d 'Resolve 1Password share link'
|
|
337
|
+
complete -c ops -n __fish_use_subcommand -a run -d 'Run command with secrets injected'
|
|
338
|
+
complete -c ops -n __fish_use_subcommand -a completion -d 'Generate shell completion script'
|
|
339
|
+
|
|
340
|
+
# Common options
|
|
341
|
+
complete -c ops -l vault -s v -d 'Vault name'
|
|
342
|
+
complete -c ops -l quiet -s q -d 'Suppress non-essential output'
|
|
343
|
+
complete -c ops -l no-color -d 'Disable color output'
|
|
344
|
+
|
|
345
|
+
# get command options
|
|
346
|
+
complete -c ops -n '__fish_seen_subcommand_from get' -l field -s f -d 'Field name'
|
|
347
|
+
complete -c ops -n '__fish_seen_subcommand_from get' -l silent -s s -d 'Output only secret value'
|
|
348
|
+
complete -c ops -n '__fish_seen_subcommand_from get' -l plain -d 'Output only secret value'
|
|
349
|
+
complete -c ops -n '__fish_seen_subcommand_from get' -l json -d 'Output as JSON'
|
|
350
|
+
complete -c ops -n '__fish_seen_subcommand_from get' -l no-input -d 'Disable prompts'
|
|
351
|
+
|
|
352
|
+
# set command options
|
|
353
|
+
complete -c ops -n '__fish_seen_subcommand_from set' -l field -s f -d 'Field name'
|
|
354
|
+
complete -c ops -n '__fish_seen_subcommand_from set' -l value -d 'Secret value'
|
|
355
|
+
complete -c ops -n '__fish_seen_subcommand_from set' -l value-file -r -d 'Read from file'
|
|
356
|
+
complete -c ops -n '__fish_seen_subcommand_from set' -l force -d 'Overwrite without confirm'
|
|
357
|
+
complete -c ops -n '__fish_seen_subcommand_from set' -l no-input -d 'Disable prompts'
|
|
358
|
+
|
|
359
|
+
# copy command options
|
|
360
|
+
complete -c ops -n '__fish_seen_subcommand_from copy' -l field -s f -d 'Field name'
|
|
361
|
+
complete -c ops -n '__fish_seen_subcommand_from copy' -l ttl -d 'Clear after N seconds'
|
|
362
|
+
|
|
363
|
+
# list command options
|
|
364
|
+
complete -c ops -n '__fish_seen_subcommand_from list' -l search -s s -d 'Search query'
|
|
365
|
+
complete -c ops -n '__fish_seen_subcommand_from list' -l json -s j -d 'Output as JSON'
|
|
366
|
+
complete -c ops -n '__fish_seen_subcommand_from list' -l plain -d 'Tab-delimited output'
|
|
367
|
+
complete -c ops -n '__fish_seen_subcommand_from list' -l favorites -d 'Show favorites only'
|
|
368
|
+
|
|
369
|
+
# export command options
|
|
370
|
+
complete -c ops -n '__fish_seen_subcommand_from export' -l format -s f -a 'env json' -d 'Output format'
|
|
371
|
+
complete -c ops -n '__fish_seen_subcommand_from export' -l json -s j -d 'Alias for --format json'
|
|
372
|
+
complete -c ops -n '__fish_seen_subcommand_from export' -l output -s o -r -d 'Output file'
|
|
373
|
+
|
|
374
|
+
# import command options
|
|
375
|
+
complete -c ops -n '__fish_seen_subcommand_from import' -l dry-run -d 'Preview without modifying'
|
|
376
|
+
|
|
377
|
+
# run command options
|
|
378
|
+
complete -c ops -n '__fish_seen_subcommand_from run' -l env -s e -d 'Map env to secret'
|
|
379
|
+
complete -c ops -n '__fish_seen_subcommand_from run' -l env-file -r -d 'Env mapping file'
|
|
380
|
+
complete -c ops -n '__fish_seen_subcommand_from run' -l verbose -d 'Show injected secrets'
|
|
381
|
+
|
|
382
|
+
# completion command - shell argument
|
|
383
|
+
complete -c ops -n '__fish_seen_subcommand_from completion' -a 'bash zsh fish' -d 'Shell type'
|
|
384
|
+
|
|
385
|
+
# Dynamic vault completion (if op CLI available)
|
|
386
|
+
function __fish_ops_vaults
|
|
387
|
+
command -v op &>/dev/null; and op vault list --format=json 2>/dev/null | jq -r '.[].name' 2>/dev/null
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
complete -c ops -n '__fish_seen_subcommand_from get set copy list search favorites inspect export import run' -l vault -s v -xa '(__fish_ops_vaults)'
|
|
391
|
+
|
|
392
|
+
# Dynamic item completion (if op CLI available)
|
|
393
|
+
function __fish_ops_items
|
|
394
|
+
command -v op &>/dev/null; and op item list --format=json 2>/dev/null | jq -r '.[].title' 2>/dev/null | head -20
|
|
395
|
+
end
|
|
396
|
+
|
|
397
|
+
complete -c ops -n '__fish_seen_subcommand_from get copy inspect' -xa '(__fish_ops_items)'
|
|
398
|
+
|
|
399
|
+
# Field completion
|
|
400
|
+
complete -c ops -n '__fish_seen_subcommand_from get set copy' -l field -s f -xa 'password credential username notesPlain api-key token'
|
|
401
|
+
`;
|
|
402
|
+
export async function completionCommand(shell, options) {
|
|
403
|
+
const targetShell = shell || detectShell();
|
|
404
|
+
switch (targetShell) {
|
|
405
|
+
case 'bash':
|
|
406
|
+
console.log(bashCompletion);
|
|
407
|
+
break;
|
|
408
|
+
case 'zsh':
|
|
409
|
+
console.log(zshCompletion);
|
|
410
|
+
break;
|
|
411
|
+
case 'fish':
|
|
412
|
+
console.log(fishCompletion);
|
|
413
|
+
break;
|
|
414
|
+
default:
|
|
415
|
+
console.error(`Unknown shell: ${targetShell}`);
|
|
416
|
+
console.error('Supported shells: bash, zsh, fish');
|
|
417
|
+
console.error('');
|
|
418
|
+
console.error('Usage:');
|
|
419
|
+
console.error(' ops completion bash # Generate bash completion');
|
|
420
|
+
console.error(' ops completion zsh # Generate zsh completion');
|
|
421
|
+
console.error(' ops completion fish # Generate fish completion');
|
|
422
|
+
console.error('');
|
|
423
|
+
console.error('Installation:');
|
|
424
|
+
console.error(' # Bash (add to ~/.bashrc)');
|
|
425
|
+
console.error(' source <(ops completion bash)');
|
|
426
|
+
console.error('');
|
|
427
|
+
console.error(' # Zsh (add to ~/.zshrc)');
|
|
428
|
+
console.error(' source <(ops completion zsh)');
|
|
429
|
+
console.error('');
|
|
430
|
+
console.error(' # Fish');
|
|
431
|
+
console.error(' ops completion fish > ~/.config/fish/completions/ops.fish');
|
|
432
|
+
process.exit(1);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
function detectShell() {
|
|
436
|
+
const shell = process.env.SHELL || '';
|
|
437
|
+
if (shell.includes('zsh'))
|
|
438
|
+
return 'zsh';
|
|
439
|
+
if (shell.includes('fish'))
|
|
440
|
+
return 'fish';
|
|
441
|
+
if (shell.includes('bash'))
|
|
442
|
+
return 'bash';
|
|
443
|
+
return 'bash'; // Default to bash
|
|
444
|
+
}
|
|
445
|
+
//# sourceMappingURL=completion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,yBAAyB;AACzB,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuGtB,CAAC;AAEF,wBAAwB;AACxB,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6MrB,CAAC;AAEF,yBAAyB;AACzB,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmFtB,CAAC;AAOF,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAAyB,EACzB,OAA0B;IAE1B,MAAM,WAAW,GAAG,KAAK,IAAI,WAAW,EAAE,CAAC;IAE3C,QAAQ,WAAW,EAAE,CAAC;QACpB,KAAK,MAAM;YACT,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YAC5B,MAAM;QACR,KAAK,KAAK;YACR,OAAO,CAAC,GAAG,CAAC,aA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AQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC1C,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAC1C,OAAO,MAAM,CAAC,CAAC,kBAAkB;AACnC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { resolveCommand } from './commands/resolve.js';
|
|
|
11
11
|
import { runCommand } from './commands/run.js';
|
|
12
12
|
import { inspectCommand } from './commands/inspect.js';
|
|
13
13
|
import { vaultsCommand } from './commands/vaults.js';
|
|
14
|
+
import { completionCommand } from './commands/completion.js';
|
|
14
15
|
// Dynamic version from package.json
|
|
15
16
|
const require = createRequire(import.meta.url);
|
|
16
17
|
const pkg = require('../package.json');
|
|
@@ -152,6 +153,12 @@ program
|
|
|
152
153
|
.option('-q, --quiet', 'suppress non-essential output')
|
|
153
154
|
.option('--no-color', 'disable color output')
|
|
154
155
|
.action(resolveCommand);
|
|
156
|
+
program
|
|
157
|
+
.command('completion [shell]')
|
|
158
|
+
.description('Generate shell completion script (bash, zsh, fish)')
|
|
159
|
+
.option('-q, --quiet', 'suppress non-essential output')
|
|
160
|
+
.option('--no-color', 'disable color output')
|
|
161
|
+
.action(completionCommand);
|
|
155
162
|
// Error handling
|
|
156
163
|
process.on('uncaughtException', (error) => {
|
|
157
164
|
console.error('Unexpected error:', error.message);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,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
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build:bin": "bun build --compile src/index.ts --outfile bin/ops",
|
|
22
22
|
"build": "tsc",
|
|
23
|
-
"dev": "ts-node src/index.ts",
|
|
23
|
+
"dev": "TS_NODE_TRANSPILE_ONLY=1 node --loader ts-node/esm src/index.ts",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
25
|
"lint": "tsc --noEmit",
|
|
26
26
|
"test": "TS_NODE_TRANSPILE_ONLY=1 node --test --loader ts-node/esm",
|