cursor-agent-bridge 0.1.5 → 0.1.6

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
@@ -2,9 +2,9 @@
2
2
 
3
3
  OpenAI-compatible HTTP bridge for the Cursor Agent CLI.
4
4
 
5
- `cursor-agent-bridge` lets Codex and other OpenAI-compatible clients talk to a
6
- local Cursor Agent session at `http://127.0.0.1:4646/v1`. It supports the
7
- Responses API used by Codex custom providers, plus Chat Completions for simpler
5
+ Use it when you want Codex or another OpenAI-style client to call your local
6
+ Cursor Agent CLI through `http://127.0.0.1:4646/v1`. The bridge supports the
7
+ Responses API that Codex custom providers use, plus Chat Completions for simpler
8
8
  clients.
9
9
 
10
10
  ## Requirements
@@ -23,12 +23,19 @@ agent --list-models
23
23
 
24
24
  ## Install
25
25
 
26
- Install the package globally, then confirm the installed command is on your
27
- `PATH`:
26
+ Install the package globally, then confirm the CLI is on your `PATH`:
28
27
 
29
28
  ```bash
30
29
  pnpm add -g cursor-agent-bridge
31
- cursor-agent-bridge --version
30
+ cab --version
31
+ ```
32
+
33
+ The package installs two commands. `cab` is the short alias; the full
34
+ `cursor-agent-bridge` command stays available for scripts and existing setups.
35
+
36
+ ```bash
37
+ cab serve
38
+ cab config switch cursor
32
39
  ```
33
40
 
34
41
  For local development:
@@ -36,7 +43,7 @@ For local development:
36
43
  ```bash
37
44
  pnpm install
38
45
  pnpm build
39
- pnpm exec cursor-agent-bridge serve
46
+ node dist/cli.mjs serve
40
47
  ```
41
48
 
42
49
  ## Upgrade
@@ -44,20 +51,20 @@ pnpm exec cursor-agent-bridge serve
44
51
  Check for updates:
45
52
 
46
53
  ```bash
47
- cursor-agent-bridge upgrade --check
54
+ cab upgrade --check
48
55
  ```
49
56
 
50
57
  Install the latest published version:
51
58
 
52
59
  ```bash
53
- cursor-agent-bridge upgrade
60
+ cab upgrade
54
61
  ```
55
62
 
56
63
  Options:
57
64
 
58
65
  ```bash
59
- cursor-agent-bridge upgrade --target 0.1.3
60
- cursor-agent-bridge upgrade --manager npm
66
+ cab upgrade --target 0.1.3
67
+ cab upgrade --manager npm
61
68
  ```
62
69
 
63
70
  `--check` compares your installed version with npm and exits `1` when a newer
@@ -68,7 +75,7 @@ If you use the optional macOS LaunchAgent, reinstall it after upgrading so the
68
75
  service picks up the new binary:
69
76
 
70
77
  ```bash
71
- cursor-agent-bridge launch-agent install
78
+ cab launch-agent install
72
79
  ```
73
80
 
74
81
  For local development from this repository, use `git pull`, `pnpm install`, and
@@ -79,7 +86,7 @@ For local development from this repository, use `git pull`, `pnpm install`, and
79
86
  Run the bridge in the foreground:
80
87
 
81
88
  ```bash
82
- cursor-agent-bridge serve --host 127.0.0.1 --port 4646
89
+ cab serve --host 127.0.0.1 --port 4646
83
90
  ```
84
91
 
85
92
  Configuration:
@@ -106,37 +113,37 @@ processes. On macOS, you can install the optional LaunchAgent to start the
106
113
  bridge at login and restart it after crashes:
107
114
 
108
115
  ```bash
109
- cursor-agent-bridge launch-agent install
116
+ cab launch-agent install
110
117
  ```
111
118
 
112
119
  Manage the service:
113
120
 
114
121
  ```bash
115
- cursor-agent-bridge launch-agent status
116
- cursor-agent-bridge launch-agent uninstall
122
+ cab launch-agent status
123
+ cab launch-agent uninstall
117
124
  ```
118
125
 
119
126
  The LaunchAgent listens on `127.0.0.1:4646` by default. Skip it if you prefer to
120
- run `cursor-agent-bridge serve` yourself before starting Codex.
127
+ run `cab serve` yourself before starting Codex.
121
128
 
122
129
  ## Codex Config
123
130
 
124
131
  For Codex CLI profile usage, create or update `~/.codex/cursor.config.toml`:
125
132
 
126
133
  ```bash
127
- cursor-agent-bridge config write
134
+ cab config write
128
135
  ```
129
136
 
130
137
  Preview the generated profile without writing a file:
131
138
 
132
139
  ```bash
133
- cursor-agent-bridge config print
140
+ cab config print
134
141
  ```
135
142
 
136
143
  Validate an existing profile:
137
144
 
138
145
  ```bash
139
- cursor-agent-bridge config check
146
+ cab config check
140
147
  ```
141
148
 
142
149
  The generated profile looks like this:
@@ -162,22 +169,23 @@ Use `/model` in Codex to pick a Cursor model. The model catalog comes from
162
169
 
