parseable
parseable copied to clipboard
feat: Support configuring Parseable via TOML config file
Fixes #1157
Description
Goal: allow configuring Parseable via a TOML file so users don’t juggle dozens of P_* env vars.
Approach: load a config file before Clap runs, hydrate env defaults, and let CLI/env overrides keep their precedence.
Key changes: new config_loader, --config-file flag, added toml dependency, docs/tests for the workflow
This PR has:
- [x] been tested to ensure log ingestion and log query works.
- [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [x] added documentation for new or modified features or behaviors.
Summary by CodeRabbit
-
New Features
- TOML configuration support for environment defaults (defaults to parseable.toml)
- New CLI option to specify a custom config file
- Config values map to environment variables with CLI flags taking precedence
- Storage backend selection via TOML, with automatic injection when configured
-
Documentation
- Added "Configure with TOML" guide and examples to the README
-
Tests
- Added tests covering config-driven CLI behavior and environment handling
✏️ Tip: You can customize this high-level summary in your review settings.