Skip to main content

Open-source knowledge graph for latest documentation of popular tech stacks. AI coding assistant plugin for Claude Code, Codex, Cursor, and more.

Project description

Sharingan 👁️

Open-source documentation knowledge graph for AI coding assistants.

Turn the latest documentation of popular tech stacks into a queryable knowledge graph — with plugins for Claude Code, Codex, Cursor, Gemini CLI, and more.

Think of it as: Context7, but fully open-source. Or Graphify, but for external library docs instead of your codebase.

Why Sharingan?

AI coding assistants hallucinate outdated APIs. Their training data has a cutoff. Sharingan solves this by maintaining a live, version-aware knowledge graph of the documentation for the frameworks you actually use.

Feature Context7 Graphify Sharingan
Open-source backend
Documentation focus ❌ (code)
Version tracking ✅ (last 3 majors)
Offline-first
Graph relationships ❌ (vectors)
Migration queries
Confidence tagging

Quick Start

# Install
pip install sharingan
# or
uv tool install sharingan

# Extract documentation for a library
sharingan extract zod
sharingan extract nextjs --version 15.3.2
sharingan extract react --skip-llm  # Pass 1 only (free, no API key needed)

# Query the knowledge graph
sharingan query "useRouter" --lib nextjs
sharingan query "z.string" --lib zod

# Install into your AI assistant
sharingan install --platform claude
sharingan install --platform codex
sharingan install --platform cursor

How It Works

Sharingan uses a two-pass extraction pipeline (inspired by Graphify):

Pass 1 — Deterministic (Free, No API Calls)

  • Parses markdown/HTML documentation
  • Extracts code blocks, API signatures, parameter tables
  • Identifies heading structure and cross-references
  • Zero token cost — runs entirely locally

Pass 2 — Semantic (LLM-Assisted)

  • Summarizes prose documentation
  • Infers relationships between API symbols
  • Detects deprecation patterns
  • Scores confidence on inferred edges
  • Auto-detects backend: Anthropic → OpenAI → Ollama

Graph Building

  • Merges Pass 1 + Pass 2 into a NetworkX directed graph
  • Clusters related APIs into communities via Leiden algorithm
  • Exports to JSON files in a git-friendly structure
  • Every edge tagged with confidence: EXTRACTED, INFERRED, or AMBIGUOUS

Covered Libraries

Tier 1 (Available Now)

React, Next.js, TypeScript, Node.js, Python, FastAPI, PostgreSQL, Tailwind CSS, Prisma, Zod

Tier 2 (Coming Soon)

Vue.js, Svelte, Django, Express.js, Docker, Supabase, Drizzle ORM, tRPC, Vite, shadcn/ui

Tier 3 (Planned)

Angular, Rust, Go, Flask, LangChain, Vercel AI SDK, MongoDB, Redis, Stripe, AWS SDK

CLI Commands

sharingan extract <library>     # Extract docs into knowledge graph
sharingan list                  # Show all libraries in registry
sharingan info <library>        # Show library details
sharingan query <question>      # Query the graph
sharingan status                # Show extraction statistics
sharingan install               # Install AI assistant skill

For AI Assistant Plugin Developers

Sharingan exposes an MCP server for direct integration:

# Start MCP server (stdio transport)
python -m sharingan.serve

# Start MCP server (HTTP transport)
python -m sharingan.serve --transport http --port 8080

MCP Tools Available

Tool Description
resolve_library Find library by name
get_symbol Get full API docs for a symbol
search_docs Search guides and symbols
get_migration Get migration guide between versions
query_graph Free-form graph query
get_neighbors Get related nodes
shortest_path Find connection between symbols

Contributing

We welcome contributions! The most impactful ways to help:

  1. Add a library — add an entry to registry.json and run the extraction pipeline
  2. Improve parsing — better regex patterns for API signature extraction
  3. Report issues — if extraction misses or misidentifies an API
# Dev setup
git clone https://github.com/sharingan-docs/sharingan
cd sharingan
uv sync --all-extras
uv run pytest tests/ -q

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sharingan_ai-0.1.0.tar.gz (521.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sharingan_ai-0.1.0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file sharingan_ai-0.1.0.tar.gz.

File metadata

  • Download URL: sharingan_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 521.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sharingan_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3b51d3fa69a7fba23785ac8fd46ed064f910b9f86fa91d69ffb8faec807f36e
MD5 f8fe49968ec457c71833cacf70c29ded
BLAKE2b-256 b729386261b82b88186cca82d21cd3938da5335fc22add7d7747523f90fb914e

See more details on using hashes here.

File details

Details for the file sharingan_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sharingan_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sharingan_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88372929f34164eb4594207099ba4c303919c96c09b87ab90b7a01bc267f03ff
MD5 a4a4e0502b8d746d0bdd0acbc38f7e46
BLAKE2b-256 a79b9842fc8315a3fed072c6767e26aa358eced99024aa5d569790f85ff85c38

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page