Graphify: Turn Any Folder into a Knowledge Graph with One Command

·Toolin Editorial Team

A zero-configuration, all-modal, locally run open-source knowledge graph tool that cuts token consumption by 71.5x, needs no vector database, and installs with one pip command.

Graphify: Turn Any Folder into a Knowledge Graph with One Command

After Karpathy shared his personal knowledge-base workflow, the open-source community shipped a productized answer within 48 hours. Graphify is a zero-configuration knowledge graph tool that automatically parses all the code, PDFs, images, and Markdown in any folder into a navigable knowledge graph, while pressing token consumption down by 71.5x. It suits developers and researchers who need to manage large amounts of research material, code repositories, or notes.

What Is Graphify

Graphify is the "complete form" of Karpathy's knowledge-base methodology. The original approach required manually organizing the raw/ directory and manually triggering processing, and repeatedly reading the raw files generated heavy token consumption. Graphify automates the entire workflow and cuts token usage by 71.5x with two-stage processing.

It has picked up 2k+ stars on GitHub; the PyPI package name is graphifyy (note the extra y).

Core Features

All-Modal Automatic Parsing

Just drop a folder in—no manual sorting needed:

  • Code files: parsed locally via tree-sitter AST, with no LLM calls and zero token consumption
  • PDF / Markdown: automatically split into text and semantic units
  • Screenshots / flowcharts / whiteboard photos: Claude Vision is called to extract concepts and relationships

All-modal automatic graphing

71.5x Token Savings

A two-stage pipeline: stage one does local AST extraction on code, calling no LLM at all; stage two runs a single semantic extraction pass over documents and images only. Combined with SHA256 caching, repeated runs process only the files that changed.

In a test scenario with 52 mixed files (a code repository + 5 papers + 4 images), per-query token consumption dropped by 71.5x.

Token consumption comparison

No Vector Database Required

Clustering is based on graph topology (the Leiden community detection algorithm), not embeddings, which removes the deployment and maintenance cost of a vector database.

Installation and Usage

Requirements: Python 3.10+

# Install
pip install graphifyy && graphify install

# Enter the target directory and generate the knowledge graph in one command
/graphify .

When it finishes running, a graph.html appears in the current directory; open it in a browser to see the interactive knowledge graph.

The generated interactive knowledge graph

Platform-Specific Installation

# Lobster platform (OpenClaw)
graphify install --platform claw

# Codex users need to enable parallel mode first
# Add under [features] in ~/.codex/config.toml:
# multi_agent = true

Tip: OpenClaw's support for multi-agent parallelism is still incomplete, so extraction runs sequentially only and is somewhat slower.

Incremental Updates and Watch Mode

# Watch mode: automatically re-parses after code changes
graphify --watch

# Incremental update: processes only new or changed files
graphify --update

It also supports installing Git hooks to rebuild the graph automatically after a commit or a branch switch, with no background process needed.

Verifying the Results

After running /graphify ., check whether the following files were generated in the current directory:

  • graph.html: the interactive knowledge graph, open it directly in a browser
  • Analysis reports and persistable data files

Every relationship carries a type annotation (extracted from the text / inferred by the model / ambiguous relationship) and a confidence score, with transparent, checkable provenance.

FAQ

  • Why is the PyPI package named graphifyy? The name graphify was already taken when the author registered it, so graphifyy is the stopgap and may be renamed later.
  • Codex parallel mode won't start? Check that ~/.codex/config.toml has multi_agent = true set.
  • Too many graph nodes to read? Use --update for incremental updates, or use the HTML interface's filtering to focus on a specific community.

Project address: https://github.com/safishamsi/graphify/blob/v3/README.zh-CN.md

Related articles

RynnWorld-Teleop: DAMO Academy Open-Sources Digital Teleoperation — Robot Training Data Without Real Hardware
AI Products

RynnWorld-Teleop: DAMO Academy Open-Sources Digital Teleoperation — Robot Training Data Without Real Hardware

Alibaba DAMO Academy has open-sourced RynnWorld-Teleop, a digital teleoperation scheme that uses gesture-driven world models to generate robot visual demonstrations and automatically produce training data with joint-level labels. This piece breaks down the core idea, what's open-sourced, and where it fits.

Toolin Editorial Team
Wan-Streamer v0.2: An Omnimodal Real-Time Interaction Model with 550ms End-to-End Latency
AI Products

Wan-Streamer v0.2: An Omnimodal Real-Time Interaction Model with 550ms End-to-End Latency

Alibaba Tongyi's Wan-Streamer v0.2 unifies listening, seeing, speaking, and performing in a single Transformer, achieving full-duplex audio-video interaction at roughly 550ms end-to-end latency. This piece breaks down its architecture, key metrics, and use cases.

Toolin Editorial Team
Agnes-2.5-Flash: A Hands-On Look at Sapiens AI's Free, No-Time-Limit Coding Model
AI Products

Agnes-2.5-Flash: A Hands-On Look at Sapiens AI's Free, No-Time-Limit Coding Model

Singapore's Sapiens AI has launched the Agnes-2.5-Flash coding model — free with no time limit per official claims, ranked in the global top tier for coding, and now live in the Agnes Code desktop app.

Toolin Editorial Team
LibTV Launches a Skill Store: 100+ Director-Grade Skills That Let Agents Shoot Video Autonomously
AI Tutorials

LibTV Launches a Skill Store: 100+ Director-Grade Skills That Let Agents Shoot Video Autonomously

LibTV, LiblibAI's professional AI video platform, has launched the world's largest video Agent Skill Hub, packaging 100+ director-grade Skills for agent invocation — from script to finished film in a single sentence.

Toolin Editorial Team
PixVerse Raises $439 Million to Build a Game Engine: Turning Video into Playable Worlds
AI Products

PixVerse Raises $439 Million to Build a Game Engine: Turning Video into Playable Worlds

PixVerse closed $439 million in Series C funding and launched its Game Engine, built on the R1 real-time world model to turn video generation into interactive worlds that respond to input instantly.

Toolin Editorial Team
Claude Code Agentic Loops: 4 Engineering Practices for Moving from Writing Prompts to Designing Loops
AI Tutorials

Claude Code Agentic Loops: 4 Engineering Practices for Moving from Writing Prompts to Designing Loops

Upgrade one-shot prompts into repeatable automated loops with stop conditions. Anthropic's official Claude Code guidance defines 4 loop patterns; this piece breaks down each pattern's trigger, acceptance criteria, and token-saving tricks.

Toolin Editorial Team