Skip to content

Add basic cli application#77

Draft
danielemery wants to merge 27 commits into
mainfrom
24-add-basic-cli-application
Draft

Add basic cli application#77
danielemery wants to merge 27 commits into
mainfrom
24-add-basic-cli-application

Conversation

@danielemery
Copy link
Copy Markdown
Owner

No description provided.

@danielemery danielemery linked an issue Jun 25, 2025 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 25, 2025

Codecov Report

❌ Patch coverage is 98.16286% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.62%. Comparing base (f3b6171) to head (8d712a1).

Files with missing lines Patch % Lines
cli/src/config/mod.rs 90.75% 16 Missing ⚠️
cli/src/commands/known_hosts.rs 98.99% 9 Missing ⚠️
cli/src/commands/ssh_keys.rs 98.30% 9 Missing ⚠️
cli/src/commands/pgp_keys.rs 99.12% 3 Missing ⚠️
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     
Flag Coverage Δ
deno-server 95.35% <ø> (?)
rust-cli 98.16% <98.16%> (?)

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
Copy Markdown

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.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • 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 4 times, most recently from 2cdd27e to 82cd126 Compare July 25, 2025 16:06
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch 2 times, most recently from d6c46c4 to cd4ea12 Compare September 9, 2025 09:26
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)
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
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from cd4ea12 to 8230e02 Compare January 29, 2026 08:25
danielemery and others added 4 commits January 31, 2026 08:22
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>
@danielemery danielemery force-pushed the 24-add-basic-cli-application branch from f386e2c to 6e79718 Compare January 31, 2026 07:23
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