@pretense/cli 0.6.14 → 0.6.16

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
@@ -40,7 +40,7 @@ pretending.
40
40
  docs-exec:skip `pretense run gemini "summarise the changes"` — starts a proxy and a third-party tool that would outlive the suite
41
41
  docs-exec:skip "pretense run --provider openai mytool" — starts a proxy and a third-party tool that would outlive the suite
42
42
  docs-exec:skip "curl -s http://localhost:9339/health" — needs the proxy from the preceding line, which cannot be started here
43
- docs-exec:skip "claude" — third-party CLI that is not a dependency of this repo
43
+ docs-exec:skip "ANTHROPIC_BASE_URL=http://localhost:9339 claude" — runs the third-party claude CLI (not a dependency of this repo) against a proxy that is not started here
44
44
  docs-exec:skip `curl -fsSLO "${BASE}/SHA256SUMS"` — network fetch from the release host
45
45
  docs-exec:skip `curl -fsSLO "${BASE}/SHA256SUMS.cosign.bundle"` — network fetch from the release host
46
46
  docs-exec:skip `curl -fsSLO "${BASE}/${TARGET}"` — network fetch of a large release binary
@@ -269,8 +269,17 @@ not used, are in [docs/verifying-releases.md](../docs/verifying-releases.md).
269
269
 
270
270
  ## The proxy
271
271
 
272
- `pretense start` runs a local HTTP proxy that applies the same mutation engine to
273
- LLM API traffic.
272
+ The one-command way to route an AI tool through the mutating proxy is
273
+ `pretense run <tool>` — it starts a proxy on a free port, sets the right
274
+ base-URL env var, runs your tool, and stops the proxy when the tool exits. No
275
+ manual export, no second terminal:
276
+
277
+ ```bash
278
+ pretense run claude "explain this repo"
279
+ ```
280
+
281
+ If you would rather run the proxy yourself, `pretense start` runs a local HTTP
282
+ proxy that applies the same mutation engine to LLM API traffic:
274
283
 
275
284
  ```bash
276
285
  pretense start # listens on port 9339
@@ -278,13 +287,19 @@ pretense start --port 9500 # any other port
278
287
  curl -s http://localhost:9339/health
279
288
  ```
280
289
 
281
- Then point your tool at it:
290
+ Then point your tool at it **in the same terminal**, as a single command line —
291
+ the base-URL assignment and the tool on one line:
282
292
 
283
293
  ```bash
284
- export ANTHROPIC_BASE_URL=http://localhost:9339
285
- claude
294
+ ANTHROPIC_BASE_URL=http://localhost:9339 claude
286
295
  ```
287
296
 
297
+ > ⚠ Set the base URL in the **same** terminal (same command) as your AI tool. A
298
+ > new terminal does not inherit it and is **not** protected. `export
299
+ > ANTHROPIC_BASE_URL=…` in one terminal and `claude` in another is the #1 way to
300
+ > think you are protected when you are not. The simplest fix is `pretense run`,
301
+ > which never asks you to export anything.
302
+
288
303
  `OPENAI_BASE_URL` works the same way, as does any client that accepts a base URL.
289
304
 
290
305
  ## Zero-export proxy runner
@@ -17,7 +17,7 @@ function versionFromPackageJson() {
17
17
  return void 0;
18
18
  }
19
19
  }
20
- var PRETENSE_VERSION = (true ? "0.6.14" : void 0) ?? versionFromPackageJson() ?? "0.0.0-unknown";
20
+ var PRETENSE_VERSION = (true ? "0.6.16" : void 0) ?? versionFromPackageJson() ?? "0.0.0-unknown";
21
21
 
22
22
  export {
23
23
  PRETENSE_VERSION