feat: add Rust CLI implementation#1
Merged
Merged
Conversation
- Cargo.toml with clap, serde, chrono, anyhow - 4 modules: config, secrets, cache, resolve - Feature parity with shell version: TTL, first-login-of-day, force, secrets-file-change detection - 13 unit tests (secrets parsing, cache read/write, permissions, refresh logic) - Output formats: export (shell eval), dotenv, JSON - CI: tests.yml runs both shell (bats) and Rust (fmt + clippy + test) in parallel - rust-release.yml: cross-compile for linux/macOS amd64/arm64, upload to GitHub Releases - Cargo.lock committed (binary project) - Release profile: LTO, strip, size-optimized Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…vention) - Create src/lib.rs to expose modules as a library crate alongside the binary - Move #[cfg(test)] modules from cache.rs, secrets.rs, resolve.rs into tests/ - Make resolve::apply_post_processor pub for integration test access - Update main.rs to import from the library crate instead of local modules - Add [lib] section and exclude = ["tests/"] to Cargo.toml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
envcache) with full feature parity to the shell versionconfig,secrets,cache,resolve— matching shell script behavior exactly--format export(shell eval),--format dotenv,--format jsontests.ymlruns shell (bats) and Rust (fmt + clippy + test) in parallelrust-release.ymlworkflow for cross-compiling binaries (linux/macOS, amd64/arm64) and uploading to GitHub Releases on tagUsage (Rust binary)
Architecture
Test plan
cargo fmt --checkpassescargo clippy -- -D warningspasses (zero warnings)cargo test— 13/13 passnpm run lint— shellcheck cleannpm test— 10/10 bats tests pass🤖 Generated with Claude Code