logsnip: cut CI noise, keep the stack traces
CI logs are mostly package installs. The failure is a few dozen lines
buried under thousands of Downloading… / Requirement
already satisfied lines. Scrolling for the real stack trace is a
tax paid on every red build.
logsnip is a zero-dependency 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
One-liners that earn their keep
# Last failure from a GitHub Actions run
gh run view --log-failed | logsnip --last
# Headlines only (scan multi-job logs fast)
logsnip ci-full.log --summary
# Safe to paste into an AI assistant
gh run view --log-failed | logsnip --last | redactx
# Collapse install spam without filtering
logsnip huge.log --collapse-only -o clean.log
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 and caret diagnostics after a hit are pulled in automatically.
Design notes
- No network, no config files, no dependencies — pipe-friendly.
--checkexits 1 when error-like lines appear (CI gate).--jsonfor machine consumers;--summaryfor humans in a hurry.- Pairs with redactx before anything leaves your machine.
Source: github.com/SybilGambleyyu/logsnip. MIT.