Skip to content

Conversation

@danielemery
Copy link
Owner

No description provided.

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
@danielemery danielemery linked an issue Jun 25, 2025 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jun 25, 2025

Codecov Report

❌ Patch coverage is 93.43675% with 110 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.86%. Comparing base (753c98f) to head (cd4ea12).

Files with missing lines Patch % Lines
cli/src/commands/known_hosts.rs 88.76% 62 Missing ⚠️
cli/src/config/mod.rs 89.77% 18 Missing ⚠️
cli/src/main.rs 0.00% 18 Missing ⚠️
cli/src/commands/ssh_keys.rs 98.31% 9 Missing ⚠️
cli/src/commands/pgp_keys.rs 99.12% 3 Missing ⚠️
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     
Flag Coverage Δ
deno-server 95.35% <ø> (?)
rust-cli 93.43% <93.43%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai
Copy link

coderabbitai bot commented Jun 25, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 24-add-basic-cli-application

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from 538cbee to 0b0cfa3 Compare June 25, 2025 15:02
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from faaf6bf to 3f04b19 Compare July 22, 2025 19:07
- 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)
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
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from 3f04b19 to 57d3396 Compare July 22, 2025 19:26
- 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
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from e9bf560 to 2cdd27e Compare July 25, 2025 15:17
Note: This commit was mostly authored by Github Copilot Agent using
      Claude Sonnet 4
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from 2cdd27e to 82cd126 Compare July 25, 2025 16:06
Note: This commit was mostly authored by Claude Code using Claude Sonnet 4
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from f2e5acd to d6c46c4 Compare September 9, 2025 09:06
- 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
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from d6c46c4 to cd4ea12 Compare September 9, 2025 09:26
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.

Add basic cli application

1 participant