163
170
  ## Codex IDE Switching
164
171
 
165
- The Codex IDE extension reads the user-level `~/.codex/config.toml`. Switch that file when you want the IDE to use Cursor Agent Bridge:
172
+ The Codex IDE extension reads the user-level `~/.codex/config.toml`. Switch
173
+ that file when you want the IDE to use Cursor Agent Bridge:
166
174
 
167
175
  ```bash
168
- cursor-agent-bridge config switch cursor
176
+ cab config switch cursor
169
177
  ```
170
178
 
171
179
  Switch back to Codex's default provider:
172
180
 
173
181
  ```bash
174
- cursor-agent-bridge config switch openai
182
+ cab config switch openai
175
183
  ```
176
184
 
177
185
  Check the active provider:
178
186
 
179
187
  ```bash
180
- cursor-agent-bridge config switch status
188
+ cab config switch status
181
189
  ```
182
190
 
183
191
  The switch command backs up the previous `~/.codex/config.toml` to
@@ -185,7 +193,7 @@ The switch command backs up the previous `~/.codex/config.toml` to
185
193
  that backup with:
186
194
 
187
195
  ```bash
188
- cursor-agent-bridge config switch restore
196
+ cab config switch restore
189
197
  ```
190
198
 
191
199
  Reload the Codex IDE window or start a new session after switching. Codex does
@@ -196,14 +204,14 @@ not reliably hot-reload provider changes while a session is running.
196
204
  Run a full preflight before starting Codex:
197
205
 
198
206
  ```bash
199
- cursor-agent-bridge doctor
207
+ cab doctor
200
208
  ```
201
209
 
202
210
  List available Cursor models without starting the HTTP server:
203
211
 
204
212
  ```bash
205
- cursor-agent-bridge models
206
- cursor-agent-bridge models --json
213
+ cab models
214
+ cab models --json
207
215
  ```
208
216
 
209
217
  If `config write` finds a different `model_provider`, pass `--force` to switch
@@ -219,8 +227,8 @@ POST /v1/chat/completions
219
227
  ```
220
228
 
221
229
  `GET /v1/models` returns an OpenAI-style model list by default. When Codex calls
222
- the same endpoint with `client_version`, the bridge returns the catalog shape
223
- Codex expects for `/model`.
230
+ the same endpoint, the bridge returns the catalog shape Codex expects for the
231
+ model selector.
224
232
 
225
233
  Model lists are cached briefly so the bridge does not spawn
226
234
  `agent --list-models` for every request. Pass `refresh=1` to force a refresh.
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as CursorRunner, n as engines, r as version, s as toOpenAIModelList, t as startServer } from "./server-DBFhIonT.mjs";
2
+ import { i as CursorRunner, n as engines, r as version, s as toOpenAIModelList, t as startServer } from "./server-BtOiVsUV.mjs";
3
3
  import { execFile, execFileSync, spawn } from "node:child_process";
4
4
  import { copyFile, mkdir, readFile, rename, writeFile } from "node:fs/promises";
5
5
  import { homedir } from "node:os";
@@ -825,6 +825,9 @@ Usage:
825
825
  cursor-agent-bridge launch-agent status
826
826
  cursor-agent-bridge upgrade [--check] [--target latest] [--manager auto|npm|pnpm]
827
827
 
828
+ Alias:
829
+ cab is the short alias for cursor-agent-bridge
830
+
828
831
  Environment:
829
832
  HOST Listen host, default 127.0.0.1
830
833
  PORT Listen port, default 4646
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as parseAgentModelList, c as messagesToPrompt, i as CursorRunner, l as normalizeModel, o as toCodexModelCatalog, s as toOpenAIModelList, t as startServer, u as responsesToMessages } from "./server-DBFhIonT.mjs";
1
+ import { a as parseAgentModelList, c as messagesToPrompt, i as CursorRunner, l as normalizeModel, o as toCodexModelCatalog, s as toOpenAIModelList, t as startServer, u as responsesToMessages } from "./server-BtOiVsUV.mjs";
2
2
  export { CursorRunner, messagesToPrompt, normalizeModel, parseAgentModelList, responsesToMessages, startServer, toCodexModelCatalog, toOpenAIModelList };
@@ -328,7 +328,7 @@ function extractAssistantText(message) {
328
328
  }
329
329
  //#endregion
330
330
  //#region package.json
331
- var version = "0.1.5";
331
+ var version = "0.1.6";
332
332
  var engines = { "node": ">=22.13" };
333
333
  //#endregion
334
334
  //#region src/adapter/openai.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cursor-agent-bridge",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Responses-compatible API bridge for Cursor Agent CLI",
5
5
  "type": "module",
6
6
  "repository": {
@@ -12,7 +12,8 @@
12
12
  },
13
13
  "homepage": "https://github.com/xwartz/cursor-agent-bridge#readme",
14
14
  "bin": {
15
- "cursor-agent-bridge": "./dist/cli.mjs"
15
+ "cursor-agent-bridge": "./dist/cli.mjs",
16
+ "cab": "./dist/cli.mjs"
16
17
  },
17
18
  "exports": {
18
19
  ".": {