Skip to content

JeelGajera/graphyn

Repository files navigation

Graphyn

Understand the blast radius before you change code.

Graphyn builds a deterministic symbol relationship graph for your repository so you and your coding agents can answer:

  • What breaks if I change this symbol?
  • Where is this symbol used (including aliases)?
  • What does this symbol depend on?

Why Graphyn

  • Alias-aware: resolves import { A as B }
  • Property-aware: tracks accessed members (for safer refactors)
  • Deterministic: no LLM in graph construction
  • Fast queries: in-memory graph traversal
  • Agent-ready: MCP server for Cursor, Claude Code, Codex, and others

Install

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/JeelGajera/graphyn/master/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/JeelGajera/graphyn/master/install.ps1 | iex

From source (Cargo):

cargo install graphyn-cli --git https://github.com/JeelGajera/graphyn

Quick Start

  1. Index a repo:
graphyn analyze ./my-repo
  1. Run queries:
# impact analysis
graphyn query blast-radius UserPayload

# usages (alias-aware)
graphyn query usages UserPayload

# dependency tree
graphyn query deps UserPayload

# graph summary
graphyn status
  1. Keep graph updated while coding:
graphyn watch ./my-repo

Core Commands

  • graphyn analyze <path>: parse and build graph into .graphyn/db
  • graphyn watch <path>: keep graph in sync on file changes
  • graphyn query blast-radius <symbol> [--file <path>] [--depth <n>]
  • graphyn query usages <symbol> [--file <path>]
  • graphyn query deps <symbol> [--file <path>] [--depth <n>]
  • graphyn status: graph stats and coverage
  • graphyn serve --stdio: start MCP server

Filtering

Graphyn honors .gitignore by default. If a symbol is missing, check whether it lives in an ignored folder such as dist/, generated output, or scratch files.

Override filters when needed:

graphyn analyze . --no-gitignore
graphyn analyze . --include "src/**/*.ts"
graphyn analyze . --exclude "tests/**"
graphyn watch . --include "packages/api/**/*.ts"

For MCP clients, refresh_graph accepts:

  • path
  • respect_gitignore
  • include
  • exclude

Example:

{
  "path": ".",
  "respect_gitignore": false,
  "include": "src/**/*.ts",
  "exclude": "tests/**"
}

MCP Integration

Start server:

graphyn serve --stdio

Agent and MCP setup templates are in agent-configs/.

The folder includes ready-to-use examples for:

  • AGENTS.md
  • Claude Code CLAUDE.md
  • Claude Code Skills
  • Cursor rules
  • GitHub Copilot instructions
  • Gemini guidance
  • Antigravity-style rules/workflows
  • MCP configs for Cursor, Claude Code, Antigravity and Codex

Language Support

Supported now:

  • TypeScript / JavaScript
  • .mts, .cts, .mjs, .cjs
  • Vue (.vue), Svelte (.svelte), Astro (.astro)

Planned:

  • Python
  • Rust
  • Go

Build & Test

cargo build --release
cargo test --workspace
cargo clippy --workspace -- -D warnings

License

Apache-2.0 — see LICENSE