@akon-labs/nexus-cli 0.1.3 → 0.1.5

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.
Files changed (186) hide show
  1. package/CHANGELOG.md +19 -5323
  2. package/README.md +29 -24
  3. package/dist/cli/require-login.d.ts.map +1 -1
  4. package/dist/cli/require-login.js +1 -1
  5. package/dist/cli/require-login.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +33244 -30352
  8. package/dist/cli.js.map +1 -1
  9. package/dist/config.d.ts.map +1 -1
  10. package/dist/config.js +1 -1
  11. package/dist/config.js.map +1 -1
  12. package/dist/core/auth-guidance.d.ts.map +1 -1
  13. package/dist/core/auth-guidance.js +2 -3
  14. package/dist/core/auth-guidance.js.map +1 -1
  15. package/dist/core/extensions/loader.d.ts.map +1 -1
  16. package/dist/core/extensions/loader.js +18 -63
  17. package/dist/core/extensions/loader.js.map +1 -1
  18. package/dist/core/models-dev-catalog.d.ts.map +1 -1
  19. package/dist/core/models-dev-catalog.js +7 -11
  20. package/dist/core/models-dev-catalog.js.map +1 -1
  21. package/dist/core/sdk.d.ts +1 -1
  22. package/dist/core/sdk.d.ts.map +1 -1
  23. package/dist/core/sdk.js +1 -1
  24. package/dist/core/sdk.js.map +1 -1
  25. package/dist/core/tools/websearch.d.ts.map +1 -1
  26. package/dist/core/tools/websearch.js +37 -52
  27. package/dist/core/tools/websearch.js.map +1 -1
  28. package/dist/extensions/gitnexus/device-auth.d.ts.map +1 -1
  29. package/dist/extensions/gitnexus/device-auth.js +1 -2
  30. package/dist/extensions/gitnexus/device-auth.js.map +1 -1
  31. package/dist/extensions/gitnexus/gateway.d.ts.map +1 -1
  32. package/dist/extensions/gitnexus/gateway.js +1 -9
  33. package/dist/extensions/gitnexus/gateway.js.map +1 -1
  34. package/dist/extensions/gitnexus/index.d.ts.map +1 -1
  35. package/dist/extensions/gitnexus/index.js +4 -10
  36. package/dist/extensions/gitnexus/index.js.map +1 -1
  37. package/dist/extensions/llama/index.d.ts.map +1 -1
  38. package/dist/extensions/llama/index.js +1 -1
  39. package/dist/extensions/llama/index.js.map +1 -1
  40. package/dist/extensions/web-access.d.ts +8 -1
  41. package/dist/extensions/web-access.d.ts.map +1 -1
  42. package/dist/extensions/web-access.js +48 -2
  43. package/dist/extensions/web-access.js.map +1 -1
  44. package/dist/index.d.ts +1 -1
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +6922 -4032
  47. package/dist/index.js.map +1 -1
  48. package/dist/main.d.ts.map +1 -1
  49. package/dist/main.js +1 -1
  50. package/dist/main.js.map +1 -1
  51. package/dist/migrations.d.ts.map +1 -1
  52. package/dist/migrations.js +2 -2
  53. package/dist/migrations.js.map +1 -1
  54. package/dist/modes/interactive/components/command-palette.d.ts.map +1 -1
  55. package/dist/modes/interactive/components/command-palette.js +2 -2
  56. package/dist/modes/interactive/components/command-palette.js.map +1 -1
  57. package/dist/rpc-entry.d.ts.map +1 -1
  58. package/dist/rpc-entry.js +33244 -30352
  59. package/dist/rpc-entry.js.map +1 -1
  60. package/dist/vendor/agent-core.js +6805 -0
  61. package/dist/vendor/ai.js +12407 -0
  62. package/dist/vendor/tui.js +11645 -0
  63. package/dist/vendor/web-access.js +93103 -0
  64. package/docs/compaction.md +14 -14
  65. package/docs/containerization.md +1 -1
  66. package/docs/custom-provider.md +17 -17
  67. package/docs/development.md +2 -2
  68. package/docs/environment-variables.md +1 -1
  69. package/docs/extensions.md +44 -44
  70. package/docs/index.md +5 -11
  71. package/docs/json.md +4 -4
  72. package/docs/llama-cpp.md +2 -2
  73. package/docs/models.md +3 -3
  74. package/docs/packages.md +6 -6
  75. package/docs/providers.md +13 -13
  76. package/docs/quickstart.md +19 -13
  77. package/docs/rpc.md +1 -1
  78. package/docs/sdk.md +28 -28
  79. package/docs/security.md +1 -1
  80. package/docs/session-format.md +6 -6
  81. package/docs/settings.md +2 -2
  82. package/docs/termux.md +1 -1
  83. package/docs/themes.md +2 -2
  84. package/docs/tui.md +20 -20
  85. package/docs/usage.md +5 -4
  86. package/examples/extensions/README.md +2 -2
  87. package/examples/extensions/auto-commit-on-exit.ts +1 -1
  88. package/examples/extensions/bash-spawn-hook.ts +2 -2
  89. package/examples/extensions/bookmark.ts +1 -1
  90. package/examples/extensions/border-status-editor.ts +3 -3
  91. package/examples/extensions/built-in-tool-renderer.ts +3 -3
  92. package/examples/extensions/claude-rules.ts +1 -1
  93. package/examples/extensions/commands.ts +1 -1
  94. package/examples/extensions/confirm-destructive.ts +1 -1
  95. package/examples/extensions/custom-compaction.ts +3 -3
  96. package/examples/extensions/custom-footer.ts +3 -3
  97. package/examples/extensions/custom-header.ts +2 -2
  98. package/examples/extensions/custom-provider-anthropic/index.ts +2 -2
  99. package/examples/extensions/custom-provider-gitlab-duo/index.ts +2 -2
  100. package/examples/extensions/custom-provider-gitlab-duo/test.ts +1 -1
  101. package/examples/extensions/dirty-repo-guard.ts +1 -1
  102. package/examples/extensions/doom-overlay/doom-component.ts +2 -2
  103. package/examples/extensions/doom-overlay/doom-keys.ts +1 -1
  104. package/examples/extensions/doom-overlay/index.ts +1 -1
  105. package/examples/extensions/dynamic-resources/dynamic.json +1 -1
  106. package/examples/extensions/dynamic-resources/index.ts +1 -1
  107. package/examples/extensions/dynamic-tools.ts +1 -1
  108. package/examples/extensions/entry-renderer.ts +2 -2
  109. package/examples/extensions/event-bus.ts +1 -1
  110. package/examples/extensions/file-trigger.ts +1 -1
  111. package/examples/extensions/git-checkpoint.ts +1 -1
  112. package/examples/extensions/git-merge-and-resolve.ts +1 -1
  113. package/examples/extensions/github-issue-autocomplete.ts +2 -2
  114. package/examples/extensions/gondolin/index.ts +2 -2
  115. package/examples/extensions/handoff.ts +4 -4
  116. package/examples/extensions/hello.ts +2 -2
  117. package/examples/extensions/hidden-thinking-label.ts +1 -1
  118. package/examples/extensions/inline-bash.ts +1 -1
  119. package/examples/extensions/input-transform-streaming.ts +1 -1
  120. package/examples/extensions/input-transform.ts +1 -1
  121. package/examples/extensions/interactive-shell.ts +1 -1
  122. package/examples/extensions/kimi-deferred-tools.ts +1 -1
  123. package/examples/extensions/mac-system-theme.ts +1 -1
  124. package/examples/extensions/message-renderer.ts +2 -2
  125. package/examples/extensions/minimal-mode.ts +3 -3
  126. package/examples/extensions/modal-editor.ts +2 -2
  127. package/examples/extensions/model-status.ts +1 -1
  128. package/examples/extensions/notify.ts +1 -1
  129. package/examples/extensions/overlay-qa-tests.ts +5 -5
  130. package/examples/extensions/overlay-test.ts +2 -2
  131. package/examples/extensions/permission-gate.ts +1 -1
  132. package/examples/extensions/pirate.ts +1 -1
  133. package/examples/extensions/plan-mode/index.ts +4 -4
  134. package/examples/extensions/preset.ts +4 -4
  135. package/examples/extensions/project-trust.ts +1 -1
  136. package/examples/extensions/prompt-customizer.ts +1 -1
  137. package/examples/extensions/protected-paths.ts +1 -1
  138. package/examples/extensions/provider-payload.ts +1 -1
  139. package/examples/extensions/qna.ts +3 -3
  140. package/examples/extensions/question.ts +2 -2
  141. package/examples/extensions/questionnaire.ts +2 -2
  142. package/examples/extensions/rainbow-editor.ts +1 -1
  143. package/examples/extensions/reload-runtime.ts +1 -1
  144. package/examples/extensions/rpc-demo.ts +1 -1
  145. package/examples/extensions/sandbox/index.ts +2 -2
  146. package/examples/extensions/send-user-message.ts +1 -1
  147. package/examples/extensions/session-name.ts +1 -1
  148. package/examples/extensions/shutdown-command.ts +1 -1
  149. package/examples/extensions/snake.ts +2 -2
  150. package/examples/extensions/space-invaders.ts +2 -2
  151. package/examples/extensions/ssh.ts +2 -2
  152. package/examples/extensions/status-line.ts +1 -1
  153. package/examples/extensions/structured-output.ts +2 -2
  154. package/examples/extensions/subagent/agents.ts +1 -1
  155. package/examples/extensions/subagent/index.ts +5 -5
  156. package/examples/extensions/summarize.ts +4 -4
  157. package/examples/extensions/system-prompt-header.ts +1 -1
  158. package/examples/extensions/tic-tac-toe.ts +3 -3
  159. package/examples/extensions/timed-confirm.ts +1 -1
  160. package/examples/extensions/titlebar-spinner.ts +1 -1
  161. package/examples/extensions/todo.ts +3 -3
  162. package/examples/extensions/tool-override.ts +2 -2
  163. package/examples/extensions/tools.ts +3 -3
  164. package/examples/extensions/trigger-compact.ts +1 -1
  165. package/examples/extensions/truncated-tool.ts +3 -3
  166. package/examples/extensions/widget-placement.ts +1 -1
  167. package/examples/extensions/with-deps/index.ts +1 -1
  168. package/examples/extensions/working-indicator.ts +1 -1
  169. package/examples/extensions/working-message-test.ts +1 -1
  170. package/examples/rpc-extension-ui.ts +1 -1
  171. package/examples/sdk/01-minimal.ts +1 -1
  172. package/examples/sdk/02-custom-model.ts +1 -1
  173. package/examples/sdk/03-custom-prompt.ts +1 -6
  174. package/examples/sdk/04-skills.ts +1 -1
  175. package/examples/sdk/05-tools.ts +1 -1
  176. package/examples/sdk/06-extensions.ts +2 -7
  177. package/examples/sdk/07-context-files.ts +1 -6
  178. package/examples/sdk/08-prompt-templates.ts +1 -1
  179. package/examples/sdk/09-api-keys-and-oauth.ts +1 -1
  180. package/examples/sdk/10-settings.ts +1 -1
  181. package/examples/sdk/11-sessions.ts +1 -1
  182. package/examples/sdk/12-full-control.ts +2 -2
  183. package/examples/sdk/13-session-runtime.ts +1 -1
  184. package/examples/sdk/README.md +2 -2
  185. package/npm-shrinkwrap.json +2 -26
  186. package/package.json +10 -25
