Skip to content

Split CLI into separate write and read commands#1

Merged
harryscholes merged 2 commits intomasterfrom
claude/split-cli-commands-aJcMP
Jan 21, 2026
Merged

Split CLI into separate write and read commands#1
harryscholes merged 2 commits intomasterfrom
claude/split-cli-commands-aJcMP

Conversation

@harryscholes
Copy link
Copy Markdown
Owner

Refactor the CLI from a single monolithic command that runs both write and
read stages sequentially into two separate subcommands:

  • write: Generates random data and writes to a Vortex file
  • read: Reads and queries data from a Vortex file

This allows users to run write and read operations independently, which is
useful for benchmarking and testing scenarios where you want to reuse a
previously generated database file.

Refactor the CLI from a single monolithic command that runs both write and
read stages sequentially into two separate subcommands:

- `write`: Generates random data and writes to a Vortex file
- `read`: Reads and queries data from a Vortex file

This allows users to run write and read operations independently, which is
useful for benchmarking and testing scenarios where you want to reuse a
previously generated database file.
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @harryscholes, 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 significantly enhances the flexibility of the CLI by decoupling the data writing and reading operations. Previously, these stages ran sequentially within a single command. Now, users can execute 'write' to generate and store data, and 'read' to query existing data independently. This separation is particularly beneficial for scenarios requiring repeated data reading or specific benchmarking, as it eliminates the need to regenerate data for each read operation.

Highlights

  • CLI Refactoring: The command-line interface (CLI) has been refactored from a single monolithic command into two distinct subcommands: write and read.
  • Separate Argument Structures: New WriteArgs and ReadArgs structs have been introduced to specifically handle arguments relevant to each respective subcommand, improving clarity and organization.
  • Function Decomposition: The main application logic has been split into dedicated asynchronous functions, write_command and read_command, each responsible for its specific operation.
  • Data Type Definition Correction: A correction was made in the DType::FixedSizeList definition within the write logic, now correctly using projection_bits instead of dimension.
  • Readability Improvement: A variable name was updated from top_k to top_k_results in the read command for better code clarity.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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

  1. 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.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a 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 effectively refactors the CLI from a single command into separate write and read subcommands, which is a great improvement for usability and testing. The code changes are logical and well-structured. I've noted a few opportunities to enhance maintainability by reducing code duplication in argument parsing and session setup. Additionally, I've pointed out a potential panic from an .unwrap() call that should be addressed for more robust error handling. Overall, this is a solid refactoring.

- Add create_session() helper to reduce code duplication
- Replace .unwrap() with ? for better error handling when opening files
@harryscholes harryscholes merged commit 189f56a into master Jan 21, 2026
4 checks passed
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.

2 participants