Skip to content

Commit 25bad53

Browse files
committed
feat(gcode): add graph lifecycle commands
1 parent 448ea8d commit 25bad53

10 files changed

Lines changed: 512 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@ All notable changes to gobby-cli are documented in this file.
77
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
88
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
99

10+
## [0.6.2] — gcode
11+
12+
### Added
13+
14+
#### gcode
15+
16+
- **Graph lifecycle commands** — Added `gcode graph clear` and `gcode graph rebuild` as daemon-backed code-index graph lifecycle commands. Both commands use the current resolved project context, POST to the existing `/api/code-index/graph/{clear,rebuild}` endpoints, and keep existing read-side graph commands (`callers`, `usages`, `imports`, `blast-radius`) unchanged and top-level.
17+
18+
### Changed
19+
20+
#### gcode
21+
22+
- **Strict daemon response contract**`gcode graph clear` and `gcode graph rebuild` now fail hard when project context cannot be resolved, when no daemon URL is configured or reachable, when the daemon returns a non-2xx status, or when a 2xx response body is not valid JSON. Successful `--format json` output prints the daemon payload directly; `--format text` renders a concise summary from the parsed JSON response.
23+
1024
## [0.6.1] — gcode
1125

1226
### Fixed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ AST-aware code search powered by tree-sitter. Indexes 18 languages into SQLite
2929
FTS5 for symbol lookup, content search, file tree navigation, and hybrid
3030
ranking. When Neo4j, Qdrant, and an embeddings endpoint are configured -
3131
typically through Gobby - `gcode` adds graph-aware search, semantic search,
32-
and dependency analysis (`callers`, `usages`, `imports`, `blast-radius`).
32+
dependency analysis (`callers`, `usages`, `imports`, `blast-radius`), and
33+
daemon-backed graph lifecycle commands (`gcode graph clear`, `gcode graph rebuild`).
3334

3435
### gsqz — Output Compression
3536

crates/gcode/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gobby-code"
3-
version = "0.6.1"
3+
version = "0.6.2"
44
edition = "2024"
55
rust-version = "1.85"
66
authors = ["Josh Wilhelmi <hello@gobby.ai>"]

crates/gcode/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,16 @@ gcode symbol <id> # Source code by symbol ID
115115
gcode symbols <id1> <id2> ... # Batch retrieve
116116
gcode tree # File tree with symbol counts
117117

118-
# Dependency graph (requires Neo4j)
118+
# Dependency graph reads (requires Neo4j)
119119
gcode callers "handleAuth" # Who calls this?
120120
gcode usages "handleAuth" # Incoming call sites
121121
gcode imports src/auth.ts # Import graph for a file
122122
gcode blast-radius "handleAuth" --depth 3 # Transitive impact analysis
123123

124+
# Graph lifecycle (requires Gobby daemon)
125+
gcode graph clear # Clear current project's graph projection
126+
gcode graph rebuild # Rebuild current project's graph projection
127+
124128
# Project management
125129
gcode status # Index stats
126130
gcode projects # List all indexed projects
@@ -159,7 +163,7 @@ codebase → tree-sitter → SQLite → FTS5 search
159163
config, secrets, sessions, agents
160164
```
161165

162-
Gobby adds graph queries, semantic search, and infrastructure that makes gcode better at its core job — not just more features bolted on.
166+
Gobby adds graph queries, graph lifecycle orchestration, semantic search, and infrastructure that makes gcode better at its core job — not just more features bolted on.
163167

164168
**Search quality improves.** With Neo4j, `gcode search` blends FTS5 text matching with call-graph relevance. With Qdrant plus a configured embeddings API, conceptual queries like "database connection pooling" can find semantically similar code even when the exact words don't match.
165169

@@ -174,6 +178,7 @@ Gobby adds graph queries, semantic search, and infrastructure that makes gcode b
174178
| Semantic vector search || Yes (Qdrant + embeddings API) |
175179
| Call graph / blast radius || Yes (Neo4j) |
176180
| Import graph || Yes (Neo4j) |
181+
| Graph clear / rebuild lifecycle || Yes (daemon-backed) |
177182
| Auto-indexing on file change || Yes (daemon file watcher) |
178183
| Centralized config + secrets || Yes (encrypted, no env vars) |
179184
| Shared index (daemon + CLI) || Yes (gobby-hub.db) |
@@ -192,6 +197,10 @@ Get started with Gobby at [github.com/GobbyAI/gobby](https://github.com/GobbyAI/
192197
| Embeddings API unavailable | Semantic embeddings disabled. FTS5 + graph still work. |
193198
| No index yet | Commands error with `Run gcode init to initialize`. |
194199

200+
Read-side graph commands depend on Neo4j. `gcode graph clear` and `gcode graph rebuild`
201+
are separate lifecycle operations routed through the Gobby daemon for the
202+
current resolved project.
203+
195204
## Language Support
196205

197206
gcode parses ASTs using tree-sitter with support for 18 languages:

0 commit comments

Comments
 (0)