logstrip 1.0.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/LICENSE +21 -0
- package/README.md +341 -0
- package/action.yml +19 -0
- package/dist/action/index.d.ts +5 -0
- package/dist/action/index.js +26980 -0
- package/dist/cli/index.d.ts +31 -0
- package/dist/cli/index.js +224 -0
- package/dist/core/logstrip-config.d.ts +19 -0
- package/dist/core/logstrip-config.js +268 -0
- package/dist/core/logstrip-parser.d.ts +58 -0
- package/dist/core/logstrip-parser.js +1302 -0
- package/package.json +86 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 mrwogu
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/mrwogu/logstrip/main/assets/banner-800.webp" alt="LogStrip compresses noisy raw logs into compact AI-ready diagnostic context" width="600">
|
|
4
|
+
|
|
5
|
+
# LogStrip
|
|
6
|
+
|
|
7
|
+
**compress noisy logs before they poison your LLM context**
|
|
8
|
+
|
|
9
|
+
_A zero-dependency Node.js CLI (with a TypeScript library and an optional GitHub Action) that turns large server logs, build pipelines, vulnerability scanners, and container workloads into dense, sanitized failure context._
|
|
10
|
+
|
|
11
|
+
[](https://github.com/mrwogu/logstrip/actions/workflows/ci.yml)
|
|
12
|
+
[](https://www.npmjs.com/package/logstrip)
|
|
13
|
+
[](https://codecov.io/gh/mrwogu/logstrip)
|
|
14
|
+
[](https://opensource.org/licenses/MIT)
|
|
15
|
+
|
|
16
|
+

|
|
17
|
+
|
|
18
|
+
[Install](#install) ·
|
|
19
|
+
[Quick Start](#quick-start) ·
|
|
20
|
+
[Benchmarks](#benchmarks) ·
|
|
21
|
+
[vs Alternatives](#vs-alternatives) ·
|
|
22
|
+
[Agents](#works-with-every-agent) ·
|
|
23
|
+
[How It Works](#how-it-works) ·
|
|
24
|
+
[Custom Config](#custom-configuration-logstripyml) ·
|
|
25
|
+
[CLI](#cli) ·
|
|
26
|
+
[Library](#library) ·
|
|
27
|
+
[GitHub Action](#github-action) ·
|
|
28
|
+
[Docs](https://mrwogu.github.io/logstrip/)
|
|
29
|
+
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
You paste a 50k-line CI log into your agent. It chews 200k+ tokens on noise – health checks, framework internals, repeated stack frames, UUIDs – and still misses the one `[ERROR]` line that matters. LogStrip trims that to the diagnostic context an LLM actually needs. One command. Zero dependencies. Streaming – never loads the full log into memory.
|
|
33
|
+
|
|
34
|
+
**What changes:** Session 1 your build fails with a flaky test. You feed the log through `logstrip`. Instead of 12k lines of Maven `[INFO]`, Gradle progress bars, and `node_modules` stack frames, your agent sees: `[x3] [ERROR] test PaymentGateway timeout`, the two surrounding context lines, and a `[... hidden internal library frames ...]` marker. The agent diagnoses the flaky test immediately instead of drowning in noise.
|
|
35
|
+
|
|
36
|
+
## Install <a id="install"></a>
|
|
37
|
+
|
|
38
|
+
Requires Node.js 20 or newer.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install --global logstrip
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Or run without installing:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx -y logstrip raw.log -o clean.log
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Quick Start <a id="quick-start"></a>
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# File in, file out
|
|
54
|
+
logstrip raw.log -o clean.log
|
|
55
|
+
|
|
56
|
+
# Unix pipe (stdin → stdout)
|
|
57
|
+
cat raw.log | logstrip > clean.log
|
|
58
|
+
|
|
59
|
+
# File in, stats to stderr, compressed log to stdout
|
|
60
|
+
logstrip raw.log --stats > clean.log
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 30-second demo
|
|
64
|
+
|
|
65
|
+
```text
|
|
66
|
+
Raw input:
|
|
67
|
+
[INFO] boot ok
|
|
68
|
+
[ERROR] request 123e4567-e89b-12d3-a456-426614174000 failed
|
|
69
|
+
[ERROR] request 987e6543-e21b-42d3-b456-526614174111 failed
|
|
70
|
+
at lib (/repo/node_modules/pkg/index.js:1:1)
|
|
71
|
+
|
|
72
|
+
LogStrip output:
|
|
73
|
+
[x2] [ERROR] request [ID] failed
|
|
74
|
+
[... hidden internal library frames ...]
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
<a id="benchmarks"></a>
|
|
78
|
+
<img src="https://raw.githubusercontent.com/mrwogu/logstrip/main/assets/tags/section-benchmarks.svg" alt="Benchmarks" width="320">
|
|
79
|
+
|
|
80
|
+
Compression ratios from the 38 fixture test suite across real-world log sources:
|
|
81
|
+
|
|
82
|
+
| Category | Sample fixture | Input lines | Output lines | Token savings |
|
|
83
|
+
|:---|:---|---:|---:|---:|
|
|
84
|
+
| CI platforms | `ci-platforms.log` | 57 | 18 | 68% |
|
|
85
|
+
| Build toolchains | `build-toolchains.log` | 70 | 23 | 67% |
|
|
86
|
+
| Security scanners | `security-scanners.log` | 88 | 25 | 72% |
|
|
87
|
+
| Infra / Cloud | `terraform-ansible-systemd.log` | 41 | 14 | 66% |
|
|
88
|
+
| Serverless | `cloud-serverless.log` | 32 | 11 | 66% |
|
|
89
|
+
| Java enterprise | `java-enterprise.log` | 92 | 28 | 70% |
|
|
90
|
+
| AI/ML ecosystem | `ai-ml-ecosystem.log` | 85 | 22 | 74% |
|
|
91
|
+
| Web frameworks | `web-frameworks-node.log` | 68 | 20 | 71% |
|
|
92
|
+
| Docker build | `docker-build.log` | 54 | 16 | 70% |
|
|
93
|
+
| Kubernetes | `kubernetes-crashloop.log` | 47 | 12 | 74% |
|
|
94
|
+
|
|
95
|
+
Production logs with millions of lines routinely hit **80%+** token savings because noise ratios scale with log size.
|
|
96
|
+
|
|
97
|
+
> Full fixture catalogue: [`tests/fixtures/`](tests/fixtures/) – 38 `.log` files covering 705+ ecosystem signatures. Each fixture has a committed snapshot baseline.
|
|
98
|
+
|
|
99
|
+
<a id="vs-alternatives"></a>
|
|
100
|
+
<img src="https://raw.githubusercontent.com/mrwogu/logstrip/main/assets/tags/section-competitors.svg" alt="vs Alternatives" width="320">
|
|
101
|
+
|
|
102
|
+
| | **LogStrip** | `grep -v` / `awk` | LLM summarization | logreduce |
|
|
103
|
+
|:---|:---|:---|:---|:---|
|
|
104
|
+
| **Type** | Streaming log compressor | Line filter | API call + prompt | ML-based anomaly detector |
|
|
105
|
+
| **Token savings** | **80%+** (typical CI logs) | 20–40% (fragile patterns) | 60–80% (expensive, lossy) | ~50% (anomaly-only) |
|
|
106
|
+
| **Streaming** | Yes (readline, bounded memory) | Yes (pipe) | No (buffer entire log) | No (batch) |
|
|
107
|
+
| **Deduplication** | Smart `[xN]` folding with delta values | No | Approximate | No |
|
|
108
|
+
| **Sanitization** | UUIDs, IPs, timestamps, AWS keys, JWTs | Manual regex | Unreliable | Partial |
|
|
109
|
+
| **Stacktrace collapse** | Internal `node_modules` → single marker | No | Often drops context | No |
|
|
110
|
+
| **Runtime deps** | **0** (node:\* built-ins only) | 0 | Heavy (API + tokens) | Python + ML stack |
|
|
111
|
+
| **LLM cost** | **$0** (pure computation) | $0 | $0.01–$1.00+ per log | $0 (compute only) |
|
|
112
|
+
| **Extensible** | `.logstrip.yml` custom config | Shell scripts | Prompt engineering | Plugin system |
|
|
113
|
+
| **CI integration** | CLI + GitHub Action | Shell scripts | API wrapper | CLI |
|
|
114
|
+
|
|
115
|
+
<a id="works-with-every-agent"></a>
|
|
116
|
+
<img src="https://raw.githubusercontent.com/mrwogu/logstrip/main/assets/tags/section-agents.svg" alt="Works with every agent" width="320">
|
|
117
|
+
|
|
118
|
+
LogStrip ships agent plugin bundles so assistants compress logs before
|
|
119
|
+
diagnosing them. The workflow is the same everywhere: run `logstrip`, analyze the
|
|
120
|
+
`.logstrip.log`, then report token savings from `--stats`.
|
|
121
|
+
|
|
122
|
+
| | | | | | |
|
|
123
|
+
|:---:|:---:|:---:|:---:|:---:|:---:|
|
|
124
|
+
| [](https://claude.ai/product/claude-code)<br>**Claude Code**<br>marketplace plugin | [](https://github.com/openai/codex)<br>**Codex CLI**<br>skill + command | [](https://factory.ai)<br>**Factory Droid**<br>marketplace plugin | [](https://cursor.com)<br>**Cursor**<br>rule + command | [](https://github.com/features/copilot)<br>**GitHub Copilot**<br>skill + command | [](https://github.com/opencode-ai/opencode)<br>**OpenCode**<br>skill + `/logstrip` |
|
|
125
|
+
| [](https://github.com/Aider-AI/aider)<br>**Aider**<br>CLI pipe | [](https://github.com/cline/cline)<br>**Cline**<br>CLI pipe | [](https://github.com/google-gemini/gemini-cli)<br>**Gemini CLI**<br>CLI pipe | [](https://windsurf.com)<br>**Windsurf**<br>CLI pipe | [](https://github.com/RooCodeInc/Roo-Code)<br>**Roo Code**<br>CLI pipe | **Any agent**<br>CLI / `stdin` pipe |
|
|
126
|
+
|
|
127
|
+
Works with **any** agent that can run a shell command or read a file. One binary, compressed output shared across all of them.
|
|
128
|
+
|
|
129
|
+
See the [Agent Plugin Installation guide](https://mrwogu.github.io/logstrip/guides/plugins/) for per-agent setup.
|
|
130
|
+
|
|
131
|
+
<a id="how-it-works"></a>
|
|
132
|
+
<img src="https://raw.githubusercontent.com/mrwogu/logstrip/main/assets/tags/section-how.svg" alt="How It Works" width="320">
|
|
133
|
+
|
|
134
|
+
LogStrip detects **705+ log ecosystems** and applies several cuts to every streamed line:
|
|
135
|
+
|
|
136
|
+
| Cut | What it does |
|
|
137
|
+
|:---|:---|
|
|
138
|
+
| **Defoliation** | Drops `[INFO]`, `[DEBUG]`, `[TRACE]`, and `[VERBOSE]` lines. |
|
|
139
|
+
| **Sanitization** | Replaces UUIDs, timestamps, IPs, AWS keys, and long hashes with compact placeholders. |
|
|
140
|
+
| **Context scoring** | Keeps high-signal diagnostics and nearby context while dampening repeated spam (TF-IDF). |
|
|
141
|
+
| **Smart dedup** | Folds repeated sanitized lines, including same-shape variants, into `[xN] message` with only differing values listed. |
|
|
142
|
+
| **Stack collapse** | Replaces internal `node_modules/` and runtime frames with one marker line. |
|
|
143
|
+
|
|
144
|
+
```text
|
|
145
|
+
[INFO] boot ok ← dropped (noise tag)
|
|
146
|
+
[ERROR] request 123e4567-...-426614174000 failed ← kept + sanitized
|
|
147
|
+
[ERROR] request 987e6543-...-526614174111 failed ← kept + sanitized → folded
|
|
148
|
+
[ERROR] charge failed id=018f23ab-... amount=99.99 ← kept + sanitized → dedup group
|
|
149
|
+
[ERROR] charge failed id=018f23ab-... amount=49.50 ← kept + sanitized → dedup group
|
|
150
|
+
[ERROR] charge failed id=018f23ab-... amount=12.00 ← kept + sanitized → dedup group
|
|
151
|
+
at lib (/repo/node_modules/pkg/index.js:1:1) ← internal stack → marker
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
becomes:
|
|
155
|
+
|
|
156
|
+
```text
|
|
157
|
+
[x2] [ERROR] request [ID] failed
|
|
158
|
+
[x3] [ERROR] charge failed id=[ID] amount=[99.99 | 49.50 | 12.00]
|
|
159
|
+
[... hidden internal library frames ...]
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
See the [full source catalogue](https://mrwogu.github.io/logstrip/reference/sources/) for all 705+ detected ecosystems.
|
|
163
|
+
|
|
164
|
+
<a id="custom-configuration-logstripyml"></a>
|
|
165
|
+
<img src="https://raw.githubusercontent.com/mrwogu/logstrip/main/assets/tags/section-config.svg" alt="Custom Configuration" width="320">
|
|
166
|
+
|
|
167
|
+
Corporations and teams running internal tools can extend LogStrip
|
|
168
|
+
without modifying source code. Create a `.logstrip.yml` file (or pass
|
|
169
|
+
`--config path/to/config.yml`) to define custom log sources, diagnostic
|
|
170
|
+
patterns, ignore rules, sanitization rules, and internal stack patterns
|
|
171
|
+
that merge with the built-in set at runtime.
|
|
172
|
+
|
|
173
|
+
```yaml
|
|
174
|
+
# .logstrip.yml – Acme Corp CI extension
|
|
175
|
+
sources:
|
|
176
|
+
- name: acme-ci
|
|
177
|
+
markers: [acme-ci-runner, "[ACME-CI]"]
|
|
178
|
+
|
|
179
|
+
diagnosticPatterns:
|
|
180
|
+
- "ACME_BUILD_FAILED"
|
|
181
|
+
- "ACME_TEST_TIMEOUT"
|
|
182
|
+
|
|
183
|
+
ignorePatterns:
|
|
184
|
+
- "\\bacme-ci heartbeat\\b"
|
|
185
|
+
|
|
186
|
+
sanitizePatterns:
|
|
187
|
+
- pattern: "ACME-EMP-\\d{6}"
|
|
188
|
+
replacement: "[ACME-EMP]"
|
|
189
|
+
- pattern: "acme-tenant/[a-z0-9-]+"
|
|
190
|
+
replacement: "acme-tenant/[ID]"
|
|
191
|
+
flags: "gi"
|
|
192
|
+
|
|
193
|
+
internalStackPatterns:
|
|
194
|
+
- "/opt/acme/ci-runner/"
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**How it works:**
|
|
198
|
+
|
|
199
|
+
1. **Auto-detection** – When `--config` is not provided, the CLI looks
|
|
200
|
+
for `.logstrip.yml` in the current working directory.
|
|
201
|
+
2. **Merging** – Custom sources with a name that already exists in the
|
|
202
|
+
built-in set (e.g. `docker`) have their markers **merged**. New
|
|
203
|
+
names are appended.
|
|
204
|
+
3. **Order of application** – Custom ignore patterns are checked
|
|
205
|
+
**before** built-in noise-tag filtering. Custom sanitize rules run
|
|
206
|
+
**after** built-in sanitization. Custom diagnostic patterns add
|
|
207
|
+
+50 to the relevance score. Custom internal-stack patterns are
|
|
208
|
+
checked alongside built-in ones.
|
|
209
|
+
4. **Zero new runtime dependencies** – The YAML subset parser is
|
|
210
|
+
built into `logstrip-config.ts` and handles mappings, sequences,
|
|
211
|
+
inline arrays, quoted and unquoted strings, and comments. It does
|
|
212
|
+
not require `js-yaml` or any external package.
|
|
213
|
+
|
|
214
|
+
Then simply run:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
logstrip ci-output.log -o clean.log # .logstrip.yml auto-detected
|
|
218
|
+
logstrip ci-output.log -o clean.log --config /etc/logstrip/acme.yml # explicit
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Full config reference: [CLI docs – Custom configuration](https://mrwogu.github.io/logstrip/reference/cli/#custom-configuration-logstripyml)
|
|
222
|
+
|
|
223
|
+
## CLI <a id="cli"></a>
|
|
224
|
+
|
|
225
|
+
LogStrip is primarily a CLI tool. Both `logstrip` and `logstrip` are
|
|
226
|
+
registered as bins, so you can call whichever feels natural.
|
|
227
|
+
|
|
228
|
+
```text
|
|
229
|
+
Usage: logstrip [INPUT] [options]
|
|
230
|
+
|
|
231
|
+
Arguments:
|
|
232
|
+
INPUT Path to the raw log. When omitted, reads from stdin.
|
|
233
|
+
|
|
234
|
+
Options:
|
|
235
|
+
-o, --output <path> Write the compressed log to <path>. Defaults to stdout.
|
|
236
|
+
-a, --aggressiveness <l> Compression preset: low | medium | high | aggressive (default: high).
|
|
237
|
+
--config <path> Path to .logstrip.yml config file. Auto-detects from cwd.
|
|
238
|
+
-s, --stats Print compression statistics to stderr.
|
|
239
|
+
-j, --json Print LogStripResult as JSON to stdout. Requires --output.
|
|
240
|
+
-h, --help Show help text and exit.
|
|
241
|
+
-v, --version Print the CLI version and exit.
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Recipes
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# 1. File in, file out
|
|
248
|
+
logstrip raw.log -o clean.log
|
|
249
|
+
|
|
250
|
+
# 2. Pipe stdin to stdout (Unix-style)
|
|
251
|
+
cat raw.log | logstrip > clean.log
|
|
252
|
+
|
|
253
|
+
# 3. File in, stats to stderr while content streams to stdout
|
|
254
|
+
logstrip raw.log --stats > clean.log
|
|
255
|
+
|
|
256
|
+
# 4. Programmatic report - compressed log to file, JSON report to stdout
|
|
257
|
+
logstrip raw.log -o clean.log --json
|
|
258
|
+
|
|
259
|
+
# 5. Custom config for internal tools
|
|
260
|
+
logstrip raw.log -o clean.log --config .logstrip.yml
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
PowerShell equivalents:
|
|
264
|
+
|
|
265
|
+
```powershell
|
|
266
|
+
Get-Content raw.log | logstrip > clean.log
|
|
267
|
+
logstrip raw.log --stats -o clean.log; Get-Content clean.log -Tail 20
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Exit codes
|
|
271
|
+
|
|
272
|
+
| Code | Meaning |
|
|
273
|
+
|:--:|:---|
|
|
274
|
+
| `0` | success |
|
|
275
|
+
| `1` | runtime failure (I/O error, stream error) |
|
|
276
|
+
| `2` | usage error (bad flag, unsupported aggressiveness, `--json` without `--output`, stdin is a TTY) |
|
|
277
|
+
|
|
278
|
+
## Library <a id="library"></a>
|
|
279
|
+
|
|
280
|
+
The compiled package also ships the TypeScript core for embedding directly in
|
|
281
|
+
your own Node tooling.
|
|
282
|
+
|
|
283
|
+
```ts
|
|
284
|
+
import { processLogFile, type LogStripResult } from 'logstrip';
|
|
285
|
+
|
|
286
|
+
const result: LogStripResult = await processLogFile('raw.log', 'clean.log', {
|
|
287
|
+
aggressiveness: 'high',
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
console.log(`saved ${result.savedTokens} tokens (${result.savingsPercent}%)`);
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
`processLogStream(input, output, options)` is also exported for non-file streams
|
|
294
|
+
(stdin, network sockets, custom transforms). Pass `configPath` in options for
|
|
295
|
+
custom config integration.
|
|
296
|
+
|
|
297
|
+
## GitHub Action <a id="github-action"></a>
|
|
298
|
+
|
|
299
|
+
The repository also ships an optional GitHub Action that wraps the same parser.
|
|
300
|
+
It is useful when you want a single step in CI and a tidy Step Summary, but the
|
|
301
|
+
CLI is the primary distribution channel.
|
|
302
|
+
|
|
303
|
+
```yaml
|
|
304
|
+
- name: Compress logs with LogStrip
|
|
305
|
+
uses: mrwogu/logstrip@v1
|
|
306
|
+
id: logstrip
|
|
307
|
+
with:
|
|
308
|
+
log-path: raw_logs.txt
|
|
309
|
+
aggressiveness: high
|
|
310
|
+
|
|
311
|
+
- name: Send compact logs to your AI agent
|
|
312
|
+
run: your-agent analyze --file "${{ steps.logstrip.outputs.output-path }}"
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
See the [GitHub Action reference](https://mrwogu.github.io/logstrip/reference/action/)
|
|
316
|
+
for inputs, outputs, and the Step Summary contract.
|
|
317
|
+
|
|
318
|
+
## Documentation
|
|
319
|
+
|
|
320
|
+
| Resource | Description |
|
|
321
|
+
|:---|:---|
|
|
322
|
+
| [Getting Started](https://mrwogu.github.io/logstrip/getting-started/) | Install the CLI and trim your first log. |
|
|
323
|
+
| [CLI Reference](https://mrwogu.github.io/logstrip/reference/cli/) | Flags, exit codes, recipes, and `--config` docs. |
|
|
324
|
+
| [Core API](https://mrwogu.github.io/logstrip/reference/core/) | TypeScript parser API for library use. |
|
|
325
|
+
| [GitHub Action](https://mrwogu.github.io/logstrip/reference/action/) | Optional CI wrapper around the CLI core. |
|
|
326
|
+
| [Agent Plugins](https://mrwogu.github.io/logstrip/guides/plugins/) | Claude Code, Droid, Copilot, Cursor, Codex, and OpenCode bundles. |
|
|
327
|
+
| [Source Catalogue](https://mrwogu.github.io/logstrip/reference/sources/) | All 705+ detected log ecosystem signatures. |
|
|
328
|
+
| [Security](https://mrwogu.github.io/logstrip/guides/security/) | Sanitization and safe log handling notes. |
|
|
329
|
+
|
|
330
|
+
## Local Development
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
npm install
|
|
334
|
+
npm run typecheck
|
|
335
|
+
npm run test:coverage # 100/100/100/100 gate
|
|
336
|
+
npm run build
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
<div align="center">
|
|
340
|
+
<sub>Built for engineers who want smaller logs, cheaper prompts, and cleaner AI diagnostics.</sub>
|
|
341
|
+
</div>
|
package/action.yml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: LogStrip
|
|
2
|
+
description: Compress large CI logs before sending them to LLM agents.
|
|
3
|
+
inputs:
|
|
4
|
+
log-path:
|
|
5
|
+
description: Path to the raw log file.
|
|
6
|
+
required: true
|
|
7
|
+
aggressiveness:
|
|
8
|
+
description: "Compression level: low, medium, high, aggressive."
|
|
9
|
+
required: false
|
|
10
|
+
default: high
|
|
11
|
+
outputs:
|
|
12
|
+
output-path:
|
|
13
|
+
description: Path to the compressed log file.
|
|
14
|
+
branding:
|
|
15
|
+
icon: scissors
|
|
16
|
+
color: green
|
|
17
|
+
runs:
|
|
18
|
+
using: node20
|
|
19
|
+
main: dist/action/index.js
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type LogStripResult } from '../core/logstrip-parser';
|
|
2
|
+
export declare function run(): Promise<void>;
|
|
3
|
+
export declare function buildOutputPath(inputPath: string): string;
|
|
4
|
+
export declare function getRepositorySlug(): Promise<string>;
|
|
5
|
+
export declare function writeSummary(result: LogStripResult, repository?: string): Promise<void>;
|