@cortexmemory/cli 0.28.0 → 0.29.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/dist/commands/completion.d.ts +12 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +71 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +145 -40
- package/dist/commands/deploy.js.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
- package/scripts/completions/cortex.bash +379 -0
- package/scripts/completions/cortex.fish +285 -0
- package/scripts/completions/cortex.zsh +751 -0
- package/scripts/postinstall.js +196 -0
- package/scripts/preuninstall.js +121 -0
- package/templates/basic/src/chat.ts +24 -3
- package/templates/basic/src/cortex.ts +41 -5
- package/templates/basic/src/index.ts +17 -1
- package/templates/basic/src/server.ts +18 -2
- package/templates/vercel-ai-quickstart/lib/agents/memory-agent.ts +2 -1
- package/templates/vercel-ai-quickstart/next.config.js +13 -4
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,YAAY,C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C9B,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;YACvD,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC;gBAC9C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC,CAAC;QAC9D,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexmemory/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "CLI tool for managing Cortex Memory deployments, performing administrative tasks, and streamlining development workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -11,9 +11,14 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"templates",
|
|
14
|
+
"scripts/completions",
|
|
15
|
+
"scripts/postinstall.js",
|
|
16
|
+
"scripts/preuninstall.js",
|
|
14
17
|
"README.md"
|
|
15
18
|
],
|
|
16
19
|
"scripts": {
|
|
20
|
+
"postinstall": "node scripts/postinstall.js",
|
|
21
|
+
"preuninstall": "node scripts/preuninstall.js",
|
|
17
22
|
"prebuild": "node scripts/sync-quickstart-template.js",
|
|
18
23
|
"build": "npm run prebuild && tsc && chmod +x dist/index.js",
|
|
19
24
|
"dev": "tsc --watch",
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Cortex CLI completion script for Bash
|
|
4
|
+
# Auto-installed by @cortexmemory/cli
|
|
5
|
+
# Compatible with bash 3.2+ (macOS default)
|
|
6
|
+
|
|
7
|
+
_cortex_deployments() {
|
|
8
|
+
local config="$HOME/.cortexrc"
|
|
9
|
+
if [[ -f "$config" ]]; then
|
|
10
|
+
# Parse deployment names from JSON config
|
|
11
|
+
grep -o '"[^"]*"[[:space:]]*:[[:space:]]*{' "$config" 2>/dev/null | \
|
|
12
|
+
grep -v '"deployments"' | grep -v '"apps"' | \
|
|
13
|
+
sed 's/"//g' | sed 's/[[:space:]]*:[[:space:]]*{//'
|
|
14
|
+
fi
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
_cortex_apps() {
|
|
18
|
+
local config="$HOME/.cortexrc"
|
|
19
|
+
if [[ -f "$config" ]]; then
|
|
20
|
+
# Parse app names from JSON config (simplified)
|
|
21
|
+
grep -A1 '"apps"' "$config" 2>/dev/null | \
|
|
22
|
+
grep -o '"[^"]*"[[:space:]]*:[[:space:]]*{' | grep -v '"apps"' | \
|
|
23
|
+
sed 's/"//g' | sed 's/[[:space:]]*:[[:space:]]*{//'
|
|
24
|
+
fi
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_cortex() {
|
|
28
|
+
local cur prev
|
|
29
|
+
COMPREPLY=()
|
|
30
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
31
|
+
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
32
|
+
local cword=$COMP_CWORD
|
|
33
|
+
|
|
34
|
+
# Top-level commands
|
|
35
|
+
local commands="start stop deploy update status config init dev use db convex memory users spaces facts conversations completion"
|
|
36
|
+
|
|
37
|
+
# config subcommands
|
|
38
|
+
local config_cmds="show list set test set-path enable disable deployments add-deployment remove-deployment set-key set-url path reset"
|
|
39
|
+
|
|
40
|
+
# db subcommands
|
|
41
|
+
local db_cmds="stats clear backup restore export"
|
|
42
|
+
|
|
43
|
+
# convex subcommands
|
|
44
|
+
local convex_cmds="status deploy dev logs dashboard update schema init env"
|
|
45
|
+
|
|
46
|
+
# users subcommands
|
|
47
|
+
local users_cmds="list get delete delete-many export stats update create exists"
|
|
48
|
+
|
|
49
|
+
# spaces subcommands
|
|
50
|
+
local spaces_cmds="list create get delete archive reactivate stats participants add-participant remove-participant update count search"
|
|
51
|
+
|
|
52
|
+
# conversations subcommands
|
|
53
|
+
local conversations_cmds="list get delete export count clear messages"
|
|
54
|
+
|
|
55
|
+
# memory subcommands
|
|
56
|
+
local memory_cmds="list search get delete clear export stats archive restore"
|
|
57
|
+
|
|
58
|
+
# facts subcommands
|
|
59
|
+
local facts_cmds="list search get delete export count clear"
|
|
60
|
+
|
|
61
|
+
# completion subcommands
|
|
62
|
+
local completion_cmds="zsh bash fish"
|
|
63
|
+
|
|
64
|
+
# Output formats
|
|
65
|
+
local formats="table json"
|
|
66
|
+
|
|
67
|
+
# Space types
|
|
68
|
+
local space_types="personal team project custom"
|
|
69
|
+
|
|
70
|
+
# Fact types
|
|
71
|
+
local fact_types="preference identity knowledge relationship event observation custom"
|
|
72
|
+
|
|
73
|
+
# Handle completion based on position
|
|
74
|
+
case ${cword} in
|
|
75
|
+
1)
|
|
76
|
+
COMPREPLY=($(compgen -W "$commands" -- "$cur"))
|
|
77
|
+
return
|
|
78
|
+
;;
|
|
79
|
+
2)
|
|
80
|
+
case ${COMP_WORDS[1]} in
|
|
81
|
+
config)
|
|
82
|
+
COMPREPLY=($(compgen -W "$config_cmds" -- "$cur"))
|
|
83
|
+
return
|
|
84
|
+
;;
|
|
85
|
+
db)
|
|
86
|
+
COMPREPLY=($(compgen -W "$db_cmds" -- "$cur"))
|
|
87
|
+
return
|
|
88
|
+
;;
|
|
89
|
+
convex)
|
|
90
|
+
COMPREPLY=($(compgen -W "$convex_cmds" -- "$cur"))
|
|
91
|
+
return
|
|
92
|
+
;;
|
|
93
|
+
users)
|
|
94
|
+
COMPREPLY=($(compgen -W "$users_cmds" -- "$cur"))
|
|
95
|
+
return
|
|
96
|
+
;;
|
|
97
|
+
spaces)
|
|
98
|
+
COMPREPLY=($(compgen -W "$spaces_cmds" -- "$cur"))
|
|
99
|
+
return
|
|
100
|
+
;;
|
|
101
|
+
conversations|convs)
|
|
102
|
+
COMPREPLY=($(compgen -W "$conversations_cmds" -- "$cur"))
|
|
103
|
+
return
|
|
104
|
+
;;
|
|
105
|
+
memory)
|
|
106
|
+
COMPREPLY=($(compgen -W "$memory_cmds" -- "$cur"))
|
|
107
|
+
return
|
|
108
|
+
;;
|
|
109
|
+
facts)
|
|
110
|
+
COMPREPLY=($(compgen -W "$facts_cmds" -- "$cur"))
|
|
111
|
+
return
|
|
112
|
+
;;
|
|
113
|
+
completion)
|
|
114
|
+
COMPREPLY=($(compgen -W "$completion_cmds" -- "$cur"))
|
|
115
|
+
return
|
|
116
|
+
;;
|
|
117
|
+
use)
|
|
118
|
+
COMPREPLY=($(compgen -W "$(_cortex_deployments) --clear" -- "$cur"))
|
|
119
|
+
return
|
|
120
|
+
;;
|
|
121
|
+
init)
|
|
122
|
+
COMPREPLY=($(compgen -d -- "$cur"))
|
|
123
|
+
return
|
|
124
|
+
;;
|
|
125
|
+
esac
|
|
126
|
+
;;
|
|
127
|
+
esac
|
|
128
|
+
|
|
129
|
+
# Handle options
|
|
130
|
+
case ${prev} in
|
|
131
|
+
-d|--deployment)
|
|
132
|
+
COMPREPLY=($(compgen -W "$(_cortex_deployments)" -- "$cur"))
|
|
133
|
+
return
|
|
134
|
+
;;
|
|
135
|
+
-f|--format)
|
|
136
|
+
COMPREPLY=($(compgen -W "$formats" -- "$cur"))
|
|
137
|
+
return
|
|
138
|
+
;;
|
|
139
|
+
-t|--template)
|
|
140
|
+
COMPREPLY=($(compgen -W "basic vercel-ai-quickstart" -- "$cur"))
|
|
141
|
+
return
|
|
142
|
+
;;
|
|
143
|
+
--type)
|
|
144
|
+
COMPREPLY=($(compgen -W "$space_types" -- "$cur"))
|
|
145
|
+
return
|
|
146
|
+
;;
|
|
147
|
+
--status)
|
|
148
|
+
COMPREPLY=($(compgen -W "active archived" -- "$cur"))
|
|
149
|
+
return
|
|
150
|
+
;;
|
|
151
|
+
-o|--output)
|
|
152
|
+
COMPREPLY=($(compgen -f -- "$cur"))
|
|
153
|
+
return
|
|
154
|
+
;;
|
|
155
|
+
--dev-path)
|
|
156
|
+
COMPREPLY=($(compgen -d -- "$cur"))
|
|
157
|
+
return
|
|
158
|
+
;;
|
|
159
|
+
set-path)
|
|
160
|
+
# First arg is deployment, second is path
|
|
161
|
+
if [[ ${cword} -eq 3 ]]; then
|
|
162
|
+
COMPREPLY=($(compgen -W "$(_cortex_deployments)" -- "$cur"))
|
|
163
|
+
elif [[ ${cword} -eq 4 ]]; then
|
|
164
|
+
COMPREPLY=($(compgen -d -- "$cur"))
|
|
165
|
+
fi
|
|
166
|
+
return
|
|
167
|
+
;;
|
|
168
|
+
enable|disable)
|
|
169
|
+
COMPREPLY=($(compgen -W "$(_cortex_deployments) $(_cortex_apps)" -- "$cur"))
|
|
170
|
+
return
|
|
171
|
+
;;
|
|
172
|
+
remove-deployment|set-key|set-url)
|
|
173
|
+
COMPREPLY=($(compgen -W "$(_cortex_deployments)" -- "$cur"))
|
|
174
|
+
return
|
|
175
|
+
;;
|
|
176
|
+
esac
|
|
177
|
+
|
|
178
|
+
# Command-specific option completion
|
|
179
|
+
case ${COMP_WORDS[1]} in
|
|
180
|
+
start|stop)
|
|
181
|
+
COMPREPLY=($(compgen -W "-d --deployment --deployments-only --apps-only" -- "$cur"))
|
|
182
|
+
return
|
|
183
|
+
;;
|
|
184
|
+
deploy)
|
|
185
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes" -- "$cur"))
|
|
186
|
+
return
|
|
187
|
+
;;
|
|
188
|
+
update)
|
|
189
|
+
COMPREPLY=($(compgen -W "-d --deployment --deployments-only --apps-only --dev-path --sync-template -y --yes" -- "$cur"))
|
|
190
|
+
return
|
|
191
|
+
;;
|
|
192
|
+
status)
|
|
193
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format" -- "$cur"))
|
|
194
|
+
return
|
|
195
|
+
;;
|
|
196
|
+
init)
|
|
197
|
+
COMPREPLY=($(compgen -W "-t --template -n --name --skip-install -y --yes" -- "$cur"))
|
|
198
|
+
return
|
|
199
|
+
;;
|
|
200
|
+
dev)
|
|
201
|
+
COMPREPLY=($(compgen -W "-d --deployment" -- "$cur"))
|
|
202
|
+
return
|
|
203
|
+
;;
|
|
204
|
+
use)
|
|
205
|
+
COMPREPLY=($(compgen -W "--clear $(_cortex_deployments)" -- "$cur"))
|
|
206
|
+
return
|
|
207
|
+
;;
|
|
208
|
+
config)
|
|
209
|
+
case ${COMP_WORDS[2]} in
|
|
210
|
+
show|deployments)
|
|
211
|
+
COMPREPLY=($(compgen -W "-f --format" -- "$cur"))
|
|
212
|
+
;;
|
|
213
|
+
test)
|
|
214
|
+
COMPREPLY=($(compgen -W "-d --deployment" -- "$cur"))
|
|
215
|
+
;;
|
|
216
|
+
add-deployment)
|
|
217
|
+
COMPREPLY=($(compgen -W "-u --url -k --key --default --json-only" -- "$cur"))
|
|
218
|
+
;;
|
|
219
|
+
remove-deployment|set-key|set-url)
|
|
220
|
+
COMPREPLY=($(compgen -W "--json-only" -- "$cur"))
|
|
221
|
+
;;
|
|
222
|
+
reset)
|
|
223
|
+
COMPREPLY=($(compgen -W "-y --yes" -- "$cur"))
|
|
224
|
+
;;
|
|
225
|
+
esac
|
|
226
|
+
return
|
|
227
|
+
;;
|
|
228
|
+
db)
|
|
229
|
+
case ${COMP_WORDS[2]} in
|
|
230
|
+
stats)
|
|
231
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format" -- "$cur"))
|
|
232
|
+
;;
|
|
233
|
+
clear)
|
|
234
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes --keep-users" -- "$cur"))
|
|
235
|
+
;;
|
|
236
|
+
backup|export)
|
|
237
|
+
COMPREPLY=($(compgen -W "-d --deployment -o --output" -- "$cur"))
|
|
238
|
+
;;
|
|
239
|
+
restore)
|
|
240
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes" -- "$cur"))
|
|
241
|
+
;;
|
|
242
|
+
esac
|
|
243
|
+
return
|
|
244
|
+
;;
|
|
245
|
+
users)
|
|
246
|
+
case ${COMP_WORDS[2]} in
|
|
247
|
+
list)
|
|
248
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format -l --limit" -- "$cur"))
|
|
249
|
+
;;
|
|
250
|
+
get|stats|exists)
|
|
251
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format" -- "$cur"))
|
|
252
|
+
;;
|
|
253
|
+
delete)
|
|
254
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes --gdpr" -- "$cur"))
|
|
255
|
+
;;
|
|
256
|
+
delete-many)
|
|
257
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes --gdpr" -- "$cur"))
|
|
258
|
+
;;
|
|
259
|
+
export)
|
|
260
|
+
COMPREPLY=($(compgen -W "-d --deployment -o --output" -- "$cur"))
|
|
261
|
+
;;
|
|
262
|
+
update|create)
|
|
263
|
+
COMPREPLY=($(compgen -W "-d --deployment --name --email" -- "$cur"))
|
|
264
|
+
;;
|
|
265
|
+
esac
|
|
266
|
+
return
|
|
267
|
+
;;
|
|
268
|
+
spaces)
|
|
269
|
+
case ${COMP_WORDS[2]} in
|
|
270
|
+
list)
|
|
271
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format -l --limit --status" -- "$cur"))
|
|
272
|
+
;;
|
|
273
|
+
create)
|
|
274
|
+
COMPREPLY=($(compgen -W "-d --deployment --name --type" -- "$cur"))
|
|
275
|
+
;;
|
|
276
|
+
get|stats|participants|archive|reactivate)
|
|
277
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format" -- "$cur"))
|
|
278
|
+
;;
|
|
279
|
+
delete)
|
|
280
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes --cascade" -- "$cur"))
|
|
281
|
+
;;
|
|
282
|
+
add-participant|remove-participant)
|
|
283
|
+
COMPREPLY=($(compgen -W "-d --deployment --user" -- "$cur"))
|
|
284
|
+
;;
|
|
285
|
+
update)
|
|
286
|
+
COMPREPLY=($(compgen -W "-d --deployment --name --status" -- "$cur"))
|
|
287
|
+
;;
|
|
288
|
+
count)
|
|
289
|
+
COMPREPLY=($(compgen -W "-d --deployment --status" -- "$cur"))
|
|
290
|
+
;;
|
|
291
|
+
search)
|
|
292
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format" -- "$cur"))
|
|
293
|
+
;;
|
|
294
|
+
esac
|
|
295
|
+
return
|
|
296
|
+
;;
|
|
297
|
+
conversations|convs)
|
|
298
|
+
case ${COMP_WORDS[2]} in
|
|
299
|
+
list)
|
|
300
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format -l --limit -s --space" -- "$cur"))
|
|
301
|
+
;;
|
|
302
|
+
get|messages)
|
|
303
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format" -- "$cur"))
|
|
304
|
+
;;
|
|
305
|
+
delete)
|
|
306
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes" -- "$cur"))
|
|
307
|
+
;;
|
|
308
|
+
export)
|
|
309
|
+
COMPREPLY=($(compgen -W "-d --deployment -o --output" -- "$cur"))
|
|
310
|
+
;;
|
|
311
|
+
count)
|
|
312
|
+
COMPREPLY=($(compgen -W "-d --deployment -s --space" -- "$cur"))
|
|
313
|
+
;;
|
|
314
|
+
clear)
|
|
315
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes -s --space" -- "$cur"))
|
|
316
|
+
;;
|
|
317
|
+
esac
|
|
318
|
+
return
|
|
319
|
+
;;
|
|
320
|
+
memory)
|
|
321
|
+
case ${COMP_WORDS[2]} in
|
|
322
|
+
list|stats)
|
|
323
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format -s --space -l --limit" -- "$cur"))
|
|
324
|
+
;;
|
|
325
|
+
search)
|
|
326
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format -s --space -l --limit" -- "$cur"))
|
|
327
|
+
;;
|
|
328
|
+
get|archive|restore)
|
|
329
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format" -- "$cur"))
|
|
330
|
+
;;
|
|
331
|
+
delete)
|
|
332
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes" -- "$cur"))
|
|
333
|
+
;;
|
|
334
|
+
clear)
|
|
335
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes -s --space" -- "$cur"))
|
|
336
|
+
;;
|
|
337
|
+
export)
|
|
338
|
+
COMPREPLY=($(compgen -W "-d --deployment -s --space -o --output" -- "$cur"))
|
|
339
|
+
;;
|
|
340
|
+
esac
|
|
341
|
+
return
|
|
342
|
+
;;
|
|
343
|
+
facts)
|
|
344
|
+
case ${COMP_WORDS[2]} in
|
|
345
|
+
list)
|
|
346
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format -s --space -l --limit -t --type" -- "$cur"))
|
|
347
|
+
;;
|
|
348
|
+
search)
|
|
349
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format -s --space" -- "$cur"))
|
|
350
|
+
;;
|
|
351
|
+
get)
|
|
352
|
+
COMPREPLY=($(compgen -W "-d --deployment -f --format" -- "$cur"))
|
|
353
|
+
;;
|
|
354
|
+
delete)
|
|
355
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes" -- "$cur"))
|
|
356
|
+
;;
|
|
357
|
+
export)
|
|
358
|
+
COMPREPLY=($(compgen -W "-d --deployment -s --space -o --output" -- "$cur"))
|
|
359
|
+
;;
|
|
360
|
+
count)
|
|
361
|
+
COMPREPLY=($(compgen -W "-d --deployment -s --space" -- "$cur"))
|
|
362
|
+
;;
|
|
363
|
+
clear)
|
|
364
|
+
COMPREPLY=($(compgen -W "-d --deployment -y --yes -s --space" -- "$cur"))
|
|
365
|
+
;;
|
|
366
|
+
esac
|
|
367
|
+
return
|
|
368
|
+
;;
|
|
369
|
+
convex)
|
|
370
|
+
COMPREPLY=($(compgen -W "-d --deployment" -- "$cur"))
|
|
371
|
+
return
|
|
372
|
+
;;
|
|
373
|
+
esac
|
|
374
|
+
|
|
375
|
+
# Default: global options
|
|
376
|
+
COMPREPLY=($(compgen -W "-d --deployment --debug -V --version -h --help" -- "$cur"))
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
complete -F _cortex cortex
|