poe-code 3.0.68 → 3.0.69
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 +31 -19
- package/dist/index.js +6 -1
- package/dist/index.js.map +2 -2
- package/dist/sdk/spawn.d.ts +3 -0
- package/dist/sdk/spawn.js +17 -1
- package/dist/sdk/spawn.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
<h1>Poe Code ⚡</h1>
|
|
@@ -9,22 +9,24 @@
|
|
|
9
9
|
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
|
-
Power your favorite coding agents (Claude Code, Codex, OpenCode, and more) with your Poe subscription—**no need to handle multiple providers/accounts.** Poe Code routes everything through the [Poe API](https://poe.com/api) .
|
|
13
|
-
|
|
14
|
-
Use it on a single session (`npx poe-code@latest wrap claude`) or configure it as your default and use your tools normally.
|
|
12
|
+
Power your favorite coding agents (Claude Code, Codex, OpenCode, and more) with your Poe subscription—**no need to handle multiple providers/accounts.** Poe Code routes everything through the [Poe API](https://poe.com/api) .
|
|
15
13
|
|
|
14
|
+
Use it on a single session (`npx poe-code@latest wrap claude`) or configure it as your default and use your tools normally.
|
|
16
15
|
|
|
17
16
|
## Quickstart
|
|
17
|
+
|
|
18
18
|
Start a coding session routing all your `claude` calls to Poe
|
|
19
|
+
|
|
19
20
|
```bash
|
|
20
21
|
npx poe-code@latest wrap claude
|
|
21
22
|
# Also available: codex, opencode, kimi
|
|
22
23
|
```
|
|
23
24
|
|
|
24
|
-
or
|
|
25
|
+
or
|
|
25
26
|
|
|
26
27
|
## Set it as your default (works with CLIs and desktop apps)
|
|
27
|
-
|
|
28
|
+
|
|
29
|
+
This updates the provider’s config files and continue using your tools normally.
|
|
28
30
|
|
|
29
31
|
```bash
|
|
30
32
|
# Start the interactive setup
|
|
@@ -34,7 +36,6 @@ npx poe-code@latest configure
|
|
|
34
36
|
npx poe-code@latest configure codex # (or claude, opencode, kimi)
|
|
35
37
|
```
|
|
36
38
|
|
|
37
|
-
|
|
38
39
|
### Unconfigure (remove overrides)
|
|
39
40
|
|
|
40
41
|
```bash
|
|
@@ -47,15 +48,13 @@ npx poe-code@latest unconfigure claude
|
|
|
47
48
|
npx poe-code@latest logout
|
|
48
49
|
```
|
|
49
50
|
|
|
51
|
+
## Quick links
|
|
50
52
|
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
- [Poe API](https://poe.com/api)
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
- [Utilities](#utilities)
|
|
54
|
+
- [Usage and Billing](#usage--billing)
|
|
55
|
+
- [MCP Server](#poe-mcp-server)
|
|
56
|
+
- [SDK](#sdk)
|
|
57
|
+
- [Poe API](https://poe.com/api)
|
|
59
58
|
|
|
60
59
|
## Utilities
|
|
61
60
|
|
|
@@ -145,19 +144,19 @@ npx poe-code@latest mcp unconfigure claude-code
|
|
|
145
144
|
Use `poe-code` programmatically in your own code:
|
|
146
145
|
|
|
147
146
|
```typescript
|
|
148
|
-
import { spawn, getPoeApiKey } from "poe-code"
|
|
147
|
+
import { spawn, getPoeApiKey } from "poe-code";
|
|
149
148
|
|
|
150
149
|
// Get stored API key
|
|
151
|
-
const apiKey = await getPoeApiKey()
|
|
150
|
+
const apiKey = await getPoeApiKey();
|
|
152
151
|
|
|
153
152
|
// Run a prompt through a provider
|
|
154
153
|
const result = await spawn("claude-code", {
|
|
155
154
|
prompt: "Fix the bug in auth.ts",
|
|
156
155
|
cwd: "/path/to/project",
|
|
157
156
|
model: "claude-sonnet-4-6"
|
|
158
|
-
})
|
|
157
|
+
});
|
|
159
158
|
|
|
160
|
-
console.log(result.stdout)
|
|
159
|
+
console.log(result.stdout);
|
|
161
160
|
```
|
|
162
161
|
|
|
163
162
|
### `spawn(service, options)`
|
|
@@ -172,6 +171,19 @@ Runs a single prompt through a configured service CLI.
|
|
|
172
171
|
|
|
173
172
|
Returns `{ stdout, stderr, exitCode }`.
|
|
174
173
|
|
|
174
|
+
### `spawn.pretty(service, options)`
|
|
175
|
+
|
|
176
|
+
Same as `spawn()`, but renders the ACP event stream to stdout with colored, formatted output — matching the CLI's visual style.
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
import { spawn } from "poe-code"
|
|
180
|
+
|
|
181
|
+
const result = await spawn.pretty("codex", "Fix the bug in auth.ts")
|
|
182
|
+
console.log(result.exitCode)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Returns `Promise<{ stdout, stderr, exitCode }>`.
|
|
186
|
+
|
|
175
187
|
### `getPoeApiKey()`
|
|
176
188
|
|
|
177
189
|
Reads the Poe API key with the following priority:
|
package/dist/index.js
CHANGED
|
@@ -5531,6 +5531,11 @@ var init_spawn3 = __esm({
|
|
|
5531
5531
|
init_spawn_core();
|
|
5532
5532
|
await init_container();
|
|
5533
5533
|
init_src4();
|
|
5534
|
+
spawn3.pretty = async function pretty(service, promptOrOptions, maybeOptions) {
|
|
5535
|
+
const { events, result } = spawn3(service, promptOrOptions, maybeOptions);
|
|
5536
|
+
await renderAcpStream(events);
|
|
5537
|
+
return result;
|
|
5538
|
+
};
|
|
5534
5539
|
}
|
|
5535
5540
|
});
|
|
5536
5541
|
|
|
@@ -38447,7 +38452,7 @@ var init_package = __esm({
|
|
|
38447
38452
|
"package.json"() {
|
|
38448
38453
|
package_default = {
|
|
38449
38454
|
name: "poe-code",
|
|
38450
|
-
version: "3.0.
|
|
38455
|
+
version: "3.0.69",
|
|
38451
38456
|
description: "CLI tool to configure Poe API for developer workflows.",
|
|
38452
38457
|
type: "module",
|
|
38453
38458
|
main: "./dist/index.js",
|