hoolix 0.0.1-beta.19
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/LICENSE +21 -0
- package/README.md +337 -0
- package/STABILITY.md +109 -0
- package/bin/hoolix.js +50 -0
- package/bin/mcp-portal.js +12 -0
- package/bin/postinstall.js +61 -0
- package/dist/app/contracts.d.ts +105 -0
- package/dist/app/contracts.d.ts.map +1 -0
- package/dist/app/contracts.js +2 -0
- package/dist/app/contracts.js.map +1 -0
- package/dist/app/events.d.ts +13 -0
- package/dist/app/events.d.ts.map +1 -0
- package/dist/app/events.js +13 -0
- package/dist/app/events.js.map +1 -0
- package/dist/app/services/analytics.d.ts +42 -0
- package/dist/app/services/analytics.d.ts.map +1 -0
- package/dist/app/services/analytics.js +106 -0
- package/dist/app/services/analytics.js.map +1 -0
- package/dist/app/services/catalog.d.ts +14 -0
- package/dist/app/services/catalog.d.ts.map +1 -0
- package/dist/app/services/catalog.js +26 -0
- package/dist/app/services/catalog.js.map +1 -0
- package/dist/app/services/credentials.d.ts +42 -0
- package/dist/app/services/credentials.d.ts.map +1 -0
- package/dist/app/services/credentials.js +143 -0
- package/dist/app/services/credentials.js.map +1 -0
- package/dist/app/services/servers.d.ts +15 -0
- package/dist/app/services/servers.d.ts.map +1 -0
- package/dist/app/services/servers.js +445 -0
- package/dist/app/services/servers.js.map +1 -0
- package/dist/catalog/community.d.ts +19 -0
- package/dist/catalog/community.d.ts.map +1 -0
- package/dist/catalog/community.js +53 -0
- package/dist/catalog/community.js.map +1 -0
- package/dist/catalog/templates.d.ts +436 -0
- package/dist/catalog/templates.d.ts.map +1 -0
- package/dist/catalog/templates.js +489 -0
- package/dist/catalog/templates.js.map +1 -0
- package/dist/commands/audit.d.ts +2 -0
- package/dist/commands/audit.d.ts.map +1 -0
- package/dist/commands/audit.js +122 -0
- package/dist/commands/audit.js.map +1 -0
- package/dist/commands/bundle.d.ts +11 -0
- package/dist/commands/bundle.d.ts.map +1 -0
- package/dist/commands/bundle.js +299 -0
- package/dist/commands/bundle.js.map +1 -0
- package/dist/commands/clients.d.ts +6 -0
- package/dist/commands/clients.d.ts.map +1 -0
- package/dist/commands/clients.js +242 -0
- package/dist/commands/clients.js.map +1 -0
- package/dist/commands/completion.d.ts +18 -0
- package/dist/commands/completion.d.ts.map +1 -0
- package/dist/commands/completion.js +495 -0
- package/dist/commands/completion.js.map +1 -0
- package/dist/commands/connect.d.ts +10 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/connect.js +463 -0
- package/dist/commands/connect.js.map +1 -0
- package/dist/commands/create.d.ts +2 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +607 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/delete.d.ts +2 -0
- package/dist/commands/delete.d.ts.map +1 -0
- package/dist/commands/delete.js +44 -0
- package/dist/commands/delete.js.map +1 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +259 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/export.d.ts +2 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +93 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/gui.d.ts +2 -0
- package/dist/commands/gui.d.ts.map +1 -0
- package/dist/commands/gui.js +19 -0
- package/dist/commands/gui.js.map +1 -0
- package/dist/commands/import.d.ts +2 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +102 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/info.d.ts +2 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +151 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +90 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/reindex.d.ts +2 -0
- package/dist/commands/reindex.d.ts.map +1 -0
- package/dist/commands/reindex.js +186 -0
- package/dist/commands/reindex.js.map +1 -0
- package/dist/commands/rotate.d.ts +2 -0
- package/dist/commands/rotate.d.ts.map +1 -0
- package/dist/commands/rotate.js +67 -0
- package/dist/commands/rotate.js.map +1 -0
- package/dist/commands/secrets.d.ts +10 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +293 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/commands/start.d.ts +2 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +234 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/stats.d.ts +2 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +220 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/stop.d.ts +2 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +24 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands/templates.d.ts +2 -0
- package/dist/commands/templates.d.ts.map +1 -0
- package/dist/commands/templates.js +168 -0
- package/dist/commands/templates.js.map +1 -0
- package/dist/commands/trial.d.ts +2 -0
- package/dist/commands/trial.d.ts.map +1 -0
- package/dist/commands/trial.js +61 -0
- package/dist/commands/trial.js.map +1 -0
- package/dist/commands/uninstall.d.ts +2 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +114 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +104 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/verify.d.ts +2 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +301 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/core/config.d.ts +25 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +54 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.d.ts +25 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +53 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/logger.d.ts +3 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +12 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/paths.d.ts +15 -0
- package/dist/core/paths.d.ts.map +1 -0
- package/dist/core/paths.js +51 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/registry.d.ts +474 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +186 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/updater.d.ts +16 -0
- package/dist/core/updater.d.ts.map +1 -0
- package/dist/core/updater.js +317 -0
- package/dist/core/updater.js.map +1 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +3 -0
- package/dist/core/version.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +270 -0
- package/dist/index.js.map +1 -0
- package/dist/ingestion/chunker.d.ts +13 -0
- package/dist/ingestion/chunker.d.ts.map +1 -0
- package/dist/ingestion/chunker.js +107 -0
- package/dist/ingestion/chunker.js.map +1 -0
- package/dist/ingestion/cleaners.d.ts +10 -0
- package/dist/ingestion/cleaners.d.ts.map +1 -0
- package/dist/ingestion/cleaners.js +61 -0
- package/dist/ingestion/cleaners.js.map +1 -0
- package/dist/ingestion/detectors.d.ts +5 -0
- package/dist/ingestion/detectors.d.ts.map +1 -0
- package/dist/ingestion/detectors.js +25 -0
- package/dist/ingestion/detectors.js.map +1 -0
- package/dist/ingestion/fetchers.d.ts +38 -0
- package/dist/ingestion/fetchers.d.ts.map +1 -0
- package/dist/ingestion/fetchers.js +296 -0
- package/dist/ingestion/fetchers.js.map +1 -0
- package/dist/ingestion/github.d.ts +60 -0
- package/dist/ingestion/github.d.ts.map +1 -0
- package/dist/ingestion/github.js +314 -0
- package/dist/ingestion/github.js.map +1 -0
- package/dist/ingestion/pipeline.d.ts +3 -0
- package/dist/ingestion/pipeline.d.ts.map +1 -0
- package/dist/ingestion/pipeline.js +160 -0
- package/dist/ingestion/pipeline.js.map +1 -0
- package/dist/ingestion/types.d.ts +51 -0
- package/dist/ingestion/types.d.ts.map +1 -0
- package/dist/ingestion/types.js +2 -0
- package/dist/ingestion/types.js.map +1 -0
- package/dist/lib/auth.d.ts +2 -0
- package/dist/lib/auth.d.ts.map +1 -0
- package/dist/lib/auth.js +6 -0
- package/dist/lib/auth.js.map +1 -0
- package/dist/lib/embedding.d.ts +10 -0
- package/dist/lib/embedding.d.ts.map +1 -0
- package/dist/lib/embedding.js +21 -0
- package/dist/lib/embedding.js.map +1 -0
- package/dist/mcp/host.d.ts +16 -0
- package/dist/mcp/host.d.ts.map +1 -0
- package/dist/mcp/host.js +307 -0
- package/dist/mcp/host.js.map +1 -0
- package/dist/mcp/proxy-host.d.ts +25 -0
- package/dist/mcp/proxy-host.d.ts.map +1 -0
- package/dist/mcp/proxy-host.js +393 -0
- package/dist/mcp/proxy-host.js.map +1 -0
- package/dist/mcp/stdio-host.d.ts +19 -0
- package/dist/mcp/stdio-host.d.ts.map +1 -0
- package/dist/mcp/stdio-host.js +175 -0
- package/dist/mcp/stdio-host.js.map +1 -0
- package/dist/process/manager.d.ts +74 -0
- package/dist/process/manager.d.ts.map +1 -0
- package/dist/process/manager.js +322 -0
- package/dist/process/manager.js.map +1 -0
- package/dist/rag/models.d.ts +30 -0
- package/dist/rag/models.d.ts.map +1 -0
- package/dist/rag/models.js +30 -0
- package/dist/rag/models.js.map +1 -0
- package/dist/rag/store.d.ts +63 -0
- package/dist/rag/store.d.ts.map +1 -0
- package/dist/rag/store.js +505 -0
- package/dist/rag/store.js.map +1 -0
- package/dist/rag/types.d.ts +56 -0
- package/dist/rag/types.d.ts.map +1 -0
- package/dist/rag/types.js +2 -0
- package/dist/rag/types.js.map +1 -0
- package/dist/sources/plugins.d.ts +25 -0
- package/dist/sources/plugins.d.ts.map +1 -0
- package/dist/sources/plugins.js +55 -0
- package/dist/sources/plugins.js.map +1 -0
- package/dist/sources/registry.d.ts +19 -0
- package/dist/sources/registry.d.ts.map +1 -0
- package/dist/sources/registry.js +183 -0
- package/dist/sources/registry.js.map +1 -0
- package/dist/sources/types.d.ts +361 -0
- package/dist/sources/types.d.ts.map +1 -0
- package/dist/sources/types.js +59 -0
- package/dist/sources/types.js.map +1 -0
- package/dist/tui/index.d.ts +22 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +711 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/ui/format.d.ts +27 -0
- package/dist/ui/format.d.ts.map +1 -0
- package/dist/ui/format.js +80 -0
- package/dist/ui/format.js.map +1 -0
- package/dist/ui/help.d.ts +2 -0
- package/dist/ui/help.d.ts.map +1 -0
- package/dist/ui/help.js +106 -0
- package/dist/ui/help.js.map +1 -0
- package/dist/web/assets.d.ts +2 -0
- package/dist/web/assets.d.ts.map +1 -0
- package/dist/web/assets.js +659 -0
- package/dist/web/assets.js.map +1 -0
- package/dist/web/server.d.ts +9 -0
- package/dist/web/server.d.ts.map +1 -0
- package/dist/web/server.js +349 -0
- package/dist/web/server.js.map +1 -0
- package/package.json +105 -0
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hoolix completion <shell>
|
|
3
|
+
*
|
|
4
|
+
* Generate shell completion scripts that provide:
|
|
5
|
+
* - Command / subcommand completion
|
|
6
|
+
* - Dynamic server slug completion (via `hoolix list --json`)
|
|
7
|
+
* - Dynamic template ID completion (via `hoolix templates list --json`)
|
|
8
|
+
* - Client ID completion
|
|
9
|
+
* - Flag completion per-command
|
|
10
|
+
*
|
|
11
|
+
* Setup:
|
|
12
|
+
* bash: eval "$(hoolix completion bash)" # add to ~/.bashrc
|
|
13
|
+
* zsh: eval "$(hoolix completion zsh)" # add to ~/.zshrc
|
|
14
|
+
* fish: hoolix completion fish | source
|
|
15
|
+
* powershell: hoolix completion powershell | Invoke-Expression # add to $PROFILE
|
|
16
|
+
*/
|
|
17
|
+
import { logger } from '../core/logger.js';
|
|
18
|
+
import { printTitle, printCommand, printDetails, ui } from '../ui/format.js';
|
|
19
|
+
const SUPPORTED_SHELLS = ['bash', 'zsh', 'fish', 'powershell'];
|
|
20
|
+
const COMMANDS = [
|
|
21
|
+
'create', 'install', 'list', 'info', 'delete',
|
|
22
|
+
'start', 'stop', 'reindex', 'verify', 'rotate',
|
|
23
|
+
'connect', 'clients', 'client', 'secrets', 'trial',
|
|
24
|
+
'stats', 'audit', 'export', 'import', 'bundle',
|
|
25
|
+
'doctor', 'update', 'uninstall', 'gui',
|
|
26
|
+
'templates', 'completion', 'version', 'help',
|
|
27
|
+
];
|
|
28
|
+
const CLIENTS = [
|
|
29
|
+
'claude', 'claude-code', 'cursor', 'vscode', 'windsurf',
|
|
30
|
+
'continue', 'cline', 'codex', 'grokbuild', 'generic',
|
|
31
|
+
];
|
|
32
|
+
const SLUG_COMMANDS = [
|
|
33
|
+
'info', 'delete', 'start', 'stop', 'reindex',
|
|
34
|
+
'verify', 'rotate', 'connect', 'export', 'audit', 'stats',
|
|
35
|
+
];
|
|
36
|
+
// ── Script generators ─────────────────────────────────────────────────────────
|
|
37
|
+
// NOTE: Shell `${var}` references MUST be written as `\${var}` inside TypeScript
|
|
38
|
+
// template literals to prevent TypeScript from treating them as interpolations.
|
|
39
|
+
// Plain `$var` (no braces) is fine as-is.
|
|
40
|
+
function bashCompletion() {
|
|
41
|
+
const cmds = COMMANDS.join(' ');
|
|
42
|
+
const clients = CLIENTS.join(' ');
|
|
43
|
+
const slugCmdCase = SLUG_COMMANDS.join('|');
|
|
44
|
+
// shellcheck: ignore SC2207 — intentional word-splitting for completion
|
|
45
|
+
return `# hoolix bash completion — generated by \`hoolix completion bash\`
|
|
46
|
+
# Add to ~/.bashrc or ~/.bash_profile:
|
|
47
|
+
# eval "$(hoolix completion bash)"
|
|
48
|
+
|
|
49
|
+
_hoolix_get_slugs() {
|
|
50
|
+
hoolix list --json 2>/dev/null | grep '"slug"' | sed 's/.*"slug": *"\\([^"]*\\)".*/\\1/'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
_hoolix_get_templates() {
|
|
54
|
+
hoolix templates list --json 2>/dev/null | grep '"id"' | sed 's/.*"id": *"\\([^"]*\\)".*/\\1/'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
_hoolix_completions() {
|
|
58
|
+
local cur prev first
|
|
59
|
+
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
60
|
+
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
61
|
+
first="\${COMP_WORDS[1]}"
|
|
62
|
+
|
|
63
|
+
# First argument: top-level commands
|
|
64
|
+
if [[ $COMP_CWORD -eq 1 ]]; then
|
|
65
|
+
COMPREPLY=($(compgen -W "${cmds}" -- "$cur"))
|
|
66
|
+
return 0
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
# --client flag value
|
|
70
|
+
if [[ "$prev" == "--client" ]]; then
|
|
71
|
+
COMPREPLY=($(compgen -W "${clients}" -- "$cur"))
|
|
72
|
+
return 0
|
|
73
|
+
fi
|
|
74
|
+
|
|
75
|
+
# Shell names after \`completion\`
|
|
76
|
+
if [[ "$first" == "completion" && $COMP_CWORD -eq 2 ]]; then
|
|
77
|
+
COMPREPLY=($(compgen -W "bash zsh fish powershell" -- "$cur"))
|
|
78
|
+
return 0
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# Subcommands
|
|
82
|
+
case "$first" in
|
|
83
|
+
secrets)
|
|
84
|
+
if [[ $COMP_CWORD -eq 2 ]]; then
|
|
85
|
+
COMPREPLY=($(compgen -W "list set remove" -- "$cur"))
|
|
86
|
+
return 0
|
|
87
|
+
elif [[ $COMP_CWORD -eq 3 ]]; then
|
|
88
|
+
COMPREPLY=($(compgen -W "$(_hoolix_get_slugs)" -- "$cur"))
|
|
89
|
+
return 0
|
|
90
|
+
fi
|
|
91
|
+
;;
|
|
92
|
+
bundle)
|
|
93
|
+
if [[ $COMP_CWORD -eq 2 ]]; then
|
|
94
|
+
COMPREPLY=($(compgen -W "export import" -- "$cur"))
|
|
95
|
+
return 0
|
|
96
|
+
fi
|
|
97
|
+
;;
|
|
98
|
+
clients)
|
|
99
|
+
if [[ $COMP_CWORD -eq 2 ]]; then
|
|
100
|
+
COMPREPLY=($(compgen -W "list" -- "$cur"))
|
|
101
|
+
return 0
|
|
102
|
+
fi
|
|
103
|
+
;;
|
|
104
|
+
client)
|
|
105
|
+
if [[ $COMP_CWORD -eq 2 ]]; then
|
|
106
|
+
COMPREPLY=($(compgen -W "status" -- "$cur"))
|
|
107
|
+
return 0
|
|
108
|
+
fi
|
|
109
|
+
;;
|
|
110
|
+
templates)
|
|
111
|
+
if [[ $COMP_CWORD -eq 2 ]]; then
|
|
112
|
+
COMPREPLY=($(compgen -W "list info" -- "$cur"))
|
|
113
|
+
return 0
|
|
114
|
+
elif [[ $COMP_CWORD -eq 3 && "\${COMP_WORDS[2]}" == "info" ]]; then
|
|
115
|
+
COMPREPLY=($(compgen -W "$(_hoolix_get_templates)" -- "$cur"))
|
|
116
|
+
return 0
|
|
117
|
+
fi
|
|
118
|
+
;;
|
|
119
|
+
install)
|
|
120
|
+
if [[ $COMP_CWORD -eq 2 ]]; then
|
|
121
|
+
COMPREPLY=($(compgen -W "$(_hoolix_get_templates)" -- "$cur"))
|
|
122
|
+
return 0
|
|
123
|
+
fi
|
|
124
|
+
;;
|
|
125
|
+
esac
|
|
126
|
+
|
|
127
|
+
# Slug-requiring commands: complete server slugs at position 2
|
|
128
|
+
case "$first" in
|
|
129
|
+
${slugCmdCase})
|
|
130
|
+
if [[ $COMP_CWORD -eq 2 ]]; then
|
|
131
|
+
COMPREPLY=($(compgen -W "$(_hoolix_get_slugs)" -- "$cur"))
|
|
132
|
+
return 0
|
|
133
|
+
fi
|
|
134
|
+
;;
|
|
135
|
+
esac
|
|
136
|
+
|
|
137
|
+
# Per-command flag completion
|
|
138
|
+
case "$first" in
|
|
139
|
+
start) COMPREPLY=($(compgen -W "--port --transport --proxy --json" -- "$cur")) ;;
|
|
140
|
+
connect) COMPREPLY=($(compgen -W "--client --dry-run --yes --json" -- "$cur")) ;;
|
|
141
|
+
create) COMPREPLY=($(compgen -W "--url --template --source --input --credential --name --yes --json" -- "$cur")) ;;
|
|
142
|
+
install) COMPREPLY=($(compgen -W "--name --input --credential --yes" -- "$cur")) ;;
|
|
143
|
+
export) COMPREPLY=($(compgen -W "--file --team --strip-key --json" -- "$cur")) ;;
|
|
144
|
+
import) COMPREPLY=($(compgen -W "--file --slug --yes --json" -- "$cur")) ;;
|
|
145
|
+
bundle) COMPREPLY=($(compgen -W "--output --all --yes --json" -- "$cur")) ;;
|
|
146
|
+
reindex) COMPREPLY=($(compgen -W "--force --schedule --due --json" -- "$cur")) ;;
|
|
147
|
+
stats) COMPREPLY=($(compgen -W "--days --json" -- "$cur")) ;;
|
|
148
|
+
audit) COMPREPLY=($(compgen -W "--limit --tool --since --json" -- "$cur")) ;;
|
|
149
|
+
delete) COMPREPLY=($(compgen -W "--yes --json" -- "$cur")) ;;
|
|
150
|
+
*) COMPREPLY=($(compgen -W "--json --yes --help" -- "$cur")) ;;
|
|
151
|
+
esac
|
|
152
|
+
return 0
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
complete -F _hoolix_completions hoolix
|
|
156
|
+
`;
|
|
157
|
+
}
|
|
158
|
+
function zshCompletion() {
|
|
159
|
+
const clients = CLIENTS.join(' ');
|
|
160
|
+
// In zsh, we use $(hoolix ...) subshell + word splitting (IDs/slugs have no spaces)
|
|
161
|
+
return `#compdef hoolix
|
|
162
|
+
# hoolix zsh completion — generated by \`hoolix completion zsh\`
|
|
163
|
+
# Add to ~/.zshrc:
|
|
164
|
+
# eval "$(hoolix completion zsh)"
|
|
165
|
+
|
|
166
|
+
_hoolix_slugs() {
|
|
167
|
+
hoolix list --json 2>/dev/null | grep '"slug"' | sed 's/.*"slug": *"\\([^"]*\\)".*/\\1/'
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
_hoolix_templates() {
|
|
171
|
+
hoolix templates list --json 2>/dev/null | grep '"id"' | sed 's/.*"id": *"\\([^"]*\\)".*/\\1/'
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
_hoolix() {
|
|
175
|
+
local state
|
|
176
|
+
local -a commands
|
|
177
|
+
|
|
178
|
+
commands=(
|
|
179
|
+
'create:Create from URL, source, or template'
|
|
180
|
+
'install:Install from a template (positional syntax)'
|
|
181
|
+
'list:List registered MCP servers'
|
|
182
|
+
'info:Show server details and status'
|
|
183
|
+
'delete:Delete a server and its data'
|
|
184
|
+
'start:Start MCP hosting (--proxy for mcp-server)'
|
|
185
|
+
'stop:Stop a running server'
|
|
186
|
+
'reindex:Refresh sources and rebuild RAG index'
|
|
187
|
+
'verify:Check health and retrieval quality'
|
|
188
|
+
'rotate:Rotate the Bearer auth key'
|
|
189
|
+
'connect:Wire into an AI client'
|
|
190
|
+
'clients:Client management (list)'
|
|
191
|
+
'client:Client management (status)'
|
|
192
|
+
'secrets:Credential management (list|set|remove)'
|
|
193
|
+
'bundle:Multi-server bundle export/import'
|
|
194
|
+
'trial:One-click demo server'
|
|
195
|
+
'stats:Analytics dashboard'
|
|
196
|
+
'audit:Query raw audit log'
|
|
197
|
+
'export:Export a .hoolix.json bundle'
|
|
198
|
+
'import:Import a .hoolix.json bundle'
|
|
199
|
+
'doctor:Diagnose installation and runtime'
|
|
200
|
+
'update:Check for and install updates'
|
|
201
|
+
'uninstall:Remove hoolix and all data'
|
|
202
|
+
'gui:Launch the local web dashboard'
|
|
203
|
+
'templates:Browse templates (list|info)'
|
|
204
|
+
'completion:Generate shell completion script'
|
|
205
|
+
'version:Print the current version'
|
|
206
|
+
'help:Show help'
|
|
207
|
+
)
|
|
208
|
+
|
|
209
|
+
_arguments -C \\
|
|
210
|
+
'(-h --help)'{-h,--help}'[Show help]' \\
|
|
211
|
+
'(-v --version)'{-v,--version}'[Show version]' \\
|
|
212
|
+
'--json[Output JSON]' \\
|
|
213
|
+
'1: :->command' \\
|
|
214
|
+
'*:: :->args'
|
|
215
|
+
|
|
216
|
+
case $state in
|
|
217
|
+
command)
|
|
218
|
+
_describe 'command' commands
|
|
219
|
+
;;
|
|
220
|
+
args)
|
|
221
|
+
local -a slugs templates subcmds
|
|
222
|
+
case $words[1] in
|
|
223
|
+
install)
|
|
224
|
+
if [[ $CURRENT -eq 2 ]]; then
|
|
225
|
+
templates=($(hoolix templates list --json 2>/dev/null | grep '"id"' | sed 's/.*"id": *"\\([^"]*\\)".*/\\1/'))
|
|
226
|
+
_describe 'template ID' templates
|
|
227
|
+
fi
|
|
228
|
+
;;
|
|
229
|
+
info|delete|start|stop|reindex|verify|rotate|connect|export|audit|stats)
|
|
230
|
+
if [[ $CURRENT -eq 2 ]]; then
|
|
231
|
+
slugs=($(hoolix list --json 2>/dev/null | grep '"slug"' | sed 's/.*"slug": *"\\([^"]*\\)".*/\\1/'))
|
|
232
|
+
_describe 'server slug' slugs
|
|
233
|
+
fi
|
|
234
|
+
if [[ $words[1] == connect ]]; then
|
|
235
|
+
_arguments \\
|
|
236
|
+
'--client=[Client to configure]:client:(${clients})' \\
|
|
237
|
+
'--dry-run[Preview without writing]' \\
|
|
238
|
+
'--yes[Skip confirmation]' \\
|
|
239
|
+
'--json[JSON output]'
|
|
240
|
+
fi
|
|
241
|
+
if [[ $words[1] == start ]]; then
|
|
242
|
+
_arguments \\
|
|
243
|
+
'--port=[Port number]:port' \\
|
|
244
|
+
'--transport=[Transport]:transport:(http stdio)' \\
|
|
245
|
+
'--proxy[Wrap behind HTTP (mcp-server kind)]' \\
|
|
246
|
+
'--json[JSON output]'
|
|
247
|
+
fi
|
|
248
|
+
;;
|
|
249
|
+
templates)
|
|
250
|
+
if [[ $CURRENT -eq 2 ]]; then
|
|
251
|
+
subcmds=('list:List all templates' 'info:Show template details')
|
|
252
|
+
_describe 'subcommand' subcmds
|
|
253
|
+
elif [[ $CURRENT -eq 3 && $words[2] == info ]]; then
|
|
254
|
+
templates=($(hoolix templates list --json 2>/dev/null | grep '"id"' | sed 's/.*"id": *"\\([^"]*\\)".*/\\1/'))
|
|
255
|
+
_describe 'template ID' templates
|
|
256
|
+
fi
|
|
257
|
+
;;
|
|
258
|
+
secrets)
|
|
259
|
+
if [[ $CURRENT -eq 2 ]]; then
|
|
260
|
+
subcmds=('list:Show credential keys' 'set:Add or rotate a credential' 'remove:Delete a credential')
|
|
261
|
+
_describe 'subcommand' subcmds
|
|
262
|
+
elif [[ $CURRENT -eq 3 ]]; then
|
|
263
|
+
slugs=($(hoolix list --json 2>/dev/null | grep '"slug"' | sed 's/.*"slug": *"\\([^"]*\\)".*/\\1/'))
|
|
264
|
+
_describe 'server slug' slugs
|
|
265
|
+
fi
|
|
266
|
+
;;
|
|
267
|
+
bundle)
|
|
268
|
+
if [[ $CURRENT -eq 2 ]]; then
|
|
269
|
+
subcmds=('export:Export multiple servers' 'import:Import a bundle file')
|
|
270
|
+
_describe 'subcommand' subcmds
|
|
271
|
+
fi
|
|
272
|
+
;;
|
|
273
|
+
clients)
|
|
274
|
+
if [[ $CURRENT -eq 2 ]]; then
|
|
275
|
+
_describe 'subcommand' '(list:List supported clients)'
|
|
276
|
+
fi
|
|
277
|
+
;;
|
|
278
|
+
client)
|
|
279
|
+
if [[ $CURRENT -eq 2 ]]; then
|
|
280
|
+
_describe 'subcommand' '(status:Show wired servers)'
|
|
281
|
+
fi
|
|
282
|
+
;;
|
|
283
|
+
completion)
|
|
284
|
+
if [[ $CURRENT -eq 2 ]]; then
|
|
285
|
+
_describe 'shell' '(bash:Bash zsh:Zsh fish:Fish powershell:PowerShell)'
|
|
286
|
+
fi
|
|
287
|
+
;;
|
|
288
|
+
esac
|
|
289
|
+
;;
|
|
290
|
+
esac
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
_hoolix "$@"
|
|
294
|
+
`;
|
|
295
|
+
}
|
|
296
|
+
function fishCompletion() {
|
|
297
|
+
const cmdList = COMMANDS.map((c) => `complete -c hoolix -n __hoolix_no_subcommand -a ${c}`).join('\n');
|
|
298
|
+
return `# hoolix fish completion — generated by \`hoolix completion fish\`
|
|
299
|
+
# Source with:
|
|
300
|
+
# hoolix completion fish | source
|
|
301
|
+
# Or to persist across sessions:
|
|
302
|
+
# hoolix completion fish > ~/.config/fish/completions/hoolix.fish
|
|
303
|
+
|
|
304
|
+
function __hoolix_slugs
|
|
305
|
+
hoolix list --json 2>/dev/null | string match -r '"slug":\\s*"([^"]+)"' | string replace -r '.*"slug":\\s*"([^"]+)".*' '$1'
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
function __hoolix_templates
|
|
309
|
+
hoolix templates list --json 2>/dev/null | string match -r '"id":\\s*"([^"]+)"' | string replace -r '.*"id":\\s*"([^"]+)".*' '$1'
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
function __hoolix_no_subcommand
|
|
313
|
+
not __fish_seen_subcommand_from ${COMMANDS.join(' ')}
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Disable file completion (hoolix does not complete file paths by default)
|
|
317
|
+
complete -c hoolix -f
|
|
318
|
+
|
|
319
|
+
# Top-level commands
|
|
320
|
+
${cmdList}
|
|
321
|
+
|
|
322
|
+
# Slug-requiring commands
|
|
323
|
+
for cmd in ${SLUG_COMMANDS.join(' ')}
|
|
324
|
+
complete -c hoolix -n "__fish_seen_subcommand_from $cmd; and test (count (commandline -opc)) -eq 2" -a "(__hoolix_slugs)"
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# install: template IDs at position 2
|
|
328
|
+
complete -c hoolix -n "__fish_seen_subcommand_from install; and test (count (commandline -opc)) -eq 2" -a "(__hoolix_templates)"
|
|
329
|
+
|
|
330
|
+
# templates subcommands + info template arg
|
|
331
|
+
complete -c hoolix -n "__fish_seen_subcommand_from templates; and not __fish_seen_subcommand_from list info" -a "list info"
|
|
332
|
+
complete -c hoolix -n "__fish_seen_subcommand_from templates; and __fish_seen_subcommand_from info; and test (count (commandline -opc)) -eq 3" -a "(__hoolix_templates)"
|
|
333
|
+
|
|
334
|
+
# secrets subcommands + slug arg
|
|
335
|
+
complete -c hoolix -n "__fish_seen_subcommand_from secrets; and not __fish_seen_subcommand_from list set remove" -a "list set remove"
|
|
336
|
+
complete -c hoolix -n "__fish_seen_subcommand_from secrets; and __fish_seen_subcommand_from list set remove; and test (count (commandline -opc)) -eq 3" -a "(__hoolix_slugs)"
|
|
337
|
+
|
|
338
|
+
# bundle subcommands
|
|
339
|
+
complete -c hoolix -n "__fish_seen_subcommand_from bundle; and not __fish_seen_subcommand_from export import" -a "export import"
|
|
340
|
+
|
|
341
|
+
# clients / client subcommands
|
|
342
|
+
complete -c hoolix -n "__fish_seen_subcommand_from clients; and not __fish_seen_subcommand_from list" -a list
|
|
343
|
+
complete -c hoolix -n "__fish_seen_subcommand_from client; and not __fish_seen_subcommand_from status" -a status
|
|
344
|
+
|
|
345
|
+
# completion shells
|
|
346
|
+
complete -c hoolix -n "__fish_seen_subcommand_from completion; and test (count (commandline -opc)) -eq 2" -a "bash zsh fish powershell"
|
|
347
|
+
|
|
348
|
+
# Flags per command
|
|
349
|
+
complete -c hoolix -n "__fish_seen_subcommand_from connect" -l client -a "${CLIENTS.join(' ')}" -d "AI client"
|
|
350
|
+
complete -c hoolix -n "__fish_seen_subcommand_from start" -l port -d "Port number"
|
|
351
|
+
complete -c hoolix -n "__fish_seen_subcommand_from start" -l transport -a "http stdio" -d "Transport type"
|
|
352
|
+
complete -c hoolix -n "__fish_seen_subcommand_from start" -l proxy -d "Wrap behind HTTP (mcp-server kind)"
|
|
353
|
+
complete -c hoolix -n "__fish_seen_subcommand_from start" -l json -d "JSON output"
|
|
354
|
+
complete -c hoolix -n "__fish_seen_subcommand_from connect" -l dry-run -d "Preview without writing"
|
|
355
|
+
complete -c hoolix -n "__fish_seen_subcommand_from connect start delete import export bundle" -l yes -d "Skip confirmation"
|
|
356
|
+
complete -c hoolix -n "__fish_seen_subcommand_from create install" -l name -d "Server name"
|
|
357
|
+
complete -c hoolix -n "__fish_seen_subcommand_from create install" -l yes -d "Skip confirmation"
|
|
358
|
+
complete -c hoolix -n "__fish_seen_subcommand_from create" -l url -d "Documentation URL"
|
|
359
|
+
complete -c hoolix -n "__fish_seen_subcommand_from create" -l template -d "Template ID"
|
|
360
|
+
complete -c hoolix -n "__fish_seen_subcommand_from create install" -l input -d "Template input key=value"
|
|
361
|
+
complete -c hoolix -n "__fish_seen_subcommand_from create install" -l credential -d "Credential key=value"
|
|
362
|
+
complete -c hoolix -n "__fish_seen_subcommand_from export" -l file -d "Output file path"
|
|
363
|
+
complete -c hoolix -n "__fish_seen_subcommand_from export" -l team -d "Team bundle (strip embeddings)"
|
|
364
|
+
complete -c hoolix -n "__fish_seen_subcommand_from export" -l strip-key -d "Strip auth key from bundle"
|
|
365
|
+
complete -c hoolix -n "__fish_seen_subcommand_from import" -l file -d "Bundle file path"
|
|
366
|
+
complete -c hoolix -n "__fish_seen_subcommand_from import" -l slug -d "Override slug on import"
|
|
367
|
+
complete -c hoolix -n "__fish_seen_subcommand_from bundle" -l output -d "Output file path"
|
|
368
|
+
complete -c hoolix -n "__fish_seen_subcommand_from bundle" -l all -d "Export all servers"
|
|
369
|
+
complete -c hoolix -n "__fish_seen_subcommand_from reindex" -l force -d "Force full reindex"
|
|
370
|
+
complete -c hoolix -n "__fish_seen_subcommand_from stats" -l days -d "Number of days (default 7)"
|
|
371
|
+
complete -c hoolix -n "__fish_seen_subcommand_from audit" -l limit -d "Max results"
|
|
372
|
+
complete -c hoolix -n "__fish_seen_subcommand_from audit" -l tool -d "Filter by tool name"
|
|
373
|
+
complete -c hoolix -n "__fish_seen_subcommand_from audit" -l since -d "ISO date filter"
|
|
374
|
+
`;
|
|
375
|
+
}
|
|
376
|
+
function powershellCompletion() {
|
|
377
|
+
// Note: PowerShell uses $var and ${var} syntax. In this TypeScript template literal,
|
|
378
|
+
// we only need to escape ${var} forms (with braces) that TypeScript would misparse.
|
|
379
|
+
// PowerShell's $elements, $command, $argCount etc. (no braces) are fine as-is.
|
|
380
|
+
const clients = CLIENTS.map((c) => `'${c}'`).join(',');
|
|
381
|
+
const slugCmds = SLUG_COMMANDS.map((c) => `'${c}'`).join(',');
|
|
382
|
+
return `# hoolix PowerShell completion — generated by \`hoolix completion powershell\`
|
|
383
|
+
# Add to your PowerShell profile (echo $PROFILE to find the path):
|
|
384
|
+
# hoolix completion powershell | Invoke-Expression
|
|
385
|
+
|
|
386
|
+
Register-ArgumentCompleter -Native -CommandName hoolix -ScriptBlock {
|
|
387
|
+
param($wordToComplete, $commandAst, $cursorPosition)
|
|
388
|
+
|
|
389
|
+
$elements = $commandAst.CommandElements
|
|
390
|
+
$command = if ($elements.Count -ge 2) { $elements[1].ToString() } else { '' }
|
|
391
|
+
$argCount = $elements.Count
|
|
392
|
+
$prevArg = if ($argCount -ge 2) { $elements[$argCount - 2].ToString() } else { '' }
|
|
393
|
+
|
|
394
|
+
$allCommands = @(${COMMANDS.map((c) => `'${c}'`).join(',')})
|
|
395
|
+
$slugCmds = @(${slugCmds})
|
|
396
|
+
$clients = @(${clients})
|
|
397
|
+
|
|
398
|
+
function Complete-Words([string[]]$words) {
|
|
399
|
+
$words | Where-Object { $_ -like "$wordToComplete*" } |
|
|
400
|
+
ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
function Get-HoolixSlugs {
|
|
404
|
+
try {
|
|
405
|
+
$json = (hoolix list --json 2>$null) -join ''
|
|
406
|
+
[regex]::Matches($json, '"slug"\\s*:\\s*"([^"]+)"') | ForEach-Object { $_.Groups[1].Value }
|
|
407
|
+
} catch {}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
function Get-HoolixTemplates {
|
|
411
|
+
try {
|
|
412
|
+
$json = (hoolix templates list --json 2>$null) -join ''
|
|
413
|
+
[regex]::Matches($json, '"id"\\s*:\\s*"([^"]+)"') | ForEach-Object { $_.Groups[1].Value }
|
|
414
|
+
} catch {}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
# First argument: top-level commands
|
|
418
|
+
if ($argCount -le 2) { return Complete-Words $allCommands }
|
|
419
|
+
|
|
420
|
+
# --client flag value
|
|
421
|
+
if ($prevArg -eq '--client') { return Complete-Words $clients }
|
|
422
|
+
|
|
423
|
+
switch ($command) {
|
|
424
|
+
'install' {
|
|
425
|
+
if ($argCount -eq 3) { return Complete-Words (Get-HoolixTemplates) }
|
|
426
|
+
}
|
|
427
|
+
{ $slugCmds -contains $_ } {
|
|
428
|
+
if ($argCount -eq 3) { return Complete-Words (Get-HoolixSlugs) }
|
|
429
|
+
if ($_ -eq 'connect' -and $prevArg -eq '--client') { return Complete-Words $clients }
|
|
430
|
+
}
|
|
431
|
+
'templates' {
|
|
432
|
+
if ($argCount -eq 3) { return Complete-Words @('list','info') }
|
|
433
|
+
if ($argCount -eq 4 -and $elements[2].ToString() -eq 'info') { return Complete-Words (Get-HoolixTemplates) }
|
|
434
|
+
}
|
|
435
|
+
'secrets' {
|
|
436
|
+
if ($argCount -eq 3) { return Complete-Words @('list','set','remove') }
|
|
437
|
+
if ($argCount -eq 4) { return Complete-Words (Get-HoolixSlugs) }
|
|
438
|
+
}
|
|
439
|
+
'bundle' {
|
|
440
|
+
if ($argCount -eq 3) { return Complete-Words @('export','import') }
|
|
441
|
+
}
|
|
442
|
+
'clients' { if ($argCount -eq 3) { return Complete-Words @('list') } }
|
|
443
|
+
'client' { if ($argCount -eq 3) { return Complete-Words @('status') } }
|
|
444
|
+
'completion' { if ($argCount -eq 3) { return Complete-Words @('bash','zsh','fish','powershell') } }
|
|
445
|
+
'start' { return Complete-Words @('--port','--transport','--proxy','--json') }
|
|
446
|
+
'connect' { return Complete-Words @('--client','--dry-run','--yes','--json') }
|
|
447
|
+
'create' { return Complete-Words @('--url','--template','--source','--input','--credential','--name','--yes','--json') }
|
|
448
|
+
'export' { return Complete-Words @('--file','--team','--strip-key','--json') }
|
|
449
|
+
'import' { return Complete-Words @('--file','--slug','--yes','--json') }
|
|
450
|
+
'bundle' { return Complete-Words @('--output','--all','--yes','--json') }
|
|
451
|
+
default { return Complete-Words @('--json','--yes','--help') }
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
`;
|
|
455
|
+
}
|
|
456
|
+
// ── Command ───────────────────────────────────────────────────────────────────
|
|
457
|
+
export async function cmdCompletion(args) {
|
|
458
|
+
const shell = args[1]?.toLowerCase();
|
|
459
|
+
if (!shell || !SUPPORTED_SHELLS.includes(shell)) {
|
|
460
|
+
printTitle('Shell completions', 'Generate a tab-completion script for your shell.');
|
|
461
|
+
printDetails([
|
|
462
|
+
['Supported', SUPPORTED_SHELLS.join(', ')],
|
|
463
|
+
]);
|
|
464
|
+
console.log('');
|
|
465
|
+
console.log(` ${ui.muted('Setup (add to your shell rc file):')}`);
|
|
466
|
+
console.log(` ${ui.muted('bash:')} eval "$(hoolix completion bash)"`);
|
|
467
|
+
console.log(` ${ui.muted('zsh:')} eval "$(hoolix completion zsh)"`);
|
|
468
|
+
console.log(` ${ui.muted('fish:')} hoolix completion fish | source`);
|
|
469
|
+
console.log(` ${ui.muted('powershell:')} hoolix completion powershell | Invoke-Expression`);
|
|
470
|
+
console.log('');
|
|
471
|
+
console.log(` ${ui.muted('To persist fish completions:')}`);
|
|
472
|
+
printCommand('hoolix completion fish > ~/.config/fish/completions/hoolix.fish');
|
|
473
|
+
console.log('');
|
|
474
|
+
if (shell) {
|
|
475
|
+
logger.error(`Unsupported shell: "${shell}". Choose one of: ${SUPPORTED_SHELLS.join(', ')}`);
|
|
476
|
+
process.exit(1);
|
|
477
|
+
}
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
switch (shell) {
|
|
481
|
+
case 'bash':
|
|
482
|
+
process.stdout.write(bashCompletion());
|
|
483
|
+
break;
|
|
484
|
+
case 'zsh':
|
|
485
|
+
process.stdout.write(zshCompletion());
|
|
486
|
+
break;
|
|
487
|
+
case 'fish':
|
|
488
|
+
process.stdout.write(fishCompletion());
|
|
489
|
+
break;
|
|
490
|
+
case 'powershell':
|
|
491
|
+
process.stdout.write(powershellCompletion());
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
//# sourceMappingURL=completion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"completion.js","sourceRoot":"","sources":["../../src/commands/completion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAE7E,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC;AAGxE,MAAM,QAAQ,GAAG;IACf,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ;IAC7C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ;IAC9C,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO;IAClD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ;IAC9C,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK;IACtC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM;CAC7C,CAAC;AAEF,MAAM,OAAO,GAAG;IACd,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU;IACvD,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS;CACrD,CAAC;AAEF,MAAM,aAAa,GAAG;IACpB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS;IAC5C,QAAQ,EAAE,QAAQ,EA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
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ClientId = 'claude' | 'claude-code' | 'cursor' | 'vscode' | 'windsurf' | 'continue' | 'cline' | 'codex' | 'grokbuild' | 'generic';
|
|
2
|
+
export declare const ALL_CLIENTS: ClientId[];
|
|
3
|
+
export declare function getConfigPath(client: ClientId, { projectCwd }?: {
|
|
4
|
+
projectCwd?: string;
|
|
5
|
+
}): string | null;
|
|
6
|
+
export declare function detectPreferredClient(): ClientId;
|
|
7
|
+
export declare function copyToClipboard(text: string): boolean;
|
|
8
|
+
export declare function getClientSteps(client: ClientId, transport?: 'stdio' | 'http'): string[];
|
|
9
|
+
export declare function cmdConnect(args: string[], json: boolean): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=connect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":"AAkBA,MAAM,MAAM,QAAQ,GAChB,QAAQ,GACR,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,UAAU,GACV,OAAO,GACP,OAAO,GACP,WAAW,GACX,SAAS,CAAC;AAEd,eAAO,MAAM,WAAW,EAAE,QAAQ,EAGjC,CAAC;AAQF,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,MAAM,GAAG,IAAI,CAmC3G;AAED,wBAAgB,qBAAqB,IAAI,QAAQ,CAYhD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAmBrD;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,GAAE,OAAO,GAAG,MAAe,GAAG,MAAM,EAAE,CAgE/F;AA0FD,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAoP7E"}
|