Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,30 @@ normally — pxpipe compresses the *request* only, never the model's output.
Recent turns stay text; the system prompt, tool docs, and older bulk history
are imaged.

## Use with Claude clients

Start the proxy in one terminal, then point the client at it.

Claude Code CLI on macOS/Linux:

```bash
npx pxpipe-proxy
ANTHROPIC_BASE_URL=http://127.0.0.1:47821 claude
```

Claude Code CLI on Windows PowerShell:

```powershell
npx pxpipe-proxy
$env:ANTHROPIC_BASE_URL = "http://127.0.0.1:47821"
claude
```

Claude Desktop can use the same `ANTHROPIC_BASE_URL` environment variable for
its bundled Claude Code runtime. Start `pxpipe` first, then launch Claude
Desktop from an environment where `ANTHROPIC_BASE_URL` is set to
`http://127.0.0.1:47821`.

## The honest part

- **It is lossy.** Exact 12-char hex strings in dense imaged content:
Expand Down
30 changes: 30 additions & 0 deletions tests/readme-usage.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { describe, expect, it } from 'vitest';
import * as fs from 'node:fs';

const README_PATH = 'README.md';
const USAGE_HEADING = '## Use with Claude clients';
const REQUIRED_USAGE_TEXT = [
'Claude Code CLI',
'ANTHROPIC_BASE_URL=http://127.0.0.1:47821 claude',
'Windows PowerShell',
'$env:ANTHROPIC_BASE_URL',
'Claude Desktop',
'ANTHROPIC_BASE_URL',
] as const;

describe('README usage documentation', () => {
it('documents CLI, Windows PowerShell, and Claude Desktop setup', () => {
const readme = fs.readFileSync(README_PATH, 'utf8');
const sectionStart = readme.indexOf(USAGE_HEADING);

expect(sectionStart).toBeGreaterThanOrEqual(0);

const nextSectionStart = readme.indexOf('\n## ', sectionStart + USAGE_HEADING.length);
const section =
nextSectionStart === -1 ? readme.slice(sectionStart) : readme.slice(sectionStart, nextSectionStart);

for (const requiredText of REQUIRED_USAGE_TEXT) {
expect(section).toContain(requiredText);
}
});
});