Skip to content

feat(cli): add search subcommand to filter commands#381

Merged
bobbyiliev merged 4 commits intoThe-DevOps-Daily:mainfrom
AnasFaaiz:feat/add-search-command
Oct 3, 2025
Merged

feat(cli): add search subcommand to filter commands#381
bobbyiliev merged 4 commits intoThe-DevOps-Daily:mainfrom
AnasFaaiz:feat/add-search-command

Conversation

@AnasFaaiz
Copy link
Contributor

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ New Chapter
  • 🐛 Bug Fix/Typo
  • 👷 Optimization
  • 📝 Documentation Update
  • 🚩 Other

Description

Adds a new search <keyword> subcommand to the CLI to filter available commands by name or description.

  • New command file: cli/commands/search.py
  • Registers the subcommand in cli/cli.py (app.add_typer(search.app, name="search"))
  • Case-insensitive substring matching against command name and description
  • Uses a mocked in-memory registry for now
  • Prints No commands found. and exits with code 1 when there are no matches
  • Tests added to cli/test_cli.py: test_search_match and test_search_no_match
  • Lines wrapped to satisfy flake8 E501 in search.py

Example:

python cli.py search grep
# grep: Search for PATTERN in files

Related Tickets & Documents

Closes #330

Added to documentation?

  • 📜 readme
  • 🙅 no documentation needed

@AnasFaaiz
Copy link
Contributor Author

AnasFaaiz commented Oct 2, 2025

@bobbyiliev Hi, I am done with this issue and CI has ran successfully!

Copy link
Collaborator

@bobbyiliev bobbyiliev left a comment

Choose a reason for hiding this comment

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

Looks great @AnasFaaiz! Thank you! Would you mind just rebasing this as there are some conflicts?

@AnasFaaiz AnasFaaiz force-pushed the feat/add-search-command branch from 85e1be3 to 264603f Compare October 3, 2025 10:43
@AnasFaaiz
Copy link
Contributor Author

@bobbyiliev, I am done rebasing and currently there are no conflicts

@bobbyiliev bobbyiliev merged commit 3c07f06 into The-DevOps-Daily:main Oct 3, 2025
2 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.

Add 'search' command to filter commands

2 participants