package/docs/llama-cpp.md CHANGED
@@ -48,12 +48,12 @@ Restart the router after manually adding files. For per-model context sizes and
48
48
  Start Nexus and configure the provider:
49
49
 
50
50
  ```text
51
- /login llama.cpp
51
+ /byok llama.cpp
52
52
  ```
53
53
 
54
54
  Enter the router URL and optional API key. The default URL is `http://127.0.0.1:8080`.
55
55
 
56
- Environment variables can configure the same values without `/login`:
56
+ Environment variables can configure the same values without `/byok`:
57
57
 
58
58
  ```bash
59
59
  export LLAMA_BASE_URL=http://127.0.0.1:8080
package/docs/models.md CHANGED
@@ -34,7 +34,7 @@ For local models (Ollama, LM Studio, vLLM), only `id` is required per model:
34
34
  }
35
35
  ```
36
36
 
37
- The `apiKey` value is a placeholder because Ollama ignores it. nexus still treats models as requiring auth before they appear in `/model`, so keyless local servers should keep a dummy value, save a key for that provider with `/login`, or pass `--api-key` when selecting the model.
37
+ The `apiKey` value is a placeholder because Ollama ignores it. nexus still treats models as requiring auth before they appear in `/model`, so keyless local servers should keep a dummy value, save a key for that provider with `/byok`, or pass `--api-key` when selecting the model.
38
38
 
