Rapidly explore unfamiliar Scala 2/3 and Java codebases from the CLI by searching symbols, finding definitions, implementations, usages, imports, members, and scaladoc, plus viewing call graphs as ASCII art for quick project navigation and test lookups.
No build server. Nothing to leak. No daemon, no background process, no socket. No build server silently eating RAM, leaking threads, or grinding your CPU. The index is a single file in your repo — when scalex exits, nothing is left running. See how it works.
Zero setup. Just works. Install the skill, point it at any git repo, start navigating. No build files, no config, no "import build" dialog, no "connecting to build server". Clone a repo you've never seen and explore it in seconds. See quick start.
Smarter than grep. Categorized references with confidence ranking. Wildcard import resolution (finds 1,205 importers where grep finds 17). Transitive inheritance trees. Structural AST search. Things grep fundamentally cannot do. See the honest comparison for real examples.
Composite commands.explain returns definition + scaladoc + members + implementations + import count in one shot. refs --count triages impact in one line. Designed to minimize tool calls — the biggest cost for coding agents isn't latency, it's the number of round trips. See what makes it coding-agent-friendly for the full picture.
After installing, clone a project and ask Claude to explore it:
"Use scalex to explore how Scala.js turns Scala code into JavaScript."
Scalex indexes the codebase in seconds, then navigates definitions, traces implementations, and explores the architecture — all without a build server or compilation.
Coding agents (Claude Code, Cursor, Codex) are powerful, but they're blind in large Scala codebases. When an agent needs to find where PaymentService is defined, it has two options:
Grep — fast, but dumb. Returns raw text. Can't filter by symbol kind, doesn't know a trait from a usage. The agent has to construct regex patterns and parse raw output.
Metals LSP — smart, but heavy. Requires a build server, full compilation, minutes of startup. Designed for humans in IDEs, not agents making quick tool calls.
Design Principles
Scalex takes only the source-level indexing layer of a language server — definitions, references, implementations, hierarchy — and parses it directly from source with Scalameta. No build, no classpath, no daemon. The tradeoff: when two packages both define a class called Config, scalex can't tell which one extends Config refers to — that requires type resolution. The upside: clone any repo, index 17k files in seconds, and start navigating immediately.
One command = one answer. No multi-step reasoning, no regex construction.
Structured output. Symbol kind, package, file path, line number. Not raw text.
Scala 2 and 3. Enums, givens, extensions, implicit classes, procedure syntax — auto-detected per file.
Java files..java files are also indexed with lightweight regex extraction (class/interface/enum/record).
Honest about limits. When it can't find something, it tells the agent what to try next.
How It Works
Here's the architecture (generated with scalex graph --render):
AI-powered codebase understanding assistant. Learn design patterns, analyze impact, trace code flows, and understand any codebase through information theory principles. Includes 6 Agent Skills for automatic analysis triggering.
Guide for writing ast-grep rules to perform structural code search and analysis. Use when users need to search codebases using Abstract Syntax Tree (AST) patterns, find specific code structures, or perform complex code queries that go beyond simple text search.