Proposal: CLI install command with interactive setup wizard#287
Conversation
Add proposal for `java-codebase-rag install` and `update` subcommands. Interactive 6-stage pipeline: Java source detection, embedding model, agent host selection (Claude Code / GigaCode / Qwen Code), install scope, artifact deployment, and project indexing. Non-interactive mode for CI. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add MCP entrypoint validation (shutil.which check after deploy) - Define re-run behavior: pre-fill existing values, preserve unmanaged YAML keys - Clarify exit codes with user action guidance - Require explicit confirmation for missing model paths (y/n instead of warn-only) - Add platform notes and per-artifact writability checks Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…MCP config The install pipeline now resolves the MCP entrypoint's absolute path via shutil.which() before writing it into the agent host's MCP config. This ensures the config works regardless of the agent host's PATH (GUI launchers, virtualenvs, pip --user installs). Interactive mode prompts for a manual path if auto-detection fails; non-interactive mode exits with code 2. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Stage 1 now prompts the user to confirm or change the source root (defaulting to cwd). Non-interactive mode skips the prompt. index_dir remains implicit. Adds 5 new tests and renumbers existing ones to 47. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Multi-host support: - Stage 3 changed from single-select menu to checkbox (all hosts pre-selected) - Non-interactive mode accepts multiple --agent flags - Deploy artifacts to all selected hosts in a single run - Added multi-host test cases Module detection simplification: - Detect at Maven/Gradle build file level (pom.xml, build.gradle*) - Root has build file? Show only "." (entire project as one unit) - Root has no build file? Show immediate children with build files - Prevents overwhelming users with nested Maven modules in large projects - Updated test cases to reflect simplified detection logic Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Proposal design is finalized with multi-host support and simplified module detection. Moving to completed/ as the proposal phase is done. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Review: Proposal + PlanThe design is solid — multi-host by default, build-file detection over Must-fix
Should-fix
Minor
Overall: good design, thorough test plan. The issues above are documentation/consistency problems, not design flaws — once cleaned up this is ready for implementation. |
- Remove stale `rich>=13.0` dependency from proposal (use existing cli_format.py) - Fix duplicate test #12 in plan (renumber tests 13-54) - Remove nested module detection test case (contradicts "no recursive descent") - Move proposal from completed/ back to active/ (per AGENTS.md) - Fix test numbering in implementation step list to match renumbered tests - Resolve [TBD] Open Questions (present as resolved decisions) - Fix update command to use non_interactive=True (non-interactive by default) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Re-review: All previous issues fixedChecked each item from the previous review against the updated diff:
One remaining fixThe PR description still links to LGTM otherwise — ready to merge after that one link fix. |
Summary
This PR proposes a new
java-codebase-rag installcommand that walks users through a 6-stage interactive setup wizard, eliminating manual config file editing and MCP registration steps.Status: Proposal — not yet implemented. This PR defines the design and plan for implementation in subsequent PRs.
Problem Statement
Users installing
java-codebase-ragface multiple friction points that cause drop-off:.java-codebase-rag.ymlwith correct keys and paths.claude.json,.qwen/settings.json,.gigacode/settings.json)initwith correct flags after config is set upThese steps are documented across multiple files. Non-technical users give up before completing setup.
Proposed Solution
Two new subcommands
java-codebase-rag install [--non-interactive] [--agent {claude-code|qwen-code|gigacode}]... [--scope {user|project}] [--model {auto|<path>}] java-codebase-rag update [--force] [--dry-run]Key Design Decisions
Multi-host by default
--agentflagsModule-level detection
pom.xmlorbuild.gradle*files.(entire project as one unit)Exit codes
0: Success (all stages completed)1: Partial success (failed stages listed, re-run skips completed stages)2: Fatal error (no Java files, required flag missing)Implementation Sequence
PR-I1:
installsubcommandjava_codebase_rag/installer.pymoduleprompt()TTY-abstraction helper.gitignoreauto-updatePR-I2:
updatesubcommand--forceand--dry-runflagsincrementSee propose/completed/CLI-INSTALL-PROPOSE.md for full details and plans/active/PLAN-CLI-INSTALL.md for implementation plan.
Changes in this PR
propose/completed/CLI-INSTALL-PROPOSE.md)plans/active/PLAN-CLI-INSTALL.md)Test plan
Test cases defined in the plan:
JAVA_CODEBASE_RAG_RUN_HEAVY=1for end-to-end validationOut of scope
microservice_rootsadvanced configuration (manual YAML editing for complex layouts)🤖 Generated with Claude Code