Skip to content

docs: expose hidden CLI options --mask and --from in help output#62

Merged
ambicuity merged 3 commits intoambicuity:mainfrom
Vikram-Shukl:main
Mar 19, 2026
Merged

docs: expose hidden CLI options --mask and --from in help output#62
ambicuity merged 3 commits intoambicuity:mainfrom
Vikram-Shukl:main

Conversation

@Vikram-Shukl
Copy link
Contributor

@Vikram-Shukl Vikram-Shukl commented Mar 18, 2026

Fixes #51

Changes

  • Added --mask <glob> option visibility in collection add help text
  • Removed duplicate lines in help output

Why

The --mask option was supported but not shown in kindx --help, making it effectively hidden unless users read the source code.

Summary by CodeRabbit

  • Documentation

    • CLI help updated: kindx get documents --from <N> and --line-numbers; kindx collection add now shows collection add <path> [--name <name>] [--mask <glob>] (default **/*.md); other collection subcommands restated.
    • Added extra spacing under the "Maintenance:" heading for readability.
  • Tests

    • Help integration test extended to assert presence of --mask, --from, and --line-numbers.

@Vikram-Shukl Vikram-Shukl requested a review from ambicuity as a code owner March 18, 2026 16:02
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 focuses on improving the user experience of the kindx command-line interface by making a previously hidden but supported option discoverable through the help documentation. The changes clarify the usage of the kindx collection add command and enhance the overall readability of the CLI's help output, ensuring users can easily find and understand available functionalities.

Highlights

  • CLI Help Output Enhancement: The help output for the kindx collection add command was updated to explicitly display the --mask <glob> option, which was previously supported but not visible in the help text.
  • Help Text Formatting Improvement: The kindx collection commands in the help output were refactored to separate the add command's detailed description from other collection management commands, improving readability. An additional blank line was also inserted before the 'Maintenance' section.
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.

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
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your first pull request to KINDX. A maintainer will review your changes shortly.
Please make sure your PR: - Has a title following Conventional Commits format (e.g., feat(engine): add collection filter) - Is linked to an issue with Fixes #N in the description - Passes all CI checks
See CONTRIBUTING.md for the full contribution guide.

Copy link

@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

The pull request successfully updates the help output for the kindx collection add command to expose the --mask option, improving discoverability for users. However, the pull request title mentions exposing the --from CLI option, but no changes related to --from are present in the provided diff. Please clarify if the --from option was intended to be included in this PR or if the title needs to be updated.

Comment on lines +2459 to 2462
console.log(" kindx collection add <path> [--name <name>] [--mask <glob>]");
console.log(" - Add collection. --mask sets glob pattern (default: **/*.md)");
console.log(" kindx collection list/remove/rename/show/update-cmd/include/exclude");
console.log(" - Manage indexed folders and default-query behavior");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The pull request title indicates that the --from CLI option should also be exposed in the help output. However, the provided changes only address the --mask option for kindx collection add. The help text for kindx get (where --from is used) remains unchanged in this patch. Please either include the documentation for --from or update the PR title and description to accurately reflect the scope of this pull request.

@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f0c1ba17-a542-4265-9036-72930b4abbde

📥 Commits

Reviewing files that changed from the base of the PR and between 7920a73 and e01c23f.

📒 Files selected for processing (3)
  • README.md
  • engine/kindx.ts
  • specs/command-line.test.ts

Walkthrough

Updated CLI help and documentation to expose previously undocumented flags: get --from <line> and collection add --mask <glob>. Help text in engine/kindx.ts, README usage examples, and a help-output test were updated. No runtime behavior or public signatures changed.

Changes

Cohort / File(s) Summary
CLI help text
engine/kindx.ts
Updated showHelp() strings to include get --from <line> and --line-numbers, expanded collection add <path> [--name <name>] [--mask <glob>] (notes default glob), reflowed collection subcommand listing, and added an extra blank line after the Maintenance: heading.
Documentation
README.md
Updated CLI usage to document kindx get support for --from <N> and kindx collection add support for --mask <GLOB>.
Tests
specs/command-line.test.ts
Extended --help integration test assertions to expect --mask, --from, and --line-numbers in help output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

engine, specs, documentation

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: exposing hidden CLI options in help output, matching the core objective of making --mask and --from visible.
Linked Issues check ✅ Passed Changes satisfy all acceptance criteria: kindx --help exposes collection add --mask and get --from in engine/kindx.ts, README reflects both options, and test assertions verify their presence.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #51: help text updates in kindx.ts, documentation in README.md, and test assertions in command-line.test.ts with no flag additions or redesigns.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #51

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@engine/kindx.ts`:
- Around line 2459-2461: The top-level help text does not advertise the get
command's --from option, so update the help-printing code that outputs the CLI
summary (the block that prints lines like "kindx collection add ..." in
kindx.ts) to include a line showing get usage with --from and an example
demonstrating line-offset usage; specifically add a mirror entry for "kindx get
[--from <n>]" (or similar) to the same help output area so kindx --help surfaces
both --mask (already added) and --from for get, and ensure the get-related help
text references the get function/command name used in the file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: a92371c6-3498-4c44-a7b7-565a375ed598

📥 Commits

Reviewing files that changed from the base of the PR and between 2dcdc0d and 66f8104.

📒 Files selected for processing (1)
  • engine/kindx.ts

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@engine/kindx.ts`:
- Line 2460: The help text hardcodes "**/*.md" while the code uses the constant
DEFAULT_GLOB; update the console.log call (the line that prints " - Add
collection. --mask sets glob pattern (default: **/*.md)") to reference
DEFAULT_GLOB instead of the literal so the displayed default stays in sync with
the runtime constant (use string interpolation or concatenation with
DEFAULT_GLOB where that console.log is emitted).
- Line 2452: The help synopsis printed by the top-level get command (the
console.log call that currently outputs "kindx get <file>[:line] [-l N] [--from
<line>]  - Show a single document from specific line, optional line slice") is
missing the supported --line-numbers flag; update that console.log string in
engine/kindx.ts to include the --line-numbers flag (matching the actual command
usage in the get implementation referenced later) so the top-level help and the
implementation stay in sync.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 01cc413c-eb16-4e7c-8240-56c6390d96c8

📥 Commits

Reviewing files that changed from the base of the PR and between 66f8104 and 7920a73.

📒 Files selected for processing (1)
  • engine/kindx.ts

@ambicuity
Copy link
Owner

Implemented issue-complete parity and validated AI findings locally.

AI review triage:

  • Relevant and incorporated:
    • CodeRabbit: top-level help now includes get --line-numbers.
    • CodeRabbit: mask default help text now references DEFAULT_GLOB (no hardcoded literal drift risk).
  • Historically relevant but superseded:
    • Gemini/earlier CodeRabbit note about missing get --from was valid on the earlier commit and is already resolved in PR history.

Additional issue #51 parity fixes included:

  • README command index now exposes get --from and collection add --mask.
  • CLI help test now asserts --mask, --from, and --line-numbers are visible in kindx --help.

Local validation:

  • npm run build passed.
  • Focused CLI help test passed.
  • Real-data CLI checks passed for collection add --mask and get --from/--line-numbers behavior.
  • Full npm test in this sandbox has unrelated environment constraints (LLM context + localhost binding), so final gate is GitHub CI.

ambicuity

This comment was marked as resolved.

@ambicuity ambicuity merged commit 942e367 into ambicuity:main Mar 19, 2026
7 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.

Good First Issue: Expose existing but hidden CLI options in help/docs (collection add --mask and get --from)

2 participants