bito-lint
Quality gate tooling for building-in-the-open artifacts
Features
-
Hierarchical Configuration - Automatic config discovery from project directories up to user home
-
Structured Logging - Daily-rotated JSONL log files
-
JSON Output - Machine-readable output for scripting and automation
-
Shell Completions - Tab completion for Bash, Zsh, Fish, and PowerShell
-
Man Pages - Unix-style documentation
Installation
Homebrew (macOS and Linux)
Pre-built Binaries
Download the latest release for your platform from the releases page.
Binaries are available for:
- macOS (Apple Silicon and Intel)
- Linux (x86_64 and ARM64, glibc and musl)
- Windows (x86_64 and ARM64)
From Source
Or build from source:
Shell Completions
Shell completions are included in release archives and Homebrew installs. For manual installation, see Shell Completions below.
Usage
# Show version and build information
# JSON output for scripting
# Enable verbose output
Configuration
Configuration files are discovered automatically in order of precedence (highest first):
.bito-lint.<ext>in current directory or any parentbito-lint.<ext>in current directory or any parent~/.config/bito-lint/config.<ext>(user config)
Supported formats: TOML, YAML, JSON (extensions: .toml, .yaml, .yml, .json)
Values from higher-precedence files override lower ones. Missing files are silently ignored.
See the example configurations in the repository root for templates.
Example Configuration
TOML (~/.config/bito-lint/config.toml):
= "info"
YAML (~/.config/bito-lint/config.yaml):
log_level: info
JSON (~/.config/bito-lint/config.json):
Configuration Options
| Option | Values | Default | Description |
|---|---|---|---|
log_level |
debug, info, warn, error |
info |
Minimum log level to display |
log_dir |
path | platform default | Directory for JSONL log files |
Logging
Logs are written as JSONL to a daily-rotated file.
Rotation is date-suffixed (e.g. bito-lint.jsonl.2026-01-06).
Note: Logs never write to stdout, which is reserved for application output (important for tools like MCP servers that use stdout for communication).
Default log path (first writable wins):
/var/log/bito-lint.jsonl(Unix only, requires write access)- OS user data directory (e.g.
~/.local/share/bito-lint/logs/bito-lint.jsonl) - Falls back to stderr if no writable directory is found
Overrides:
BITO_LINT_LOG_PATH— full file pathBITO_LINT_LOG_DIR— directory (file name defaults tobito-lint.jsonl)BITO_LINT_ENV— environment tag (default:dev)- Config file key:
log_dir
Shell Completions
Shell completions are included in the release archives. To install manually:
Bash
Zsh
Fish
PowerShell
bito-lint completions powershell > $PROFILE.CurrentUserAllHosts
Development
This project uses a workspace layout with multiple crates:
crates/
├── bito-lint/ # CLI binary
└── bito-lint-core/ # Core library (config, errors)
Prerequisites
- Rust 1.88.0+ (2024 edition)
- just (task runner)
- cargo-nextest (test runner)
Quick Start
# List available tasks
# Run full check suite (format, lint, test)
# Run tests only
# Run with coverage
Build Tasks
| Command | Description |
|---|---|
just check |
Format, lint, and test |
just fmt |
Format code with rustfmt |
just clippy |
Run clippy lints |
just test |
Run tests with nextest |
just doc-test |
Run documentation tests |
just cov |
Generate coverage report |
xtask Commands
The project includes an xtask crate for build automation:
# Generate man pages
# Generate shell completions
# Generate for specific shell
Architecture
Crate Organization
- bito-lint - The CLI binary. Handles argument parsing, command dispatch, and user interaction.
- bito-lint-core - The core library. Contains configuration loading, error types, and shared functionality.
Error Handling
- Libraries use
thiserrorfor structured error types - Binaries use
anyhowfor flexible error propagation - All errors include context for debugging
Configuration System
The ConfigLoader provides flexible configuration discovery:
use ;
let config = new
.with_project_search
.with_user_config
.load?;
Features:
- Walks up directory tree looking for config files
- Stops at repository boundaries (
.gitby default) - Merges multiple config sources with clear precedence
- Supports explicit file paths for testing
CI/CD
This project uses GitHub Actions for continuous integration:
- Build & Test - Runs on every push and PR
- MSRV Check - Verifies minimum supported Rust version
- Clippy - Enforces lint rules
- Coverage - Tracks test coverage
Dependabot
This project uses Dependabot for security monitoring, but not for automatic pull requests. Instead:
- Dependabot scans for vulnerabilities in dependencies
- A weekly GitHub Actions workflow converts alerts into issues
- Maintainers review and address updates manually
This approach provides:
- Full control over when and how dependencies are updated
- Opportunity to batch related updates together
- Time to test updates before merging
- Cleaner git history without automated PR noise
Security alerts appear as issues labeled dependabot-alert.
Contributing
Contributions welcome! Please see AGENTS.md for development conventions.
Commit Messages
This project uses Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesperf:- Performance improvementschore:- Maintenance tasks
Code Style
- Rust 2024 edition
#![deny(unsafe_code)]- Safe Rust only- Follow
rustfmtdefaults - Keep clippy clean
License
Licensed under the MIT license (LICENSE-MIT).