nexos-connect 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,16 +9,15 @@ One key, one model, one command.
9
9
  ![Platforms](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey)
10
10
  ![License](https://img.shields.io/badge/license-MIT-blue)
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
 
16
16
  ---
17
17
 
18
- Claude Code, OpenAI Codex, OpenCode and GitHub Copilot CLI each keep their own config file, in their
19
- own format, with their own key names. **nexos-connect** finds the agents you have, shows exactly what
20
- it will change, backs up the originals, writes the configs, and reports the result — with your key
21
- masked.
18
+ Every coding agent keeps its own config file, in its own format, with its own key names.
19
+ **nexos-connect** finds the agents you have, shows exactly what it will change, backs up the
20
+ originals, writes the configs, and reports the result — with your key masked.
22
21
 
23
22
  - 🔍 **Detects** which agents are installed, and configures only those
24
23
  - 👀 **Shows the diff first** — `--dry-run` writes nothing at all
@@ -49,17 +48,24 @@ diff for every file:
49
48
  + "ANTHROPIC_AUTH_TOKEN": "nexos-0123…cdef",
50
49
  + …
51
50
  + },
52
- + "model": "auto-code[1m]"
51
+ + "model": "<model-id>"
53
52
  }
54
53
  ```
55
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
+
56
61
  > [!IMPORTANT]
57
- > OpenAI Codex and GitHub Copilot CLI read the key from the environment. Load it once setup is done,
58
- > and add the same line to your shell profile to keep it:
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:
59
65
  >
60
66
  > ```bash
61
67
  > source ~/.nexos/env # macOS, Linux
62
- > . "$HOME\.nexos\env.ps1" # Windows PowerShell
68
+ > . "$HOME\.nexos\env.ps1" # Windows PowerShell, for the current session only
63
69
  > ```
64
70
 
65
71
  ## Usage
@@ -67,8 +73,9 @@ diff for every file:
67
73
  | Command | What it does |
68
74
  | ------------------------------ | --------------------------------------------------------------------------------------------------------- |
69
75
  | `npx nexos-connect` | Set up your agents, interactively |
70
- | `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` |
71
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 |
72
79
  | `npx nexos-connect forget-key` | Delete the key saved in your system keychain |
73
80
 
74
81
  ```bash
@@ -79,39 +86,50 @@ npx nexos-connect --dry-run
79
86
  npx nexos-connect --scope project
80
87
 
81
88
  # No questions asked — for scripts
82
- npx nexos-connect --harnesses claude-code,codex --key "$NEXOS_API_KEY" --model auto-code --yes
89
+ npx nexos-connect --harnesses claude-code,codex --key "$NEXOS_API_KEY" --yes
90
+
91
+ # A fresh machine — pick the agents; a missing one is installed, then configured
92
+ npx nexos-connect
83
93
 
84
94
  # Try Claude Code on the gateway, leaving its config alone
85
95
  npx nexos-connect claude
86
96
 
97
+ # Start an agent you have not installed yet — the CLI installs it first
98
+ npx nexos-connect claude --install
99
+
87
100
  # Anything after -- goes to the agent
88
101
  npx nexos-connect codex -- exec "fix the tests"
