danlentz

danlentz / clj-xref

Public

LLM-friendly cross-reference database for Clojure code. Query who-calls, calls-who, who-implements, ns-deps to feed precise dependency neighborhoods to AI assistants instead of entire source trees. Built on clj-kondo.

18
0
100% credibility
Found Apr 14, 2026 at 16 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Clojure
AI Summary

A tool that builds a searchable map from Clojure source code to answer questions about function callers, dependencies, protocol implementations, and more.

How It Works

1
💡 Discover the code explorer

You're digging into a large Clojure project and need quick answers about which parts connect to what.

2
🛠️ Add it to your project

Simply include the explorer in your project's setup so it can understand your code.

3
🔍 Scan your codebase

Run a one-time scan that creates a complete map of every function call, dependency, and connection across all your files.

4
📱 Load the map

Bring the map into your interactive coding session to start exploring.

5
Ask your questions

Easily query things like 'who calls this function?', 'what does it depend on?', or 'find unused code' and get clear lists instantly.

6
📊 Dive into results

Review detailed lists, graphs, and connections to visualize and understand your entire project.

🎉 Master your code

Now you confidently navigate, refactor, detect dead code, and share insights with your team.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 16 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is clj-xref?

clj-xref is a Clojure tool that builds an LLM-friendly cross-reference database from your code using clj-kondo static analysis. Analyze your project once to generate an EDN file, then query it for who-calls, calls-who, who-implements, and ns-deps to map precise dependency neighborhoods. Feed those snippets to AI assistants instead of dumping your entire source tree.

Why is it gaining traction?

It stands out by delivering semantic queries like call graphs and dead code detection in plain Clojure data structures, perfect for REPL scripting or CI pipelines. Developers hook into it for token-efficient LLM prompts—grabbing just relevant Clojure code contexts via lein xref or clj -T:xref generate. No UI bloat; it's a lightweight database for programmatic code intel.

Who should use this?

Clojure maintainers refactoring large codebases who need instant who-calls on functions like process-payment. Teams feeding code to LLM assistants for analysis, avoiding full-repo token waste. REPL explorers or CI operators building custom impact analysis on namespace dependencies.

Verdict

Try it if you're in Clojure and want clj-kondo-powered xrefs for LLMs—solid docs and query API make it usable now. At 12 stars and 1.0% credibility, it's early and unproven; test on toy projects first before production.

(178 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.