smol-logs 1.0.0 → 1.0.1
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 +20 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
A CLI tool to compress verbose text output (logs, test output, build logs) into a human-readable, AI-friendly format. Reduces token usage when working with AI tools by intelligently encoding repetition.
|
|
4
4
|
|
|
5
|
+
## For AI Agents (Claude, etc.)
|
|
6
|
+
|
|
7
|
+
When running commands that produce verbose output, pipe through `smol` to reduce tokens:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm test 2>&1 | smol
|
|
11
|
+
npm run build 2>&1 | smol
|
|
12
|
+
docker logs container_name 2>&1 | smol
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**When to use:**
|
|
16
|
+
- Test runs with many similar log lines
|
|
17
|
+
- Build output with repeated warnings/errors
|
|
18
|
+
- Any command outputting >100 lines
|
|
19
|
+
|
|
20
|
+
**Reading compressed output:**
|
|
21
|
+
- `↑ repeated N times` = previous line appeared N consecutive times
|
|
22
|
+
- `↑ appears N times` = previous line appeared N times throughout (non-consecutive)
|
|
23
|
+
- `"template with {var}"` + `↑ pattern matched N times: var = a, b, c` = N similar lines differing only in the variable parts
|
|
24
|
+
|
|
5
25
|
## Installation
|
|
6
26
|
|
|
7
27
|
```bash
|