Can Graphify Run Fully Local Without API Keys? A Complete Offline Guide
Graphify can run fully local without API keys because its core AST-based knowledge graph construction works entirely offline, with only the optional semantic extraction requiring a Gemini key.
Graphify is an open-source code intelligence tool from Graphify-Labs/graphify designed to operate completely offline for most workloads. Unlike many AI-powered developer tools that require OpenAI or Anthropic credentials, Graphify runs fully local without API keys for its primary functions. The tool performs static analysis and builds knowledge graphs using Abstract Syntax Tree (AST) parsing that happens entirely on your machine.
How Graphify Operates Without API Keys
Graphify's architecture follows a local-first design where core extraction happens entirely on your hardware. According to the source code in tools/skillgen/fragments/core/core.md, the tool is explicitly designed to "never ask the user for one, and never block on one."
Core AST-Based Analysis (Fully Local)
The foundation of Graphify is AST-based code extraction, which parses source code into a knowledge graph without external services. This includes:
- Parsing source code files locally
- Building the AST-based knowledge graph
- Performing static analysis
These operations run in graphify . and graphify update . commands without any network calls or API keys.
Optional Semantic Extraction (Requires Keys)
The only component that requires external APIs is the semantic extraction step, which processes markdown, PDFs, and images using Google's Gemini API. When GEMINI_API_KEY or GOOGLE_API_KEY is unset, Graphify falls back to the host agent and writes an empty semantic file, continuing the pipeline without interruption.
Installing and Running Graphify Locally
You can install and run Graphify completely offline using the core package.
# Clone the repository
git clone https://github.com/Graphify-Labs/graphify.git
cd graphify/v8
# Install the core package (no extras required)
pip install .
# Run Graphify without any API keys
graphify . # Builds AST-based graph locally
graphify update . # Updates graph after code changes
Enabling Optional Semantic Features Later
If you later want richer semantic extraction for documentation files, you can optionally set a Gemini key:
export GEMINI_API_KEY=your_key_here
graphify . # Now includes semantic extraction via Gemini
What Happens Without API Keys
When running without GEMINI_API_KEY or GOOGLE_API_KEY, Graphify handles the missing configuration gracefully. As documented in tools/skillgen/fragments/core/core.md:
- The tool prints a tip about the missing key
- Continues execution without halting
- Falls back to the host agent for semantic extraction
- Produces an empty semantic file for code-only corpora
This ensures that the entire pipeline works without any API keys, never asking users for credentials or blocking execution.
Source Files Confirming Local Operation
The following files in the Graphify-Labs/graphify repository confirm the local-first architecture:
README.md— High-level overview and CLI usage instructionsARCHITECTURE.md— Describes the AST-only extraction pipeline and optional semantic steptools/skillgen/fragments/core/core.md— Explicitly states "graphify needs no API key"docs/how-it-works.md— Details the end-to-end flow emphasizing local, key-free operationSECURITY.md— Confirms no secret keys are required for core functionality
Summary
- Graphify runs fully local without API keys for all core functionality
- AST-based extraction parses code and builds knowledge graphs entirely offline
- Semantic extraction is optional and only requires
GEMINI_API_KEYfor processing documents - When API keys are missing, Graphify falls back to host agent mode and continues with empty semantic files
- All CLI commands including
graphify update .work without any OpenAI, Anthropic, or Google credentials
Frequently Asked Questions
Does Graphify require an OpenAI API key to function?
No. Graphify does not use OpenAI or any other proprietary LLM APIs for its core functionality. The tool performs AST-based static analysis locally and only optionally connects to Google's Gemini API for semantic extraction if you explicitly set GEMINI_API_KEY.
Can I use Graphify on air-gapped machines without internet access?
Yes. Since Graphify's core pipeline operates entirely offline using local AST parsing, you can run it on air-gapped systems or machines without internet connectivity. Simply install the package and run graphify . to analyze your code without any network requirements.
What features are disabled when running Graphify without API keys?
Only semantic extraction is disabled when running without GEMINI_API_KEY or GOOGLE_API_KEY. This feature processes non-code files like PDFs, images, and markdown documents for richer context. Code analysis, knowledge graph construction, and all static analysis features remain fully functional.
Is there a performance difference between running with and without API keys?
Running without API keys is actually faster for code-only repositories because Graphify skips the semantic extraction step entirely and writes an empty semantic file immediately. This creates a "fast path" that avoids network latency and API processing overhead, making local-only operation the most performant option for pure code analysis.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →