Skip to content

feat: create the first version of logtap cli - #12

Merged
dwego merged 4 commits into
devfrom
feat-first-bin
Jul 18, 2026
Merged

feat: create the first version of logtap cli#12
dwego merged 4 commits into
devfrom
feat-first-bin

Conversation

@dwego

@dwego dwego commented Jul 18, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a new CLI interface for the logtap application, enabling users to specify a configuration file via command-line arguments. It also adds an integration test to ensure the CLI wiring works end-to-end. The most important changes are:

CLI Interface Implementation:

  • Added the clap dependency to Cargo.toml for command-line argument parsing.
  • Implemented a new main function in src/main.rs that uses clap to parse a --config-path argument, loads the specified config file, and runs the application.

Testing and Validation:

  • Added a new integration test in tests/cli_test.rs that spawns the compiled logtap binary as a subprocess, verifies that it reads the config file, and checks that a log line is delivered to a mock HTTP server. This ensures the CLI entry point works as expected.

dwego added 4 commits July 17, 2026 23:02
Multi-stage build (rust:slim -> debian:slim, non-root user), relying on
reqwest's bundled webpki-roots so no ca-certificates package is needed
at runtime. Also tunes the release profile (strip, thin LTO) since the
resulting binary size now matters for image size.
README's Getting started still described a library-only workflow with
no CLI binary, which is out of date now that main.rs and the Dockerfile
exist. Replaces it with the actual build/run steps, exit codes, Docker
usage, and the full current config field reference (retry/backoff,
mask_common_patterns, dead-letter rotation). Also documents the manual
dead-letter replay recipe and checks off the roadmap items that are
now actually done. Fills in the previously-empty root logtap.toml with
a working example.
@dwego
dwego merged commit 9c62831 into dev Jul 18, 2026
1 check passed
@dwego
dwego deleted the feat-first-bin branch July 18, 2026 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant