feat: Add --all flag to estimate command to list available configs

- Added find_configs_directory() to use same logic as API (api/configs_repo/official first, then configs/)
- Added list_all_configs() to display all 24 configs grouped by category with descriptions
- Updated CLI to support --all flag, making config argument optional when --all is used
- Added 2 new tests for --all flag functionality
- All 51 tests passing (51 passed, 1 skipped)

This enables users to discover all available preset configs without checking the API or filesystem directly.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-01-14 23:10:52 +03:00
parent 2019a02b51
commit c9b9f44ce2
3 changed files with 191 additions and 3 deletions

View File

@@ -176,7 +176,8 @@ For more information: https://github.com/yusufkaraaslan/Skill_Seekers
help="Estimate page count before scraping",
description="Estimate total pages for documentation scraping"
)
estimate_parser.add_argument("config", help="Config JSON file")
estimate_parser.add_argument("config", nargs="?", help="Config JSON file")
estimate_parser.add_argument("--all", action="store_true", help="List all available configs")
estimate_parser.add_argument("--max-discovery", type=int, help="Max pages to discover")
# === extract-test-examples subcommand ===
@@ -411,7 +412,11 @@ def main(argv: Optional[List[str]] = None) -> int:
elif args.command == "estimate":
from skill_seekers.cli.estimate_pages import main as estimate_main
sys.argv = ["estimate_pages.py", args.config]
sys.argv = ["estimate_pages.py"]
if args.all:
sys.argv.append("--all")
elif args.config:
sys.argv.append(args.config)
if args.max_discovery:
sys.argv.extend(["--max-discovery", str(args.max_discovery)])
return estimate_main() or 0