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.2.tar.gz (354.8 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.2-py3-none-any.whl (190.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blq_cli-0.9.2.tar.gz
  • Upload date:
  • Size: 354.8 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.2.tar.gz
Algorithm Hash digest
SHA256 dff6547f813ba374bb7dcff3ca5d0e1698f66c1de0d5eff50107e65bcd7ae52b
MD5 384c96774e8f8510ca0be5cfc9162d7d
BLAKE2b-256 db8fc26280afe4e69aef1247f9574a3f8af3b0762463de503db0f563058fac4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for blq_cli-0.9.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: blq_cli-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 190.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f4e8177778b0946b99021012ddf9304694cc1b750ab0a83880a5b37a9c4c0a1
MD5 39e718066139a30c7ea194e66da3ba70
BLAKE2b-256 d6a1187bbf7f06b356c5af1ffddd4ba85b8d164267a936d31aafa84fade1ef86

See more details on using hashes here.

Provenance

The following attestation bundles were made for blq_cli-0.9.2-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