You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: document CLI install/update commands and move completed proposal
Move CLI-INSTALL-PROPOSE.md and PLAN-CLI-INSTALL.md to completed/ now
that both PR-I1 (install) and PR-I2 (update) are implemented.
Update README.md and JAVA-CODEBASE-RAG-CLI.md to document the new
interactive setup wizard (java-codebase-rag install) and the
post-upgrade refresh command (java-codebase-rag update).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
After `pip install --upgrade java-codebase-rag`, run `java-codebase-rag update` to refresh shipped artifacts.
67
+
68
+
### Manual registration
69
+
70
+
If you prefer manual configuration, see [`docs/JAVA-CODEBASE-RAG-CLI.md`](./docs/JAVA-CODEBASE-RAG-CLI.md) for the full CLI reference.
71
+
47
72
> **Stability disclaimer.** This package does **not** promise backward compatibility. MCP tool contracts, env vars, Lance/Kuzu schemas, config files, and Python APIs may change without a deprecation period. Track `main` and rebuild indexes when ontology or embedding settings change.
48
73
49
74
---
@@ -84,7 +109,9 @@ If vector hits come back and graph expansion adds neighbor symbols, the install
84
109
85
110
## Wire into an MCP host
86
111
87
-
### Claude Code
112
+
> **Quick setup:** Run `java-codebase-rag install` from your Java project root. The interactive wizard handles MCP registration, skill deployment, and configuration for Claude Code, Qwen Code, and GigaCode in one step.
113
+
114
+
### Claude Code (manual)
88
115
89
116
With the package installed, the console script `java-codebase-rag-mcp` is on your `PATH`. Register it project-scoped:
90
117
@@ -167,6 +194,8 @@ Run `java-codebase-rag --help` to list grouped subcommands. Operator playbook wi
Copy file name to clipboardExpand all lines: docs/JAVA-CODEBASE-RAG-CLI.md
+74Lines changed: 74 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,80 @@ If `java-codebase-rag` is missing, run the module entrypoint:
17
17
.venv/bin/python -m java_codebase_rag.cli --help
18
18
```
19
19
20
+
## Setup commands
21
+
22
+
### `install`
23
+
24
+
Interactive setup wizard that walks users through Java source detection, embedding model selection, agent host configuration, artifact deployment, and YAML config generation. Use `--non-interactive` for CI/automation.
25
+
26
+
```bash
27
+
# Interactive mode
28
+
java-codebase-rag install
29
+
30
+
# Non-interactive mode (requires at least one --agent)
-`--non-interactive` — Run without prompts (requires `--agent`).
43
+
-`--agent {claude-code,qwen-code,gigacode}` — Agent host to configure (can be passed multiple times).
44
+
-`--scope {project,user}` — Installation scope (default: `project`). Project scope writes to `.<host>/` in the project repo; user scope writes to `~/.<host>/` (globally available).
45
+
-`--model MODEL` — Embedding model path or `auto` (default: `auto`, downloads `sentence-transformers/all-MiniLM-L6-v2` on first run).
6. Index + finish — YAML generation, `.gitignore` update, `init`.
59
+
60
+
**Re-running `install`:** If `.java-codebase-rag.yml` exists, the installer shows current values and offers "Update" (pre-filled) or "Start fresh". Existing MCP entries are updated in-place (merged, not duplicated). Skill/agent files trigger overwrite confirmation.
61
+
62
+
### `update`
63
+
64
+
Post-upgrade refresh: overwrites skill and agent files with the latest shipped versions and updates the MCP command path. Requires a prior `install` run.
65
+
66
+
```bash
67
+
# Refresh after pip upgrade
68
+
pip install --upgrade java-codebase-rag
69
+
java-codebase-rag update
70
+
71
+
# Preview changes without writing
72
+
java-codebase-rag update --dry-run
73
+
74
+
# Force overwrite all artifacts
75
+
java-codebase-rag update --force
76
+
```
77
+
78
+
**Flags:**
79
+
-`--force` — Overwrite all artifacts even if content matches.
80
+
-`--dry-run` — Print changes without writing files.
81
+
82
+
**Behavior:**
83
+
- Detects previously configured agent hosts (scans both project-level and user-level config files).
84
+
- Refreshes skill and agent files (versioned assets from the package).
85
+
- Updates MCP entrypoint path if `java-codebase-rag-mcp` has moved.
86
+
- Runs `increment` on the index if it exists (LanceDB catch-up). Prints graph staleness warning.
87
+
- Skips MCP config if the entry already exists and is correct.
88
+
89
+
**Exit codes:**
90
+
-`0` — Success.
91
+
-`1` — Partial failure (some artifacts failed to write).
92
+
-`2` — No configured hosts found.
93
+
20
94
## Output mode
21
95
22
96
-**TTY:** human-readable `pprint` of the payload on stdout (except **successful selective `reprocess`** with `--vectors-only` / `--graph-only`, which prints `Rebuilt:` / `Skipped:` lines instead of dumping the full dict).
0 commit comments