@octen.ai/cli 0.1.11 → 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/README.md CHANGED
@@ -8,6 +8,12 @@ Command-line tool for Octen — web search, extract, chat, embeddings, and one-c
8
8
  npm i -g @octen.ai/cli
9
9
  ```
10
10
 
11
+ Then enable tab-completion (one-time; `bash` / `zsh` / `fish`):
12
+
13
+ ```sh
14
+ octen completion zsh --install # writes to ~/.zshrc — then: source ~/.zshrc
15
+ ```
16
+
11
17
  Or run without installing:
12
18
 
13
19
  ```sh
@@ -69,8 +69,18 @@ function bashScript(model) {
69
69
  }
70
70
  function zshScript(model) {
71
71
  // Reuse the bash function through zsh's bashcompinit shim. This is reliable
72
- // and stays in sync with the bash implementation.
73
- return `#compdef octen\n# octen zsh completion. Source via: eval "$(octen completion zsh)"\nif ! whence -w bashcompinit >/dev/null 2>&1; then\n autoload -Uz bashcompinit\nfi\nbashcompinit\n${bashFunction(model)}\n`;
72
+ // and stays in sync with the bash implementation. bashcompinit depends on the
73
+ // zsh completion system, so initialize compinit first if the user's shell
74
+ // hasn't already (makes a bare `source`/`eval` work without extra setup).
75
+ const preamble = [
76
+ "#compdef octen",
77
+ '# octen zsh completion. Source via: eval "$(octen completion zsh)"',
78
+ "if ! whence compdef >/dev/null 2>&1; then",
79
+ " autoload -Uz compinit && compinit -u",
80
+ "fi",
81
+ "autoload -Uz bashcompinit && bashcompinit",
82
+ ].join("\n");
83
+ return `${preamble}\n${bashFunction(model)}\n`;
74
84
  }
75
85
  /** Strip leading dashes for fish's `-l`/`-s` which want bare names. */
76
86
  function fishFlagArgs(flags) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octen.ai/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Command-line tool for Octen — web search, extract, chat, embeddings, and one-command MCP/Skills setup.",
5
5
  "type": "module",
6
6
  "license": "MIT",