Skip to content

Commit 1c2c6c8

Browse files
committed
docs: update CLI documentation for unified indexing
- Update README with dev git commands - Update cli.mdx with new dev index options and dev git subcommands - Update examples with unified indexing
1 parent 573ad3a commit 1c2c6c8

File tree

3 files changed

+70
-8
lines changed

3 files changed

+70
-8
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,15 +197,20 @@ npm link
197197
## CLI Commands
198198

199199
```bash
200-
# Index repository
200+
# Index everything (code, git history, GitHub)
201201
dev index .
202+
dev index . --no-github # Skip GitHub indexing
202203

203204
# Semantic search
204205
dev search "how do agents communicate"
205206
dev search "error handling" --threshold 0.3
206207

208+
# Git history search
209+
dev git search "authentication fix" # Semantic search over commits
210+
dev git stats # Show indexed commit count
211+
207212
# GitHub integration
208-
dev gh index # Index issues and PRs
213+
dev gh index # Index issues and PRs (also done by dev index)
209214
dev gh search "authentication bug" # Semantic search
210215

211216
# View statistics

examples/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Real-world usage patterns for dev-agent MCP tools.
88
# Install dev-agent
99
npm install -g dev-agent
1010

11-
# Index your repository
11+
# Index your repository (code, git history, GitHub)
1212
cd /path/to/your/project
1313
dev index .
1414

@@ -350,9 +350,15 @@ dev_health
350350
## CLI Examples
351351

352352
```bash
353-
# Search from command line
353+
# Index everything
354+
dev index .
355+
356+
# Search code
354357
dev search "authentication" --limit 5 --threshold 0.4
355358

359+
# Search git history
360+
dev git search "authentication fix"
361+
356362
# Check stats
357363
dev stats
358364

website/content/docs/cli.mdx

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,28 @@ Creates a `.dev-agent.json` configuration file with default settings.
2222

2323
### `dev index`
2424

25-
Index your repository for semantic search.
25+
Index your repository for semantic search. Indexes code, git history, and GitHub issues/PRs.
2626

2727
```bash
2828
dev index .
2929
dev index /path/to/repo
3030
```
3131

32+
**What gets indexed:**
33+
- ✅ Code (always)
34+
- ✅ Git history (if in a git repo)
35+
- ✅ GitHub issues/PRs (if gh CLI installed and authenticated)
36+
37+
Shows an upfront "indexing plan" before starting.
38+
3239
**Options:**
3340
| Flag | Description |
3441
|------|-------------|
3542
| `-f, --force` | Force re-index even if unchanged |
3643
| `-v, --verbose` | Show verbose output |
44+
| `--no-git` | Skip git history indexing |
45+
| `--no-github` | Skip GitHub issues/PRs indexing |
46+
| `--git-limit <n>` | Max git commits to index (default: 500) |
3747

3848
### `dev search`
3949

@@ -95,13 +105,52 @@ dev plan 42 --include-comments --include-history
95105
Index and search GitHub issues/PRs.
96106

97107
```bash
98-
# Index GitHub metadata
108+
# Index GitHub metadata (also done by dev index)
99109
dev gh index
100110

101111
# Search issues/PRs
102112
dev gh search "authentication bug"
113+
114+
# Get context for an issue
115+
dev gh context --issue 42
116+
```
117+
118+
### `dev git`
119+
120+
Index and search git commit history.
121+
122+
```bash
123+
# Index git history (also done by dev index)
124+
dev git index
125+
dev git index --limit 1000 --since "6 months ago"
126+
127+
# Semantic search over commits
128+
dev git search "authentication fix"
129+
dev git search "bug fix" --limit 5
130+
131+
# Show indexed commit stats
132+
dev git stats
103133
```
104134

135+
**Subcommands:**
136+
| Command | Description |
137+
|---------|-------------|
138+
| `dev git index` | Index git commit history |
139+
| `dev git search <query>` | Semantic search over commits |
140+
| `dev git stats` | Show indexed commit count |
141+
142+
**Index Options:**
143+
| Flag | Description | Default |
144+
|------|-------------|---------|
145+
| `--limit <n>` | Max commits to index | 500 |
146+
| `--since <date>` | Only index commits after date | - |
147+
148+
**Search Options:**
149+
| Flag | Description | Default |
150+
|------|-------------|---------|
151+
| `--limit <n>` | Max results | 10 |
152+
| `--json` | Output as JSON | false |
153+
105154
### `dev update`
106155

107156
Incrementally update the index with changed files.
@@ -245,13 +294,15 @@ The `.dev-agent.json` file configures the indexer:
245294
### Basic Workflow
246295

247296
```bash
248-
# Initialize and index
249-
dev init
297+
# Index everything (code, git history, GitHub)
250298
dev index .
251299

252300
# Search for code
253301
dev search "user authentication"
254302

303+
# Search git history
304+
dev git search "authentication fix"
305+
255306
# View statistics
256307
dev stats
257308
```

0 commit comments

Comments
 (0)