39
39
  Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so nexus sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
40
40
 
@@ -135,14 +135,14 @@ Set `api` at provider level (default for all models) or model level (override pe
135
135
  |-------|-------------|
136
136
  | `baseUrl` | API endpoint URL |
137
137
  | `api` | API type (see above) |
138
- | `apiKey` | Optional API key config (see value resolution below). Omit it when auth is provided by `/login`/`auth.json` or CLI `--api-key`. |
138
+ | `apiKey` | Optional API key config (see value resolution below). Omit it when auth is provided by `/byok`/`auth.json` or CLI `--api-key`. |
139
139
  | `oauth` | Dynamic OAuth provider type. Currently supports `"radius"`; requires the gateway `baseUrl`. |
140
140
  | `headers` | Custom headers (see value resolution below) |
141
141
  | `authHeader` | Set `true` to add `Authorization: Bearer <apiKey>` automatically |
142
142
  | `models` | Array of model configurations |
143
143
  | `modelOverrides` | Per-model overrides for built-in or extension-registered models on this provider |
144
144
 
145
- For providers with `models`, non-built-in provider configs need `baseUrl` and an `api` value at either provider or model level. `apiKey` is not required to load the file: models become available when auth is configured through `/login`/`auth.json`, CLI `--api-key`, or provider `apiKey`. If no auth is configured, the models load but stay unavailable in `/model` and `--list-models`.
145
+ For providers with `models`, non-built-in provider configs need `baseUrl` and an `api` value at either provider or model level. `apiKey` is not required to load the file: models become available when auth is configured through `/byok`/`auth.json`, CLI `--api-key`, or provider `apiKey`. If no auth is configured, the models load but stay unavailable in `/model` and `--list-models`.
146
146
 
147
147
  ### Value Resolution
148
148
 
package/docs/packages.md CHANGED
@@ -8,7 +8,7 @@ Nexus packages bundle extensions, skills, prompt templates, and themes so you ca
8
8
 
9
9
  - [Install and Manage](#install-and-manage)
10
10
  - [Package Sources](#package-sources)
11
- - [Creating a Nexus Package](#creating-a-pi-package)
11
+ - [Creating a Nexus Package](#creating-a-nexus-package)
12
12
  - [Package Structure](#package-structure)
13
13
  - [Dependencies](#dependencies)
14
14
  - [Package Filtering](#package-filtering)
@@ -115,12 +115,12 @@ Local paths point to files or directories on disk and are added to settings with
115
115
 
116
116
  ## Creating a Nexus Package
117
117
 
118
- Add a `nexus` manifest to `package.json` or use conventional directories. Include the `pi-package` keyword for discoverability.
118
+ Add a `nexus` manifest to `package.json` or use conventional directories. Include the `nexus-package` keyword for discoverability.
119
119
 
120
120
  ```json
121
121
  {
122
122
  "name": "my-package",
123
- "keywords": ["pi-package"],
123
+ "keywords": ["nexus-package"],
124
124
  "nexus": {
125
125
  "extensions": ["./extensions"],
126
126
  "skills": ["./skills"],
@@ -134,12 +134,12 @@ Paths are relative to the package root. Arrays support glob patterns and `!exclu
134
134
 
135
135
  ### Gallery Metadata
136
136
 
137
- The [package gallery](https://pi.dev/packages) displays packages tagged with `pi-package`. Add `video` or `image` fields to show a preview:
137
+ Add `video` or `image` fields to show a preview:
138
138
 
139
139
  ```json
140
140
  {
141
141
  "name": "my-package",
142
- "keywords": ["pi-package"],
142
+ "keywords": ["nexus-package"],
143
143
  "nexus": {
144
144
  "extensions": ["./extensions"],
145
145
  "video": "https://example.com/demo.mp4",
@@ -168,7 +168,7 @@ If no `nexus` manifest is present, nexus auto-discovers resources from these dir
168
168
 
169
169
  Third party runtime dependencies belong in `dependencies` in `package.json`. Dependencies that do not register extensions, skills, prompt templates, or themes also belong in `dependencies`. When nexus installs a package from npm or git, it runs `npm install`, so those dependencies are installed automatically.
170
170
 
171
- Nexus bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@earendil-works/pi-ai`, `@earendil-works/pi-agent-core`, `@earendil-works/pi-coding-agent`, `@earendil-works/pi-tui`, `typebox`.
171
+ Nexus bundles core packages for extensions and skills. If you import any of these, list them in `peerDependencies` with a `"*"` range and do not bundle them: `@akon-labs/nexus-cli/ai`, `@akon-labs/nexus-cli/agent-core`, `@akon-labs/nexus-cli`, `@akon-labs/nexus-cli/tui`, `typebox`.
172
172
 
173
173
  Other nexus packages must be bundled in your tarball. Add them to `dependencies` and `bundledDependencies`, then reference their resources through `node_modules/` paths. Nexus loads packages with separate module roots, so separate installs do not collide or share modules.
174
174
 
package/docs/providers.md CHANGED
@@ -14,7 +14,7 @@ Nexus supports subscription-based providers via OAuth and API key providers via
14
14
 
15
15
  ## Subscriptions
16
16
 
17
- Use `/login` in interactive mode, then select a provider:
17
+ Use `/byok` in interactive mode, then select a provider:
18
18
 
19
19
  - ChatGPT Plus/Pro (Codex)
20
20
  - Claude Pro/Max
@@ -41,25 +41,25 @@ Anthropic subscription auth is active for Claude Pro/Max accounts. Third-party h
41
41
 
42
42
  ### xAI (Grok/X subscription)
43
43
 
44
- - Run `/login xai`, then select **Use a subscription**
44
+ - Run `/byok xai`, then select **Use a subscription**
45
45
  - `XAI_API_KEY` remains available through **Use an API key**
46
46
 
47
47
  ### OpenRouter
48
48
 
49
- - Run `/login openrouter`, then select **Sign in with OpenRouter** to open the OpenRouter PKCE authorization flow
49
+ - Run `/byok openrouter`, then select **Sign in with OpenRouter** to open the OpenRouter PKCE authorization flow
50
50
  - The authorization creates a user-controlled OpenRouter API key billed from your OpenRouter credits
51
51
  - On remote/headless machines (e.g. over SSH) the browser cannot reach the loopback callback; paste the final redirect URL (or the authorization code) into the login prompt instead
52
52
  - `OPENROUTER_API_KEY` remains available through **Use an API key**
53
53
 
54
54
  ### Radius
55
55
 
56
- Radius is a dynamic `nexus-messages` gateway. `/login radius` stores OAuth tokens in `auth.json`; the gateway catalog is refreshed independently and cached in `models-store.json`. Custom Radius gateways can be declared in `models.json` with `"oauth": "radius"` and a gateway `baseUrl`.
56
+ Radius is a dynamic `nexus-messages` gateway. `/byok radius` stores OAuth tokens in `auth.json`; the gateway catalog is refreshed independently and cached in `models-store.json`. Custom Radius gateways can be declared in `models.json` with `"oauth": "radius"` and a gateway `baseUrl`.
57
57
 
58
58
  ## API Keys
59
59
 
60
60
  ### Environment Variables or Auth File
61
61
 
62
- Use `/login` in interactive mode and select a provider to store an API key in `auth.json`, or set credentials via environment variable:
62
+ Use `/byok` in interactive mode and select a provider to store an API key in `auth.json`, or set credentials via environment variable:
63
63
 
64
64
  ```bash
65
65
  export ANTHROPIC_API_KEY=sk-ant-...
@@ -103,7 +103,7 @@ nexus
103
103
  | Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
104
104
  | Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
105
105
 
106
- Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/env-api-keys.ts).
106
+ Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/Akon-Labs/nexus-cli/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/Akon-Labs/nexus-cli/blob/main/packages/ai/src/env-api-keys.ts).
107
107
 
108
108
  #### Auth File
109
109
 
@@ -175,7 +175,7 @@ The `key` field supports command execution, environment interpolation, and liter
175
175
  { "type": "api_key", "key": "public" }
176
176
  ```
177
177
 
178
- OAuth credentials are also stored here after `/login` and managed automatically.
178
+ OAuth credentials are also stored here after `/byok` and managed automatically.
179
179
 
180
180
  ## Cloud Providers
181
181
 
@@ -197,7 +197,7 @@ export AZURE_OPENAI_DEPLOYMENT_NAME_MAP=gpt-4=my-gpt4,gpt-4o=my-gpt4o
197
197
 
198
198
  ### Amazon Bedrock
199
199
 
200
- Use `/login amazon-bedrock` to store a Bedrock API key, or configure one of the ambient AWS credential sources below:
200
+ Use `/byok amazon-bedrock` to store a Bedrock API key, or configure one of the ambient AWS credential sources below:
201
201
 
202
202
  ```bash
203
203
  # Option 1: AWS Profile
@@ -242,10 +242,10 @@ export AWS_BEDROCK_FORCE_HTTP1=1
242
242
 
243
243
  ### Cloudflare AI Gateway
244
244
 
245
- `CLOUDFLARE_API_KEY` can be set via `/login`. The account ID and gateway slug can be set as environment variables or in the API key credential's `env` object in `auth.json`.
245
+ `CLOUDFLARE_API_KEY` can be set via `/byok`. The account ID and gateway slug can be set as environment variables or in the API key credential's `env` object in `auth.json`.
246
246
 
247
247
  ```bash
248
- export CLOUDFLARE_API_KEY=... # or use /login
248
+ export CLOUDFLARE_API_KEY=... # or use /byok
249
249
  export CLOUDFLARE_ACCOUNT_ID=...
250
250
  export CLOUDFLARE_GATEWAY_ID=... # create at dash.cloudflare.com → AI → AI Gateway
251
251
  nexus --provider cloudflare-ai-gateway --model "claude-sonnet-4-5"
@@ -266,10 +266,10 @@ For normal nexus usage, prefer unified billing or stored BYOK. Inline BYOK requi
266
266
 
267
267
  ### Cloudflare Workers AI
268
268
 
269
- `CLOUDFLARE_API_KEY` can be set via `/login`. `CLOUDFLARE_ACCOUNT_ID` can be set as an environment variable or in the API key credential's `env` object in `auth.json`.
269
+ `CLOUDFLARE_API_KEY` can be set via `/byok`. `CLOUDFLARE_ACCOUNT_ID` can be set as an environment variable or in the API key credential's `env` object in `auth.json`.
270
270
 
271
271
  ```bash
272
- export CLOUDFLARE_API_KEY=... # or use /login
272
+ export CLOUDFLARE_API_KEY=... # or use /byok
273
273
  export CLOUDFLARE_ACCOUNT_ID=...
274
274
  nexus --provider cloudflare-workers-ai --model "@cf/moonshotai/kimi-k2.6"
275
275
  ```
@@ -290,7 +290,7 @@ Or set `GOOGLE_APPLICATION_CREDENTIALS` to a service account key file.
290
290
 
291
291
  ## llama.cpp
292
292
 
293
- Nexus supports the llama.cpp router server. Configure it with `/login llama.cpp`, manage loaded models with `/llama`, and select a loaded model with `/model`.
293
+ Nexus supports the llama.cpp router server. Configure it with `/byok llama.cpp`, manage loaded models with `/llama`, and select a loaded model with `/model`.
294
294
 
295
295
  See [llama.cpp](llama-cpp.md) for server setup, model directory layout, environment variables, and command usage.
296
296
 
@@ -7,27 +7,27 @@ This page gets you from install to a useful first nexus session.
7
7
  Nexus is distributed as an npm package:
8
8
 
9
9
  ```bash
10
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent
10
+ npm install -g --ignore-scripts @akon-labs/nexus-cli
11
11
  ```
12
12
 
13
13
  `--ignore-scripts` disables dependency lifecycle scripts during install. Nexus does not require install scripts for normal npm installs.
14
14
 
15
15
  ### Uninstall
16
16
 
17
- Use the package manager that installed nexus. The curl installer uses npm globally, so curl and npm installs are removed with npm:
17
+ Use the package manager that installed nexus:
18
18
 
19
19
  ```bash
20
- # curl installer or npm install -g
21
- npm uninstall -g @earendil-works/pi-coding-agent
20
+ # npm
21
+ npm uninstall -g @akon-labs/nexus-cli
22
22
 
23
23
  # pnpm
24
- pnpm remove -g @earendil-works/pi-coding-agent
24
+ pnpm remove -g @akon-labs/nexus-cli
25
25
 
26
26
  # Yarn
27
- yarn global remove @earendil-works/pi-coding-agent
27
+ yarn global remove @akon-labs/nexus-cli
28
28
 
29
29
  # Bun
30
- bun uninstall -g @earendil-works/pi-coding-agent
30
+ bun uninstall -g @akon-labs/nexus-cli
31
31
  ```
32
32
 
33
33
  Uninstalling nexus leaves settings, credentials, sessions, and installed nexus packages in `~/.nexus/agent/`.
@@ -39,19 +39,25 @@ cd /path/to/project
39
39
  nexus
40
40
  ```
41
41
 
42
- ## Authenticate
42
+ ## Sign in to GitNexus
43
43
 
44
- Nexus can use subscription providers through `/login`, or API-key providers through environment variables or the auth file.
44
+ The first interactive launch opens a browser to sign in to GitNexus. Inside a session, `/login` repeats the same account flow. For headless or automated use, set `GITNEXUS_TOKEN` before starting Nexus.
45
45
 
46
- ### Option 1: subscription login
46
+ GitNexus credentials are stored in `~/.config/nexus/auth.json`.
47
+
48
+ ## Configure a model provider
49
+
50
+ Nexus supports provider subscriptions, API keys, and local Ollama models through `/byok`.
51
+
52
+ ### Option 1: subscription or stored API key
47
53
 
48
54
  Start nexus and run:
49
55
 
50
56
  ```text
51
- /login
57
+ /byok
52
58
  ```
53
59
 
54
- Then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), and GitHub Copilot.
60
+ Then select the provider and authentication method. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), and GitHub Copilot.
55
61
 
56
62
  ### Option 2: API key
57
63
 
@@ -62,7 +68,7 @@ export ANTHROPIC_API_KEY=sk-ant-...
62
68
  nexus
63
69
  ```
64
70
 
65
- You can also run `/login` and select an API-key provider to store the key in `~/.nexus/agent/auth.json`.
71
+ You can also run `/byok` and select an API-key provider to store the key in `~/.nexus/agent/auth.json`.
66
72
 
67
73
  See [Providers](providers.md) for all supported providers, environment variables, and cloud-provider setup.
68
74
 
package/docs/rpc.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  RPC mode enables headless operation of the coding agent via a JSON protocol over stdin/stdout. This is useful for embedding the agent in other applications, IDEs, or custom UIs.
4
4
 
5
- **Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@earendil-works/pi-coding-agent` instead of spawning a subprocess. See [`src/core/agent-session.ts`](../src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](../src/modes/rpc/rpc-client.ts).
5
+ **Note for Node.js/TypeScript users**: If you're building a Node.js application, consider using `AgentSession` directly from `@akon-labs/nexus-cli` instead of spawning a subprocess. See [`src/core/agent-session.ts`](../src/core/agent-session.ts) for the API. For a subprocess-based TypeScript client, see [`src/modes/rpc/rpc-client.ts`](../src/modes/rpc/rpc-client.ts).
6
6
 
7
7
  ## Starting RPC Mode
8
8
 
package/docs/sdk.md CHANGED
@@ -16,7 +16,7 @@ See [examples/sdk/](../examples/sdk/) for working examples from minimal to full
16
16
  ## Quick Start
17
17
 
18
18
  ```typescript
19
- import { createAgentSession, ModelRuntime, SessionManager } from "@earendil-works/pi-coding-agent";
19
+ import { createAgentSession, ModelRuntime, SessionManager } from "@akon-labs/nexus-cli";
20
20
 
21
21
  const modelRuntime = await ModelRuntime.create();
22
22
  const { session } = await createAgentSession({
@@ -36,7 +36,7 @@ await session.prompt("What files are in the current directory?");
36
36
  ## Installation
37
37
 
38
38
  ```bash
39
- npm install @earendil-works/pi-coding-agent
39
+ npm install @akon-labs/nexus-cli
40
40
  ```
41
41
 
42
42
  The SDK is included in the main package. No separate installation needed.
@@ -50,7 +50,7 @@ The main factory function for a single `AgentSession`.
50
50
  `createAgentSession()` uses a `ResourceLoader` to supply extensions, skills, prompt templates, themes, and context files. If you do not provide one, it uses `DefaultResourceLoader` with standard discovery.
51
51
 
52
52
  ```typescript
53
- import { createAgentSession, SessionManager } from "@earendil-works/pi-coding-agent";
53
+ import { createAgentSession, SessionManager } from "@akon-labs/nexus-cli";
54
54
 
55
55
  // Minimal: defaults with DefaultResourceLoader
56
56
  const { session } = await createAgentSession();
@@ -128,7 +128,7 @@ import {
128
128
  createAgentSessionServices,
129
129
  getAgentDir,
130
130
  SessionManager,
131
- } from "@earendil-works/pi-coding-agent";
131
+ } from "@akon-labs/nexus-cli";
132
132
 
133
133
  const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
134
134
  const services = await createAgentSessionServices({ cwd });
@@ -235,7 +235,7 @@ Both `steer()` and `followUp()` expand file-based prompt templates but error on
235
235
 
236
236
  ### Agent and AgentState
237
237
 
238
- The `Agent` class (from `@earendil-works/pi-agent-core`) handles the core LLM interaction. Access it via `session.agent`.
238
+ The `Agent` class (from `@akon-labs/nexus-cli/agent-core`) handles the core LLM interaction. Access it via `session.agent`.
239
239
 
240
240
  ```typescript
241
241
  // Access current state
@@ -367,8 +367,8 @@ When you pass a custom `ResourceLoader`, `cwd` and `agentDir` no longer control
367
367
  ### Model
368
368
 
369
369
  ```typescript
370
- import { getModel } from "@earendil-works/pi-ai";
371
- import { ModelRuntime } from "@earendil-works/pi-coding-agent";
370
+ import { getModel } from "@akon-labs/nexus-cli/ai";
371
+ import { ModelRuntime } from "@akon-labs/nexus-cli";
372
372
 
373
373
  const modelRuntime = await ModelRuntime.create();
374
374
 
@@ -408,7 +408,7 @@ To match CLI model parsing, use the exported resolver helpers:
408
408
  import {
409
409
  resolveCliModel,
410
410
  resolveModelScopeWithDiagnostics,
411
- } from "@earendil-works/pi-coding-agent";
411
+ } from "@akon-labs/nexus-cli";
412
412
 
413
413
  const cliModel = resolveCliModel({
414
414
  cliModel: "anthropic/claude-opus-4-5:high",
@@ -439,8 +439,8 @@ Authentication resolution priority (handled by `ModelRuntime`):
439
439
  4. Fallback resolver (for custom provider keys from `models.json`)
440
440
 
441
441
  ```typescript
442
- import { InMemoryCredentialStore } from "@earendil-works/pi-ai";
443
- import { createAgentSession, ModelRuntime } from "@earendil-works/pi-coding-agent";
442
+ import { InMemoryCredentialStore } from "@akon-labs/nexus-cli/ai";
443
+ import { createAgentSession, ModelRuntime } from "@akon-labs/nexus-cli";
444
444
 
445
445
  // Default: uses ~/.nexus/agent/auth.json and ~/.nexus/agent/models.json
446
446
  const modelRuntime = await ModelRuntime.create();
@@ -494,7 +494,7 @@ A failed or timed-out network refresh does not undo a successful credential oper
494
494
  Use a `ResourceLoader` to override the system prompt:
495
495
 
496
496
  ```typescript
497
- import { createAgentSession, DefaultResourceLoader } from "@earendil-works/pi-coding-agent";
497
+ import { createAgentSession, DefaultResourceLoader } from "@akon-labs/nexus-cli";
498
498
 
499
499
  const loader = new DefaultResourceLoader({
500
500
  systemPromptOverride: () => "You are a helpful assistant.",
@@ -519,7 +519,7 @@ Specify which built-in tools to enable:
519
519
  The `edit` tool returns `details.diff` for Nexus's TUI display and `details.patch` as a standard unified patch for SDK consumers.
520
520
 
521
521
  ```typescript
522
- import { createAgentSession } from "@earendil-works/pi-coding-agent";
522
+ import { createAgentSession } from "@akon-labs/nexus-cli";
523
523
 
524
524
  // Read-only mode
525
525
  const { session } = await createAgentSession({
@@ -542,7 +542,7 @@ const { session } = await createAgentSession({
542
542
  When you pass a custom `cwd`, `createAgentSession()` builds selected built-in tools for that cwd.
543
543
 
544
544
  ```typescript
545
- import { createAgentSession, SessionManager } from "@earendil-works/pi-coding-agent";
545
+ import { createAgentSession, SessionManager } from "@akon-labs/nexus-cli";
546
546
 
547
547
  const cwd = "/path/to/project";
548
548
 
@@ -566,7 +566,7 @@ const { session } = await createAgentSession({
566
566
 
567
567
  ```typescript
568
568
  import { Type } from "typebox";
569
- import { createAgentSession, defineTool } from "@earendil-works/pi-coding-agent";
569
+ import { createAgentSession, defineTool } from "@akon-labs/nexus-cli";
570
570
 
571
571
  // Inline custom tool
572
572
  const myTool = defineTool({
@@ -601,7 +601,7 @@ If you pass `tools`, include each custom or extension tool name you want enabled
601
601
  Extensions are loaded by the `ResourceLoader`. `DefaultResourceLoader` discovers extensions from `~/.nexus/agent/extensions/`, `.nexus/extensions/`, and settings.json extension sources.
602
602
 
603
603
  ```typescript
604
- import { createAgentSession, DefaultResourceLoader } from "@earendil-works/pi-coding-agent";
604
+ import { createAgentSession, DefaultResourceLoader } from "@akon-labs/nexus-cli";
605
605
 
606
606
  const loader = new DefaultResourceLoader({
607
607
  additionalExtensionPaths: ["/path/to/my-extension.ts"],
@@ -623,7 +623,7 @@ Extensions can register tools, subscribe to events, add commands, and more. See
623
623
  **Named inline extensions:** By default, inline factories display as `<inline:1>`, `<inline:2>`, etc. in the startup Extensions list. To show a descriptive name instead, wrap the factory:
624
624
 
625
625
  ```typescript
626
- import type { InlineExtension } from "@earendil-works/pi-coding-agent";
626
+ import type { InlineExtension } from "@akon-labs/nexus-cli";
627
627
 
628
628
  const myProvider: InlineExtension = {
629
629
  name: "my-provider",
@@ -644,7 +644,7 @@ This displays as `<inline:my-provider>` instead of `<inline:1>`. Bare factory fu
644
644
  **Event Bus:** Extensions can communicate via `nexus.events`. Pass a shared `eventBus` to `DefaultResourceLoader` if you need to emit or listen from outside:
645
645
 
646
646
  ```typescript
647
- import { createEventBus, DefaultResourceLoader } from "@earendil-works/pi-coding-agent";
647
+ import { createEventBus, DefaultResourceLoader } from "@akon-labs/nexus-cli";
648
648
 
649
649
  const eventBus = createEventBus();
650
650
  const loader = new DefaultResourceLoader({
@@ -664,7 +664,7 @@ import {
664
664
  createAgentSession,
665
665
  DefaultResourceLoader,
666
666
  type Skill,
667
- } from "@earendil-works/pi-coding-agent";
667
+ } from "@akon-labs/nexus-cli";
668
668
 
669
669
  const customSkill: Skill = {
670
670
  name: "my-skill",
@@ -690,7 +690,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
690
690
  ### Context Files
691
691
 
692
692
  ```typescript
693
- import { createAgentSession, DefaultResourceLoader } from "@earendil-works/pi-coding-agent";
693
+ import { createAgentSession, DefaultResourceLoader } from "@akon-labs/nexus-cli";
694
694
 
695
695
  const loader = new DefaultResourceLoader({
696
696
  agentsFilesOverride: (current) => ({
@@ -714,7 +714,7 @@ import {
714
714
  createAgentSession,
715
715
  DefaultResourceLoader,
716
716
  type PromptTemplate,
717
- } from "@earendil-works/pi-coding-agent";
717
+ } from "@akon-labs/nexus-cli";
718
718
 
719
719
  const customCommand: PromptTemplate = {
720
720
  name: "deploy",
@@ -749,7 +749,7 @@ import {
749
749
  createAgentSessionServices,
750
750
  getAgentDir,
751
751
  SessionManager,
752
- } from "@earendil-works/pi-coding-agent";
752
+ } from "@akon-labs/nexus-cli";
753
753
 
754
754
  // In-memory (no persistence)
755
755
  const { session } = await createAgentSession({
@@ -843,7 +843,7 @@ sm.createBranchedSession(leafId); // Extract path to new file
843
843
  ### Settings Management
844
844
 
845
845
  ```typescript
846
- import { createAgentSession, SettingsManager, SessionManager } from "@earendil-works/pi-coding-agent";
846
+ import { createAgentSession, SettingsManager, SessionManager } from "@akon-labs/nexus-cli";
847
847
 
848
848
  // Default: loads from files (global + project merged)
849
849
  const { session } = await createAgentSession({
@@ -899,7 +899,7 @@ Use `DefaultResourceLoader` to discover extensions, skills, prompts, themes, and
899
899
  import {
900
900
  DefaultResourceLoader,
901
901
  getAgentDir,
902
- } from "@earendil-works/pi-coding-agent";
902
+ } from "@akon-labs/nexus-cli";
903
903
 
904
904
  const loader = new DefaultResourceLoader({
905
905
  cwd,
@@ -940,7 +940,7 @@ interface LoadExtensionsResult {
940
940
  ## Complete Example
941
941
 
942
942
  ```typescript
943
- import { getModel } from "@earendil-works/pi-ai";
943
+ import { getModel } from "@akon-labs/nexus-cli/ai";
944
944
  import { Type } from "typebox";
945
945
  import {
946
946
  createAgentSession,
@@ -949,7 +949,7 @@ import {
949
949
  ModelRuntime,
950
950
  SessionManager,
951
951
  SettingsManager,
952
- } from "@earendil-works/pi-coding-agent";
952
+ } from "@akon-labs/nexus-cli";
953
953
 
954
954
  const modelRuntime = await ModelRuntime.create({
955
955
  authPath: "/custom/agent/auth.json",
@@ -1030,7 +1030,7 @@ import {
1030
1030
  getAgentDir,
1031
1031
  InteractiveMode,
1032
1032
  SessionManager,
1033
- } from "@earendil-works/pi-coding-agent";
1033
+ } from "@akon-labs/nexus-cli";
1034
1034
 
1035
1035
  const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
1036
1036
  const services = await createAgentSessionServices({ cwd });
@@ -1070,7 +1070,7 @@ import {
1070
1070
  getAgentDir,
1071
1071
  runPrintMode,
1072
1072
  SessionManager,
1073
- } from "@earendil-works/pi-coding-agent";
1073
+ } from "@akon-labs/nexus-cli";
1074
1074
 
1075
1075
  const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
1076
1076
  const services = await createAgentSessionServices({ cwd });
@@ -1107,7 +1107,7 @@ import {
1107
1107
  getAgentDir,
1108
1108
  runRpcMode,
1109
1109
  SessionManager,
1110
- } from "@earendil-works/pi-coding-agent";
1110
+ } from "@akon-labs/nexus-cli";
1111
1111
 
1112
1112
  const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
1113
1113
  const services = await createAgentSessionServices({ cwd });
package/docs/security.md CHANGED
@@ -54,6 +54,6 @@ If you bind-mount a host workspace read/write, writes from inside the container
54
54
 
55
55
  ## Reporting Security Issues
56
56
 
57
- To report a security issue, follow the repository [Security Policy](https://github.com/earendil-works/pi-mono/blob/main/SECURITY.md). Do not open a public issue for security-sensitive reports.
57
+ To report a security issue, follow the repository [Security Policy](https://github.com/Akon-Labs/nexus-cli/blob/main/SECURITY.md). Do not open a public issue for security-sensitive reports.
58
58
 
59
59
  Expected local-agent behavior, lack of a built-in sandbox, prompt injection from untrusted content, and behavior of user-installed extensions or skills are generally outside the security boundary unless the report demonstrates a real privilege-boundary bypass or shows how nexus grants access that the local user did not already have.
@@ -28,13 +28,13 @@ Existing sessions are automatically migrated to the current version (v3) when lo
28
28
 
29
29
  ## Source Files
30
30
 
31
- Source on GitHub ([nexus-mono](https://github.com/earendil-works/pi-mono)):
32
- - [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager
33
- - [`packages/coding-agent/src/core/messages.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.)
34
- - [`packages/ai/src/types.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage)
35
- - [`packages/agent/src/types.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/agent/src/types.ts) - AgentMessage union type
31
+ Source on GitHub ([nexus-mono](https://github.com/Akon-Labs/nexus-cli)):
32
+ - [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/Akon-Labs/nexus-cli/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager
33
+ - [`packages/coding-agent/src/core/messages.ts`](https://github.com/Akon-Labs/nexus-cli/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.)
34
+ - [`packages/ai/src/types.ts`](https://github.com/Akon-Labs/nexus-cli/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage)
35
+ - [`packages/agent/src/types.ts`](https://github.com/Akon-Labs/nexus-cli/blob/main/packages/agent/src/types.ts) - AgentMessage union type
36
36
 
37
- For TypeScript definitions in your project, inspect `node_modules/@earendil-works/pi-coding-agent/dist/` and `node_modules/@earendil-works/pi-ai/dist/`.
37
+ For TypeScript definitions in your project, inspect `node_modules/@akon-labs/nexus-cli/dist/`.
38
38
 
39
39
  ## Message Types
40
40
 
package/docs/settings.md CHANGED
@@ -30,7 +30,7 @@ Use `/trust` in interactive mode to save a project trust decision for future ses
30
30
  | `defaultProvider` | string | - | Default provider (e.g., `"anthropic"`, `"openai"`) |
31
31
  | `defaultModel` | string | - | Default model ID |
32
32
  | `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` |
33
- | `hideThinkingBlock` | boolean | `true` | Hide thinking blocks in output |
33
+ | `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
34
34
  | `showCacheMissNotices` | boolean | `false` | Show transcript notices for significant prompt-cache misses |
35
35
  | `thinkingBudgets` | object | - | Custom token budgets per thinking level |
36
36
 
@@ -78,7 +78,7 @@ For VS Code, include `--wait` so nexus resumes after the editor exits:
78
78
 
79
79
  ### Telemetry and update checks
80
80
 
81
- `enableInstallTelemetry` only controls the anonymous install/update ping to `https://pi.dev/api/report-install`. Opting out of telemetry does not disable update checks; Nexus can still fetch `https://pi.dev/api/latest-version` to look for the latest version.
81
+ `enableInstallTelemetry` only controls the default attribution headers sent to certain model providers (for example OpenRouter app attribution). Nexus performs no install/update ping. Update checks are disabled unless a release feed is configured via `NEXUS_LATEST_VERSION_URL`.
82
82
 
83
83
  Set `NEXUS_SKIP_VERSION_CHECK=1` to disable the Nexus version update check. Use `--offline` or `NEXUS_OFFLINE=1` to disable all startup network operations described here, including update checks, package update checks, and install/update telemetry.
84
84
 
package/docs/termux.md CHANGED
@@ -17,7 +17,7 @@ pkg update && pkg upgrade
17
17
  pkg install nodejs termux-api git
18
18
 
19
19
  # Install nexus
20
- npm install -g --ignore-scripts @earendil-works/pi-coding-agent
20
+ npm install -g --ignore-scripts @akon-labs/nexus-cli
21
21
 
22
22
  # Create config directory
23
23
  mkdir -p ~/.nexus/agent
package/docs/themes.md CHANGED
@@ -52,7 +52,7 @@ vim ~/.nexus/agent/themes/my-theme.json
52
52
 
53
53
  ```json
54
54
  {
55
- "$schema": "https://raw.githubusercontent.com/earendil-works/nexus/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
55
+ "$schema": "https://raw.githubusercontent.com/Akon-Labs/nexus-cli/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
56
56
  "name": "my-theme",
57
57
  "vars": {
58
58
  "primary": "#00aaff",
@@ -124,7 +124,7 @@ vim ~/.nexus/agent/themes/my-theme.json
124
124
 
125
125
  ```json
126
126
  {
127
- "$schema": "https://raw.githubusercontent.com/earendil-works/nexus/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
127
+ "$schema": "https://raw.githubusercontent.com/Akon-Labs/nexus-cli/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
128
128
  "name": "my-theme",
129
129
  "vars": {
130
130
  "blue": "#0066cc",