Cut the noise. Keep the stack traces.
CI logs are mostly package installs. The failure is a few dozen lines buried under thousands of Downloading… lines. Scrolling for the real stack trace is a tax paid on every red build.
logsnip is a zero-dependency Python CLI that extracts those failure regions and collapses the rest.
Install
pip install git+https://github.com/SybilGambleyyu/logsnip.git
# or the whole toolkit:
curl -fsSL https://raw.githubusercontent.com/SybilGambleyyu/devkit/main/install.sh | bash
Enter fullscreen mode Exit fullscreen mode
One-liners
# Last failure from a GitHub Actions run
gh run view --log-failed | logsnip --last
# Headlines only
logsnip ci-full.log --summary
# Safe to paste into an AI assistant
gh run view --log-failed | logsnip --last | redactx
Enter fullscreen mode Exit fullscreen mode
What it matches
Built-in patterns cover pytest E lines and AssertionError, npm ERR!, rustc error[E…], TypeScript error TS…, GitHub Actions ##[error], make failures, and common exit-code messages. Stack frames after a hit are pulled in automatically.
Design
- No network, no config files, no dependencies — pipe-friendly
-
--checkexits 1 when error-like lines appear (CI gate) -
--jsonfor machines;--summaryfor humans in a hurry - Pairs with redactx before anything leaves your machine
Source: github.com/SybilGambleyyu/logsnip · MIT
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.