Skip to content

Commit e4b993c

Browse files
committed
docs: add env vars to README, update ROADMAP with pinned logs and log rotation
1 parent 93afd47 commit e4b993c

2 files changed

Lines changed: 56 additions & 5 deletions

File tree

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,28 @@ Config lives at `~/.llm-debugger/config.yaml` and logs at `~/.llm-debugger/logs`
7575

7676
- `LLM_DEBUGGER_HOME` - Base directory
7777

78+
### Environment Variables
79+
80+
Define env vars in your config and reference them in alias headers with `${VAR_NAME}`:
81+
82+
```yaml
83+
env:
84+
OPENAI_API_KEY: sk-xxx
85+
ANTHROPIC_API_KEY: sk-ant-xxx
86+
87+
aliases:
88+
openai:
89+
url: "https://api.openai.com"
90+
headers:
91+
Authorization: "Bearer ${OPENAI_API_KEY}"
92+
anthropic:
93+
url: "https://api.anthropic.com"
94+
headers:
95+
x-api-key: "${ANTHROPIC_API_KEY}"
96+
```
97+
98+
Env vars defined in `env` are loaded at startup with lowest precedence — real environment variables and `.env` files take priority.
99+
78100
### Config Commands
79101

80102
```bash
@@ -83,6 +105,7 @@ npx llm-debugger@latest config edit # Open config in editor
83105
npx llm-debugger@latest config add-alias <name> <url> # Add an alias
84106
npx llm-debugger@latest config remove-alias <name> # Remove an alias
85107
npx llm-debugger@latest config set-default-alias <name> # Set default alias for root requests
108+
npx llm-debugger@latest config set <key> <value> # Set a config value (enabled, max_logs)
86109
```
87110

88111
## License

ROADMAP.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Compare
44

5-
Compare up to 3 logs side-by-side.
5+
Compare up to 5 logs side-by-side.
66

77
### Flow
88

99
1. Click "Compare" button on index page → enters selection mode
1010
2. Checkboxes appear on each log card
11-
3. Select 2-3 logs (max 3)
11+
3. Select 2-5 logs (max 5)
1212
4. "Compare Selected" button appears → navigates to compare page with selected log IDs
1313

1414
### Compare Page
@@ -34,8 +34,36 @@ Compare up to 3 logs side-by-side.
3434

3535
---
3636

37-
## Backlog (DO NOT IMPLEMENT)
37+
## Pinned Logs
38+
39+
Pin important logs to protect them from log rotation and quickly filter to them.
40+
41+
### Features
3842

39-
### Pinned reference column
43+
- **Pin/Unpin**: Click "..." menu on any log card → select "Pin" or "Unpin"
44+
- **Pin indicator**: Pinned logs show a 📌 icon in the index view
45+
- **Pinned filter**: Click "Pinned" button to show only pinned logs
46+
- **Rotation protection**: Pinned logs are never deleted by log rotation
47+
- **Storage**: Pinned log IDs stored in `~/.llm-debugger/pinned.yaml`
48+
49+
### API
50+
51+
- `POST /__viewer__/:provider/:filename/pin` — pin a log
52+
- `DELETE /__viewer__/:provider/:filename/pin` — unpin a log
53+
- `GET /__viewer__/:provider/:filename/pin` — check pin status
54+
55+
---
4056

41-
Pin one log as the "baseline" (left-most, fixed position) while scrolling through others horizontally. Useful for comparing variations against a known-good request.
57+
## Log Rotation
58+
59+
Automatically delete oldest logs when the total exceeds a configured limit.
60+
61+
### Config
62+
63+
- `max_logs: 100` (default) — set to `0` for unlimited
64+
- Configurable via UI (Settings → Max Logs) or CLI (`llm-debugger config set max_logs 50`)
65+
- Pinned logs are excluded from rotation
66+
67+
---
68+
69+
## Backlog (DO NOT IMPLEMENT)

0 commit comments

Comments
 (0)