Installation, setup, and first query for Graphify knowledge graph.
Everything you need to install Graphify, build your first knowledge graph, and run your first query.
1# 1. Install Graphify
2uv tool install graphifyy && graphify install
3
4# 2. Build code-only graph (no API key needed)
5cd your-project
6mkdir -p graphify-out && touch graphify-out/.graphify-activity
7graphify . --code-only
8
9# 3. Run your first query
10mkdir -p graphify-out && touch graphify-out/.graphify-activity
11graphify query "project overview"
uv tool install graphifyy:graphify - Main CLIgraphify-mcp - MCP server for IDE integrationgraphify install)tree-sitter-* - AST parsers for 20+ languagesnetworkx - Graph algorithmssentence-transformers - Local embeddingsllama-cpp-python - Local LLM inferenceFor semantic extraction of markdown, docs, PDFs, and images:
1# Option 1: Environment variable (recommended)
2export GEMINI_API_KEY="your-key"
3# or
4export OPENAI_API_KEY="your-key"
5# or
6export ANTHROPIC_API_KEY="your-key"
7
8# Option 2: .env file in project root
9echo "GEMINI_API_KEY=your-key" > .env
Then run without --code-only:
1graphify . # full graph with semantic doc extraction
1mkdir -p ~/.graphify-stats && touch ~/.graphify-stats/configured
Enables persistent activity tracking across sessions.
1# Check installation
2graphify --version
3
4# Check model
5graphify install # re-runs if needed, idempotent
6
7# Check graph (after building)
8ls -lh graphify-out/graph.json
9# Should be > 500 KB for non-empty repos
Once set up, proceed to:
You’re ready to query! 🚀