Add basic cli application#77
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
+ Coverage 95.35% 97.62% +2.26%
==========================================
Files 12 18 +6
Lines 474 2488 +2014
Branches 59 59
==========================================
+ Hits 452 2429 +1977
- Misses 22 59 +37
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
538cbee to
0b0cfa3
Compare
2cdd27e to
82cd126
Compare
d6c46c4 to
cd4ea12
Compare
This commit adds a new Rust CLI client in a `/cli` directory that can interact with the keys server API. The CLI features: - Fetching keys from the `/keys` route with JSON format - Displaying results in a colorized columnar format for readability - Raw output mode for scripting purposes (detecting stdout using atty) The commit also updates the development container to include Rust tooling via the devcontainers/features/rust:1 feature, making it easy to build and run the CLI without additional setup. Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 3.7
- Current implementation placed under the new subcommand - This is to make way for additional subcommands to be added Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 3.7
Add two new subcommands to the keys CLI tool: - pgp-keys: Fetch and display PGP keys from the server - known-hosts: Fetch and display SSH known hosts from the server Both subcommands support: - Interactive mode with formatted columns and colors - Non-TTY output mode suitable for piping to files or other commands - Consistent display formatting using the generic pretty print table function Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 3.7
- Extract pretty printing utilities into utils/pretty_print.rs - Separate CLI commands into individual modules (ssh_keys.rs, pgp_keys.rs, known_hosts.rs) - Create proper module structure with mod.rs files for better organization - Maintain all existing functionality while improving code maintainability and readability Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 3.7
- Config uses TOML format - Stores in platform-specific locations (based on `directories::ProjectDirs` Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 3.7
- Add --write option to existing keys command to safely update authorized_keys file - Add --force option to existing keys command for complete key replacement - Add comprehensive tests for key synchronization Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 3.7
Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 3.7
Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 4 (Preview)
Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 4 (Preview)
Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 4 (Preview)
Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 4 (Preview)
Note: This commit was mostly authored by Github Copilot Agent using Claude Sonnet 4 (Preview)
Recommended in the cargo FAQ https://doc.rust-lang.org/cargo/faq.html#why-have-cargolock-in-version-control
Bumping the addition introduced some linting errors which have been fixed as part of this commit. We're opting to use git tags and github releases to mark versions. If the crate is to be published, the CI job should populate the version before publishing based on the git tag triggering the CI.
Note: This commit was mostly authored by Github Copilot Agent using
Claude Sonnet 4
- SSH keys now written with user@name format for easy identification
- Key comparison based only on key content, ignoring comments
- Existing keys automatically get updated comments without --force
- Enhanced status messages show comment update count
Note: This commit was mostly authored by Github Copilot Agent using
Claude Sonnet 4
Note: This commit was mostly authored by Github Copilot Agent using
Claude Sonnet 4
Note: This commit was mostly authored by Claude Code using Claude Sonnet 4
- For now, it blows away the local file completely and replaces it with the remote Note: This commit was mostly authored by Claude Code using Claude Sonnet 4
cd4ea12 to
8230e02
Compare
The config file location was being printed twice: once inside ensure_default_config_exists() and again in the init command handler. Removed the print from the helper function to let the caller control the output. Co-Authored-By: Claude <noreply@anthropic.com>
f386e2c to
6e79718
Compare
No description provided.