89
102
  ```
90
103
 
91
- The default model is `auto-code`, the nexos.ai router that picks a model per request. Before the
92
- picker opens, nexos-connect checks that your key can use it, and offers the router only when that
93
- check passes. A check that fails, or one you skip with `--no-verify`, leaves it out. After a failed
94
- check you choose from the models your key can reach; with `--no-verify` you type a model id. A
95
- `--yes` run with no `--model` exits `2` only when the gateway rejected the router; anything less
96
- certain warns and uses it. Naming `auto-code` yourself always wins, with a warning only when the
97
- gateway rejected it, and the router is never saved as an agent's default. Save any other model your
98
- key can reach as an agent's default for next time.
104
+ The default model is the nexos.ai router, which picks a model per request. Before the picker opens,
105
+ nexos-connect checks that your key can use it, and offers the router only when that check passes. A
106
+ check that fails, or one you skip with `--no-verify`, leaves it out. After a failed check you choose
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
110
+ `--model` exits `2` only when the gateway rejected the router; anything less certain warns and uses
111
+ it. Naming the router yourself always wins, with a warning only when the gateway rejected it, and
112
+ the router is never saved as an agent's default. Save any other model your key can reach as an
113
+ agent's default for next time.
99
114
 
100
115
  <details>
101
116
  <summary><b>All options</b></summary>
102
117
 
103
118
  | Option | Effect |
104
119
  | --------------------- | --------------------------------------------------------------------------------------------- |
105
- | `--harnesses <ids>` | Agents to set up: `claude-code`, `codex`, `opencode`, `copilot-cli` |
120
+ | `--harnesses <ids>` | Agents to set up: `claude-code`, `codex`, `opencode`, `copilot-cli`, `pi`, `crush`, `qwen-code` |
106
121
  | `--key <key>` | nexos.ai API key. Falls back to `$NEXOS_API_KEY`, then the saved key, then a prompt |
107
122
  | `--save-key` | Save the key in your system keychain for future runs |
108
123
  | `--model <id>` | Model every agent uses. Falls back to `$NEXOS_MODEL`, then the saved default, then a picker |
109
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 |
110
126
  | `--scope <scope>` | `user` (default — your home directory) or `project` (this directory only) |
111
127
  | `-y`, `--yes` | Answer every question with its default and write without asking |
112
128
  | `--dry-run` | Show the diffs and write nothing |
113
- | `--no-verify` | Skip the gateway checks — key, model list and router — e.g. when offline. Without a check, `auto-code` is not offered |
129
+ | `--no-verify` | Skip the gateway checks — key, model list and router — e.g. when offline. Without a check, the router is not offered |
114
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 |
115
133
 
116
134
  Exit codes: `0` done · `1` an agent failed · `2` usage error · `130` cancelled.
117
135
  Run `npx nexos-connect --help` for the full reference.
@@ -127,6 +145,9 @@ Run `npx nexos-connect --help` for the full reference.
127
145
  | ------------------ | ---------------------------------------------- | ------------------------------ |
128
146
  | Claude Code | ✅ `~/.claude/settings.json` | ✅ `.claude/settings.local.json` |
129
147
  | OpenCode | ✅ `~/.config/opencode/opencode.json` | ✅ `opencode.json` |
148
+ | Pi | ✅ `~/.pi/agent/models.json` | — |
149
+ | Crush | ✅ `~/.config/crush/crush.json` | ✅ `.crush.json` |
150
+ | Qwen Code | ✅ `~/.qwen/settings.json` | ✅ `.qwen/settings.json` |
130
151
  | OpenAI Codex | ✅ `~/.codex/config.toml` + `~/.nexos/env` | — |
131
152
  | GitHub Copilot CLI | ✅ `~/.nexos/env` | — |
132
153
  | Gemini CLI | ❌ speaks a protocol the gateway does not serve | ❌ |
@@ -145,14 +166,31 @@ Every setting nexos-connect wrote goes back to what it was before the first run;
145
166
  since stays. Copies of the original files are kept under `~/.nexos/backups/` (or `./.nexos-backup/`
146
167
  for a project).
147
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
+
148
186
  ## Your key
149
187
 
150
188
  Your key is never printed in full — not in diffs, reports or gateway errors. Save it with `--save-key`
151
189
  and later runs offer it from your system keychain (macOS Keychain, Windows Credential Manager, or the
152
190
  Secret Service on Linux); `npx nexos-connect forget-key` removes it.
153
191
 
154
- Setup still writes the key in plain text to each agent's config and to `~/.nexos/env`, where the agents
155
- 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.
156
194
 
157
195
  ## Development
158
196