-
Notifications
You must be signed in to change notification settings - Fork 0
Add basic cli application #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
- Coverage 95.35% 93.86% -1.50%
==========================================
Files 12 18 +6
Lines 474 2150 +1676
Branches 59 59
==========================================
+ Hits 452 2018 +1566
- Misses 22 132 +110
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
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
faaf6bf to
3f04b19
Compare
- 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
3f04b19 to
57d3396
Compare
- 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
e9bf560 to
2cdd27e
Compare
Note: This commit was mostly authored by Github Copilot Agent using
Claude Sonnet 4
2cdd27e to
82cd126
Compare
Note: This commit was mostly authored by Claude Code using Claude Sonnet 4
f2e5acd to
d6c46c4
Compare
- 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
d6c46c4 to
cd4ea12
Compare
No description provided.