-
-
Notifications
You must be signed in to change notification settings - Fork 82
CLI: Add webfinger command using Optique #401
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
Conversation
This reverts commit 66c00f1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @2chanhaeng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request overhauls the Fedify CLI's underlying command parsing and execution system by adopting the 'Optique' framework. This change streamlines how commands are defined and processed, improving maintainability and consistency. While introducing a new 'webfinger' command, it also involves a significant refactoring and simplification of existing features like the 'inbox' and 'nodeinfo' commands, with some previous interactive functionalities being removed or slated for future re-implementation under the new architecture. The update also adjusts the CLI's packaging, aligning it more closely with Deno-native development.
Highlights
- CLI Framework Migration: The entire command-line interface framework has been migrated from 'cliffy' to 'Optique', leading to significant rewrites of command definitions and argument parsing logic across 'init', 'lookup', 'inbox', 'nodeinfo', 'tunnel', and 'webfinger' commands.
- WebFinger Command Implementation: A new 'webfinger' command has been added, utilizing the 'Optique' framework for parsing arguments and 'Fedify's 'lookupWebFinger' utility to retrieve WebFinger resources.
- Refactoring of 'inbox' and 'nodeinfo' commands: The 'inbox' command's previous interactive UI and detailed logging capabilities have been removed, with a basic 'Optique'-based placeholder introduced. The 'nodeinfo' command's interactive favicon display and ASCII art generation features have also been removed.
- Dependency Overhaul: Numerous dependencies related to the old 'cliffy' framework, Hono, and specific UI/logging features have been removed. New dependencies for 'Optique' and updated versions of existing libraries (like 'jimp' and 'ora') have been introduced, along with a broader set of image processing libraries.
- CLI Packaging Changes: The CLI's packaging strategy has been revised, removing Node.js-specific installation scripts and 'package.json' fields related to direct npm publishing, indicating a shift towards Deno-centric or internal distribution.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request is a major refactoring of the CLI, migrating from @cliffy/command
to Optique
. This is a great step forward, simplifying the command definitions and cleaning up dependencies. The addition of the webfinger
command is also a welcome feature. I've identified a few issues, including a duplicate dependency, a potential race condition due to a missing await
on an async function, and a resource leak in an error handling path. Addressing these will improve the robustness and maintainability of the new CLI implementation.
Could you rebase your own commits on the current next branch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if we can utilize Optique's rich message formatter.
For that, we need a spinner library that can replace |
I applied |
The docs for this pull request have been published: |
fedify-dev#401 (comment) Co-authored-by: Hong Minhee (洪 民憙) <[email protected]>
The latest push to this pull request has been published to JSR and npm as a pre-release:
|
Summary
Add webfinger command using Optique.
Related Issue
webfinger
command using Optique #398Changes
packages/cli/webfinger.ts
Benefits
Now Fedify 2.0 lookup webfinger using Optique
Checklist
I will add it after Migrate cli
lookup
from Cliffy to Optique #390Did you write some relevant docs about this change (if it's a new feature)?Did you write a regression test to reproduce the bug (if it's a bug fix)?deno task test-all
on your machine?Additional Notes
Merge after #390