Production-grade knowledge graph CLI. Extract concepts and relationships from any document using LLMs.
Inspired by rahulnyk/knowledge_graph — rewritten from scratch in Rust.
curl -fsSL https://raw.githubusercontent.com/Algiras/RKnowledge/main/install.sh | bash
rahulnyk/knowledge_graph is a brilliant ~300-line Python notebook proof of concept. RKnowledge turns that idea into a 15,500-line production CLI.
| Dimension | Original (Python) | RKnowledge (Rust) |
|---|---|---|
| Interface | Jupyter notebook cells | Full CLI with 10 subcommands better |
| Language | Python | Rust — compiled binary, ~15x faster parsing better |
| LLM Providers | Ollama only (Mistral 7B) | Anthropic, OpenAI, Google, Ollama better |
| Concurrency | Sequential (1 chunk at a time) | Parallel LLM calls with -j flag new |
| Storage | In-memory Pandas DataFrames | Neo4j graph DB (Docker), persistent better |
| Incremental Builds | Always from scratch | --append merges into existing graph new |
| Input Formats | PDF only | PDF, Markdown, HTML, plain text better |
| Entity Typing | 8 fixed categories | Free-form LLM classification better |
| Graph Algorithms | Degree + Louvain | PageRank, Label Propagation, Dijkstra shortest path, density new |
| Querying | None | query, path, stats, communities commands
new |
| Visualization | Static Pyvis HTML | Interactive: click cards, search, type legend, toggle edges better |
| Export | None | JSON, CSV, GraphML, Cypher dump new |
| CI/CD | None | GitHub Actions: lint, test, multi-platform build new |
| Distribution | docker build + Jupyter |
Single binary, curl install, skills.sh better |
| Tests | None | 118 tests (107 unit + 11 integration) new |
Everything you need to extract, store, analyze, and explore knowledge graphs from any text.
Compiled Rust binary. Parallel LLM extraction with -j concurrency. Zero runtime
dependencies.
Anthropic, OpenAI, Google Gemini, and Ollama for free local inference. Switch with one flag.
LLM classifies each concept freely — "programming language", "database", "medical condition" — no fixed list.
PageRank, community detection, shortest path, connected components, degree distribution. Built-in.
Persistent Neo4j backend via Docker. --append merges new documents without
rebuilding.
Click-to-expand detail cards, entity type legend, search, toggle proximity edges, freeze physics.
$ curl -fsSL https://raw.githubusercontent.com/Algiras/RKnowledge/main/install.sh | bash
$ rknowledge init # Start Neo4j + create config
$ rknowledge auth # Configure LLM provider
$ rknowledge build ./docs/ --provider ollama -j 8
# Extracted 40 relations from 4 chunks (8 concurrent)
# Graph: 54 nodes, 383 edges
$ rknowledge query "machine learning" --depth 2
$ rknowledge path "docker" "kubernetes"
$ rknowledge stats
$ rknowledge viz
| Command | Description |
|---|---|
init |
Initialize config and start Neo4j via Docker |
auth |
Configure LLM provider API keys (interactive) |
build <path> |
Process documents and build knowledge graph. Flags: -j, --append,
--provider |
query <q> |
Search the graph with variable --depth or raw cypher: queries |
path <from> <to> |
Find shortest path between two conceptsnew |
stats |
Graph analytics: PageRank, density, degree distribution, entity typesnew |
communities |
List detected communities and their membersnew |
export |
Export to JSON, CSV, GraphML, or Cypher |
viz |
Open interactive graph visualization in browser |
Claude Sonnet / Opus
API KeyGPT-4o / GPT-4
API KeyGemini Pro
API KeyMistral, Llama, etc.
Free / Local