nexos-connect 0.5.0 → 0.6.1
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 +44 -8
- package/dist/chunk-HVSJL2BF.js +9 -0
- package/dist/chunk-HVSJL2BF.js.map +1 -0
- package/dist/index.js +24 -5782
- package/dist/index.js.map +1 -1
- package/dist/main-2HG2VWNV.js +7160 -0
- package/dist/main-2HG2VWNV.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ One key, one model, one command.
|
|
|
9
9
|

|
|
10
10
|

|
|
11
11
|
|
|
12
|
-
[Quick start](#quick-start) · [Usage](#usage) · [Supported agents](#supported-agents) · [Undo](#undo) · [Development](#development)
|
|
12
|
+
[Quick start](#quick-start) · [Usage](#usage) · [Supported agents](#supported-agents) · [Undo](#undo) · [Status](#status) · [Development](#development)
|
|
13
13
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
@@ -52,13 +52,20 @@ diff for every file:
|
|
|
52
52
|
}
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
+
If Codex reports `Missing environment variable: NEXOS_API_KEY`, try this model override, replacing `<selected-model>` with the model chosen during setup. This is a reported workaround, not a required launch command or a guaranteed fix:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
codex -c 'model="<selected-model>"'
|
|
59
|
+
```
|
|
60
|
+
|
|
55
61
|
> [!IMPORTANT]
|
|
56
|
-
> OpenAI Codex and GitHub Copilot CLI read the key from the environment.
|
|
57
|
-
>
|
|
62
|
+
> OpenAI Codex and GitHub Copilot CLI read the key from the environment. On Windows, setup also
|
|
63
|
+
> sets it in your user environment, so a **new terminal** just works — no dot-sourcing. On macOS and
|
|
64
|
+
> Linux, load it once and add the line to your shell profile to keep it:
|
|
58
65
|
>
|
|
59
66
|
> ```bash
|
|
60
67
|
> source ~/.nexos/env # macOS, Linux
|
|
61
|
-
> . "$HOME\.nexos\env.ps1" # Windows PowerShell
|
|
68
|
+
> . "$HOME\.nexos\env.ps1" # Windows PowerShell, for the current session only
|
|
62
69
|
> ```
|
|
63
70
|
|
|
64
71
|
## Usage
|
|
@@ -66,8 +73,9 @@ diff for every file:
|
|
|
66
73
|
| Command | What it does |
|
|
67
74
|
| ------------------------------ | --------------------------------------------------------------------------------------------------------- |
|
|
68
75
|
| `npx nexos-connect` | Set up your agents, interactively |
|
|
69
|
-
| `npx nexos-connect <agent>` | Start one agent on the gateway **without changing its config** — `claude`, `codex`, `opencode`, `copilot` |
|
|
76
|
+
| `npx nexos-connect <agent>` | Start one agent on the gateway **without changing its config** — `claude`, `codex`, `opencode`, `copilot`, `pi`, `crush`, `qwen` |
|
|
70
77
|
| `npx nexos-connect restore` | Put back what nexos-connect changed |
|
|
78
|
+
| `npx nexos-connect status` | Report what is configured, and whether it still matches — read-only |
|
|
71
79
|
| `npx nexos-connect forget-key` | Delete the key saved in your system keychain |
|
|
72
80
|
|
|
73
81
|
```bash
|
|
@@ -80,9 +88,15 @@ npx nexos-connect --scope project
|
|
|
80
88
|
# No questions asked — for scripts
|
|
81
89
|
npx nexos-connect --harnesses claude-code,codex --key "$NEXOS_API_KEY" --yes
|
|
82
90
|
|
|
91
|
+
# A fresh machine — pick the agents; a missing one is installed, then configured
|
|
92
|
+
npx nexos-connect
|
|
93
|
+
|
|
83
94
|
# Try Claude Code on the gateway, leaving its config alone
|
|
84
95
|
npx nexos-connect claude
|
|
85
96
|
|
|
97
|
+
# Start an agent you have not installed yet — the CLI installs it first
|
|
98
|
+
npx nexos-connect claude --install
|
|
99
|
+
|
|
86
100
|
# Anything after -- goes to the agent
|
|
87
101
|
npx nexos-connect codex -- exec "fix the tests"
|
|
88
102
|
```
|
|
@@ -90,7 +104,9 @@ npx nexos-connect codex -- exec "fix the tests"
|
|
|
90
104
|
The default model is the nexos.ai router, which picks a model per request. Before the picker opens,
|
|
91
105
|
nexos-connect checks that your key can use it, and offers the router only when that check passes. A
|
|
92
106
|
check that fails, or one you skip with `--no-verify`, leaves it out. After a failed check you choose
|
|
93
|
-
from the models your key can reach; with `--no-verify` you type a model id.
|
|
107
|
+
from the models your key can reach; with `--no-verify` you type a model id. The picker lists every
|
|
108
|
+
conversational model the Gateway can serve, including ones it reaches through translation, and a
|
|
109
|
+
live probe confirms the model works for the agents you picked. A `--yes` run with no
|
|
94
110
|
`--model` exits `2` only when the gateway rejected the router; anything less certain warns and uses
|
|
95
111
|
it. Naming the router yourself always wins, with a warning only when the gateway rejected it, and
|
|
96
112
|
the router is never saved as an agent's default. Save any other model your key can reach as an
|
|
@@ -106,11 +122,14 @@ agent's default for next time.
|
|
|
106
122
|
| `--save-key` | Save the key in your system keychain for future runs |
|
|
107
123
|
| `--model <id>` | Model every agent uses. Falls back to `$NEXOS_MODEL`, then the saved default, then a picker |
|
|
108
124
|
| `--save-model` | Save the model as each agent's default |
|
|
125
|
+
| `--install` | Install a not-installed agent with `npm install -g`. Setup installs the ones you pick in the list; starting an agent installs the named one first. `--yes` never installs |
|
|
109
126
|
| `--scope <scope>` | `user` (default — your home directory) or `project` (this directory only) |
|
|
110
127
|
| `-y`, `--yes` | Answer every question with its default and write without asking |
|
|
111
128
|
| `--dry-run` | Show the diffs and write nothing |
|
|
112
129
|
| `--no-verify` | Skip the gateway checks — key, model list and router — e.g. when offline. Without a check, the router is not offered |
|
|
113
130
|
| `--backup-dir <path>` | Where originals are copied. Default `~/.nexos/backups/`, or `./.nexos-backup/` for a project |
|
|
131
|
+
| `--verify` | With `status`: check the resolved key against the gateway once |
|
|
132
|
+
| `--json` | With `status`: print the report as one JSON object |
|
|
114
133
|
|
|
115
134
|
Exit codes: `0` done · `1` an agent failed · `2` usage error · `130` cancelled.
|
|
116
135
|
Run `npx nexos-connect --help` for the full reference.
|
|
@@ -147,14 +166,31 @@ Every setting nexos-connect wrote goes back to what it was before the first run;
|
|
|
147
166
|
since stays. Copies of the original files are kept under `~/.nexos/backups/` (or `./.nexos-backup/`
|
|
148
167
|
for a project).
|
|
149
168
|
|
|
169
|
+
## Status
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npx nexos-connect status
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
`status` is read-only and never writes. It reports the key, the env file, the backup folders and the
|
|
176
|
+
saved defaults, then one block per agent, at user and project scope: `configured`, `drifted`,
|
|
177
|
+
`not configured`, `not installed` or `unreadable`. `drifted` means a fresh setup would change the
|
|
178
|
+
file. Add `--verify` to check the resolved key against the gateway, and `--json` for a
|
|
179
|
+
machine-readable report. It exits `1` when an agent has drifted, a config cannot be read, a
|
|
180
|
+
`--harnesses`-named agent is not configured or not installed, a read fails, or `--verify` rejects
|
|
181
|
+
the key.
|
|
182
|
+
|
|
183
|
+
`status` judges `configured` and `drifted` against the gateway the run talks to: `$NEXOS_BASE_URL`
|
|
184
|
+
when set, else the canonical `https://api.nexos.ai`.
|
|
185
|
+
|
|
150
186
|
## Your key
|
|
151
187
|
|
|
152
188
|
Your key is never printed in full — not in diffs, reports or gateway errors. Save it with `--save-key`
|
|
153
189
|
and later runs offer it from your system keychain (macOS Keychain, Windows Credential Manager, or the
|
|
154
190
|
Secret Service on Linux); `npx nexos-connect forget-key` removes it.
|
|
155
191
|
|
|
156
|
-
Setup still writes the key in plain text to each agent's config and to `~/.nexos/env
|
|
157
|
-
read it; a saved key does not change that.
|
|
192
|
+
Setup still writes the key in plain text to each agent's config and to `~/.nexos/env` (and, on
|
|
193
|
+
Windows, to your user environment), where the agents read it; a saved key does not change that.
|
|
158
194
|
|
|
159
195
|
## Development
|
|
160
196
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli/exit-code.ts"],"sourcesContent":["export const EXIT_CODE = { ok: 0, failed: 1, usage: 2, cancelled: 130 } as const\n\nexport type ExitCode = (typeof EXIT_CODE)[keyof typeof EXIT_CODE]\n\n/** `npx nexos-connect <agent>` passes the started agent's own exit code through unchanged. */\nexport type AgentExitCode = number\n"],"mappings":";;;AAAO,IAAM,YAAY,EAAE,IAAI,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,IAAI;","names":[]}
|