Skip to main content

Buidl Log Query - capture and query build/test logs with DuckDB

Project description

blq - Build Log Query

A CLI tool for capturing, querying, and analyzing build/test logs. blq parses 60+ log formats into structured data, stores run history with git context, and provides an MCP server for AI agent integration.

Documentation: https://blq-cli.readthedocs.io/

Why blq?

Build tools output thousands of lines of text. Finding the actual errors means scrolling through noise. blq solves this by:

  • Parsing logs into structured events - errors, warnings with file:line:column locations
  • Storing run history - compare runs, track regressions, see what changed
  • Capturing context - git commit, branch, environment, CI info for every run
  • Providing agent tools - MCP server lets AI agents query errors without raw log parsing

Installation

pip install blq-cli

Project Setup

Initialize blq in your project:

cd your-project
blq init --detect

This will:

  • Create .lq/ directory for the database
  • Add .lq/ to .gitignore
  • Auto-detect and register build/test commands from Makefile, package.json, pyproject.toml, etc.

Register Commands

If auto-detect missed something, register commands manually:

blq register build "make -j8"
blq register test "pytest -v"
blq register lint "ruff check ."

Setup for AI Agents (MCP)

blq mcp install

This creates .mcp.json for agent discovery. The MCP server provides tools like run, events, inspect, diff for structured build log access.

Basic Usage

# Run a registered command
blq run build
blq run test

# View errors from the last run
blq errors

# See run history
blq history

# Get details on a specific run
blq info build:5

# Inspect a specific error with context
blq inspect build:5:1

# Compare two runs
blq diff 4 5

Key Features

Feature Description
60+ log formats GCC, Clang, pytest, mypy, ESLint, TypeScript, Rust, Go, and more
Run history Every run stored with git commit, branch, environment
Event references build:5:1 format for drilling into specific errors
Structured output JSON, CSV, Markdown for scripts and agents
MCP server AI agents can query errors without parsing raw logs
CI integration blq ci check for regression detection, blq ci comment for PR comments
Parameterized commands Templates with {placeholder} syntax and defaults

Documentation

For detailed guides and reference:

Quick Reference

# Querying
blq errors                    # Recent errors
blq events --severity=warning # Warnings
blq history                   # Run history
blq info <ref>                # Run details
blq inspect <ref>             # Error with context

# Running
blq run <command>             # Run registered command
blq run test --json           # JSON output for scripts

# Management
blq commands                  # List registered commands
blq register <name> <cmd>     # Add command
blq clean data                # Clear run history

# CI
blq ci check --baseline main  # Check for regressions
blq report                    # Generate markdown report

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blq_cli-0.9.4.tar.gz (351.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blq_cli-0.9.4-py3-none-any.whl (195.6 kB view details)

Uploaded Python 3

File details

Details for the file blq_cli-0.9.4.tar.gz.

File metadata

  • Download URL: blq_cli-0.9.4.tar.gz
  • Upload date:
  • Size: 351.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for blq_cli-0.9.4.tar.gz
Algorithm Hash digest
SHA256 dbe53ebbac8bdee6c86f4822567d0304aa011ffde5208ae78279fa6b4f86fdac
MD5 26d2295feb154ec99848371aefaab847
BLAKE2b-256 ed491433e0a394ec25a1aeb3e455c26cf58b899ad34f6f9cb198aa3587e7d17b

See more details on using hashes here.

Provenance

The following attestation bundles were made for blq_cli-0.9.4.tar.gz:

Publisher: publish.yml on teaguesterling/blq-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file blq_cli-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: blq_cli-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 195.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for blq_cli-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 21cfb6afded657cffd3fb8e6ca85522411e294c9afdcdb9882449cdfc7b04622
MD5 2ad2d5a1dbb139792f4151b4fc28b61e
BLAKE2b-256 a479586f13733d715d39056b8b6854b4c4c9a196d12465fc3c44722b4693b712

See more details on using hashes here.

Provenance

The following attestation bundles were made for blq_cli-0.9.4-py3-none-any.whl:

Publisher: publish.yml on teaguesterling/blq-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page