MCP server for Tailwind Plus members.
- Hierarchical Configuration - Automatic config discovery from project directories up to user home
- Structured Logging - Daily-rotated JSONL log files with optional OTel correlation
- JSON Output - Machine-readable output for scripting and automation
- Shell Completions - Tab completion for Bash, Zsh, Fish, and PowerShell
- Man Pages - Unix-style documentation
brew install lovelesslabs/brew/draftkitDownload 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)
cargo install draftkitOr build from source:
git clone https://github.com/lovelesslabs/draftkit.git
cd draftkit
cargo install --path crates/draftkitShell completions are included in release archives and Homebrew installs. For manual installation, see Shell Completions below.
# Show version and build information
draftkit info
# JSON output for scripting
draftkit info --json
# Enable verbose output
draftkit --verbose <command>Configuration files are discovered automatically in order of precedence (highest first):
.draftkit.<ext>in current directory or any parentdraftkit.<ext>in current directory or any parent~/.config/draftkit/config.<ext>(user config)
Supported formats: TOML, YAML, JSON, JSON5, INI (extensions: .toml, .yaml, .yml, .json, .json5, .ini)
Values from higher-precedence files override lower ones. Missing files are silently ignored.
See the example configurations in the repository root for templates.
TOML (~/.config/draftkit/config.toml):
log_level = "info"YAML (~/.config/draftkit/config.yaml):
log_level: infoJSON (~/.config/draftkit/config.json):
{
"log_level": "info"
}| 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 |
otel_endpoint |
URL | unset | Enables OTel export when set |
Logs are written as JSONL to a daily-rotated file.
Rotation is date-suffixed (e.g. draftkit.jsonl.2026-01-06).
Default log path (first writable wins):
/var/log/draftkit.jsonl(Unix only, requires write access)- OS user data directory (e.g.
~/.local/share/draftkit/logs/draftkit.jsonl)
Overrides:
APP_LOG_PATH— full file pathAPP_LOG_DIR— directory (file name defaults todraftkit.jsonl)APP_ENV— environment tag (default:dev)- Config file keys:
log_dirandotel_endpoint
OpenTelemetry tracing is opt-in when OTEL_EXPORTER_OTLP_ENDPOINT or otel_endpoint is set.
Shell completions are included in the release archives. To install manually:
Bash
draftkit completions bash > ~/.local/share/bash-completion/completions/draftkitZsh
draftkit completions zsh > ~/.zfunc/_draftkitFish
draftkit completions fish > ~/.config/fish/completions/draftkit.fishPowerShell
draftkit completions powershell > $PROFILE.CurrentUserAllHostsThis project uses a workspace layout with multiple crates:
crates/
├── draftkit/ # CLI binary
└── draftkit-core/ # Core library (config, errors)
- Rust {{msrv}}+ (2024 edition)
- just (task runner)
- cargo-nextest (test runner)
# List available tasks
just --list
# Run full check suite (format, lint, test)
just check
# Run tests only
just test
# Run with coverage
just cov| 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 |
The project includes an xtask crate for build automation:
# Generate man pages
cargo xtask man
# Generate shell completions
cargo xtask completions
# Generate for specific shell
cargo xtask completions --shell zsh- draftkit - The CLI binary. Handles argument parsing, command dispatch, and user interaction.
- draftkit-core - The core library. Contains configuration loading, error types, and shared functionality.
- Libraries use
thiserrorfor structured error types - Binaries use
anyhowfor flexible error propagation - All errors include context for debugging
The ConfigLoader provides flexible configuration discovery:
use draftkit_core::config::{Config, ConfigLoader};
let config = ConfigLoader::new()
.with_project_search(std::env::current_dir()?)
.with_user_config(true)
.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
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
Releases are automated via cargo-dist and cocogitto:
- Commits follow Conventional Commits
- Version bumps are calculated from commit history
- Binaries are built for all supported platforms
- Homebrew formula is updated automatically
To create a release:
# Bump version based on conventional commits
cog bump --auto
# Or specify version type
cog bump --patch
cog bump --minor
cog bump --majorThis 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.
Contributions welcome! Please see AGENTS.md for development conventions.
This project uses Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesperf:- Performance improvementschore:- Maintenance tasks
- Rust 2024 edition
#![deny(unsafe_code)]- Safe Rust only- Follow
rustfmtdefaults - Keep clippy clean
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.