Buidl Log Query - capture and query build/test logs with DuckDB
Project description
blq - Build Log Query
BLQ (pronounced "bleak") is a CLI tool that turns build output into a queryable database. blq parses 100+ log formats via duck_hunt into structured events, stores run history with git context, and provides an MCP server for AI agent integration.
Why blq?
Your build fails. You scroll through 500 lines of output looking for the error. blq solves this:
blq run build
# build:3 | exit=1 | 12 errors, 35 warnings
blq errors
# ref severity file line message
# build:3:1 error src/parser.c 142 expected ';' before '}'
# build:3:2 error src/parser.c 156 'node' undeclared
blq inspect build:3:1
# Shows error with source context
Key benefits:
- Structured events — Errors with file:line locations, not raw text
- Run history — Every build stored with git commit, branch, environment
- Comparison —
blq diff 4 5shows what changed between runs - AI agent tools — MCP server for structured access without log parsing
Installation
pip install blq-cli
Quick Start
cd your-project
blq init --detect # Auto-detect build commands
blq run build # Run and capture
blq errors # See what broke
blq inspect build:3:1 # Drill into specific error
blq diff 4 5 # Compare runs
Register commands manually if needed:
blq commands register build "make -j8"
blq commands register test "pytest -v"
AI Agent Integration (MCP)
blq mcp install # Creates .mcp.json
Agents can then use tools like run, events, inspect, diff to work with structured results instead of parsing raw output. See the MCP Guide.
Commands
| Command | Description |
|---|---|
blq run <cmd> |
Run registered command, capture output |
blq errors |
Recent errors |
blq inspect <ref> |
Event details with source context |
blq info <ref> |
Run details |
blq history |
Run history |
blq diff <r1> <r2> |
Compare runs |
blq ci check |
Check for regressions vs baseline |
Event References
Every error gets a reference like build:3:1:
build— command name3— run number1— event within run
Use refs to drill down: blq inspect build:3:1, blq info build:3
Features
| Feature | Description |
|---|---|
| 100+ formats | GCC, Clang, pytest, mypy, ESLint, etc. (see duck_hunt |
| Run history | Every run with git commit, branch, environment |
| Format detection | Auto-detects format at registration time |
| CI integration | blq ci check, blq ci comment for PR feedback |
| MCP server | AI agents query errors without parsing logs |
| Python API | Programmatic access via LogStore, LogQuery |
Documentation
- Getting Started
- MCP Guide — AI agent integration
- Query Guide — Filtering, SQL, output formats
- Integration — CI/CD, hooks, shell completions
- Python API
- Commands Reference
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blq_cli-0.9.17.tar.gz.
File metadata
- Download URL: blq_cli-0.9.17.tar.gz
- Upload date:
- Size: 404.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4253362def4d1caa60c7b024ff105bad6137f38d5b5838cb0b6fd8843be808f0
|
|
| MD5 |
eac4f2ced82e91eef0b21d28b0f08cdc
|
|
| BLAKE2b-256 |
d3f4e7b0c2a91c58b282d42303e6885138bbaa09458b0663f0b3a3cb93a25527
|
Provenance
The following attestation bundles were made for blq_cli-0.9.17.tar.gz:
Publisher:
publish.yml on teaguesterling/blq-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blq_cli-0.9.17.tar.gz -
Subject digest:
4253362def4d1caa60c7b024ff105bad6137f38d5b5838cb0b6fd8843be808f0 - Sigstore transparency entry: 1155422802
- Sigstore integration time:
-
Permalink:
teaguesterling/blq-cli@af105db98f667f4d27c19dbcb7da38e78bd945a2 -
Branch / Tag:
refs/tags/v0.9.17 - Owner: https://github.com/teaguesterling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af105db98f667f4d27c19dbcb7da38e78bd945a2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file blq_cli-0.9.17-py3-none-any.whl.
File metadata
- Download URL: blq_cli-0.9.17-py3-none-any.whl
- Upload date:
- Size: 213.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c889cd59871d6966d27714a1929f7f25b84083aa75d315ceaa094123ffefcccc
|
|
| MD5 |
804b375ee60fd23abb302946e116a1ab
|
|
| BLAKE2b-256 |
b3cbbc4f7ad7067b4b390bde70d13ecee3d9cb1ef1b596b31c7a08c357d17710
|
Provenance
The following attestation bundles were made for blq_cli-0.9.17-py3-none-any.whl:
Publisher:
publish.yml on teaguesterling/blq-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
blq_cli-0.9.17-py3-none-any.whl -
Subject digest:
c889cd59871d6966d27714a1929f7f25b84083aa75d315ceaa094123ffefcccc - Sigstore transparency entry: 1155422803
- Sigstore integration time:
-
Permalink:
teaguesterling/blq-cli@af105db98f667f4d27c19dbcb7da38e78bd945a2 -
Branch / Tag:
refs/tags/v0.9.17 - Owner: https://github.com/teaguesterling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af105db98f667f4d27c19dbcb7da38e78bd945a2 -
Trigger Event:
release
-
Statement type: