sqlitegraph-cli
Command-line interface for SQLiteGraph — an embedded graph and vector runtime.
Installation
Or install from source:
Quick Start
# Build a small database from scratch
# Cypher-inspired queries with edge traversal, WHERE, LIMIT
# Graph algorithms
# Insert data (requires --write flag)
Query Language
SQLiteGraph supports a Cypher-inspired query language. See docs/QUERY_LANGUAGE.md for the full reference.
Supported Patterns
-- Node scan
MATCH (n:Function) RETURN n.name
-- Node with property filter
MATCH (n:Function {lang: "rust"}) RETURN n
-- Edge traversal
MATCH (a)-[:CALLS]->(b) RETURN a.name, b.name
-- With WHERE and LIMIT
MATCH (a)-[:CALLS]->(b) WHERE b.lang = "python" RETURN a.name LIMIT 5
Backend Selection
SQLite Backend (Default)
- Mature, ACID-compliant storage
- Debuggable with standard SQL tools
- Required for Cypher queries
Native V3 Backend
- 10-20x faster traversals
- Unlimited node capacity
- Binary format for graph workloads
Commands
Query Commands (Read-Only)
# Cypher-inspired queries
# Graph traversal
# Algorithms
# HNSW vector index (read-only ops; --write needed for create/insert/delete)
Data Modification (Requires --write)
# Insert nodes
# Import/Export
Status
Read-Only by Default
Direct mutation commands are guarded by default. Use --write to enable
modifications:
# This will fail (tries to modify without --write)
# This works
When running write-intended query statements such as CREATE, SET, or
DELETE, include --write in your command line.
Ecosystem
This CLI is part of the SQLiteGraph ecosystem:
| Tool | Purpose | Repository |
|---|---|---|
| sqlitegraph | Core library | crates.io/crates/sqlitegraph |
| sqlitegraph-cli | This CLI | crates.io/crates/sqlitegraph-cli |
| magellan | Code graph indexing | crates.io/crates/magellan |
| llmgrep | Semantic code search | crates.io/crates/llmgrep |
| mirage | CFG analysis | crates.io/crates/mirage-analyzer |
| splice | Code editing | crates.io/crates/splice |
License
GPL-3.0