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.1.tar.gz (924.0 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.1-py3-none-any.whl (874.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sharingan_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 924.0 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.1.tar.gz
Algorithm Hash digest
SHA256 ffdcb7e400aee84712119923eb35ddf96ad746d53f89b6f14fe29fe236e23e74
MD5 a8733362adaf46b7e770e0764457131b
BLAKE2b-256 9daa0f4caa41d870509d3bc728044b79123163a2ce8b86160d283f10c87a0547

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sharingan_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 874.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 102e4e679ddb7d75db10f22a8cb7df959f67d0248c3d2958798a08cf302fcf37
MD5 a1aba92b1423e5412638b336568089de
BLAKE2b-256 231062e96814b90dbcec0a9034e20340c70bd146cc6cb23ee748778eae229775

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