@tracebird/cli 0.1.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 +52 -0
- package/dist/cli.js +1484 -0
- package/dist/cli.js.map +1 -0
- package/dist/ui/assets/index-BEvedEM9.css +1 -0
- package/dist/ui/assets/index-BU67d56w.js +44 -0
- package/dist/ui/index.html +13 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @tracebird/cli
|
|
2
|
+
|
|
3
|
+
The public face of [tracebird](../../README.md). A single `npx` away from a
|
|
4
|
+
local, time-travel debugger for your AI agent runs.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
npx @tracebird/cli # start the OTLP receiver (+ UI, from Stage 3)
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Then point any OpenTelemetry-instrumented agent at it:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Commands
|
|
17
|
+
|
|
18
|
+
| Command | Description |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `tracebird` / `tracebird live` | Start the OTLP receiver, capture spans, and serve the UI. |
|
|
21
|
+
| `tracebird demo` | Serve the UI with bundled sample runs — no agent needed. |
|
|
22
|
+
| `tracebird open <file.jsonl>` | Load a saved session and serve the UI (no receiver). |
|
|
23
|
+
|
|
24
|
+
## JSON API
|
|
25
|
+
|
|
26
|
+
The UI reads a small read-only API (everything delegates to `@tracebird/core`):
|
|
27
|
+
|
|
28
|
+
| Route | Returns |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `GET /api/session` | `{ live, filePath, count }` |
|
|
31
|
+
| `GET /api/runs` | run summaries, newest first |
|
|
32
|
+
| `GET /api/runs/:id` | a full reconstructed `Run` |
|
|
33
|
+
|
|
34
|
+
## Options
|
|
35
|
+
|
|
36
|
+
| Flag | Default | Description |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `--port <n>` | `4318` | Port for the receiver / UI server. |
|
|
39
|
+
| `--host <addr>` | `127.0.0.1` | Address to bind. |
|
|
40
|
+
| `--out <dir>` | `./.tracebird` | Where captured sessions are written. |
|
|
41
|
+
| `--no-open` | — | Don't open the browser on start. |
|
|
42
|
+
|
|
43
|
+
## How it works
|
|
44
|
+
|
|
45
|
+
- A tiny `node:http` server accepts `POST /v1/traces` in both OTLP/JSON and
|
|
46
|
+
OTLP/protobuf (the SDK default). Protobuf is decoded with a vendored
|
|
47
|
+
descriptor — no codegen step.
|
|
48
|
+
- Parsing and reconstruction are delegated entirely to
|
|
49
|
+
[`@tracebird/core`](../core/README.md); the CLI only does I/O.
|
|
50
|
+
```sh
|
|
51
|
+
npx nx test cli
|
|
52
|
+
```
|