Scalex Kestrel

Scalex

Grep knows text. Scalex knows Scala.
~1000 lines. Zero compilation. Zero build server. Just answers.

214k
Symbols Indexed
~1s
Warm Query
~1000
Lines of Code
0
Dependencies on Build Server
View on GitHub Install →

One command. One answer.

AI agents don't need regex. They need structured, Scala-aware responses in a single tool call.

scalex — scala3-compiler (17.7k files)
$ scalex def Compiler --verbose

  class     Compiler (dotty.tools)compiler/src/.../Compiler.scala:16
             class Compiler
  trait     Compiler (scala.quoted)staging/src/.../Compiler.scala:8
             trait Compiler
  object    Compiler (scala.quoted)staging/src/.../Compiler.scala:12
             object Compiler

$ scalex impl Compiler --verbose

  class     ExpressionCompiler.../ExpressionCompiler.scala:18
             class ExpressionCompiler extends Compiler
  class     TASTYCompiler.../TASTYCompiler.scala:9
             class TASTYCompiler extends Compiler
  class     InteractiveCompiler.../InteractiveCompiler.scala:10
             class InteractiveCompiler extends Compiler
  class     ReplCompiler.../ReplCompiler.scala:34
             class ReplCompiler extends Compiler

12 commands. Zero config.

Point it at any git repo with Scala files. Works on Scala 2 and 3, auto-detects dialect per file.

scalex search
Search symbols by name. Fuzzy match, ranked by relevance. Filter by kind, --exact, or --prefix.
scalex def
Where is this defined? Finds traits, classes, objects, givens — things grep misses.
scalex impl
Who extends this trait? Exact parent matching from the AST, no substring noise.
scalex refs
Who uses this symbol? Categorized by default: grouped by definition, extends, import, type, comment. Use --flat for plain list.
scalex imports
Who imports this symbol? Clean dependency view — which files depend on what.
scalex symbols
What's in this file? All classes, traits, defs, vals with signatures.
scalex file
Find files by name. Fuzzy camelCase matching — "hms" finds HttpMessageService.scala.
scalex annotated
Find symbols by annotation — @deprecated, @main, @tailrec. Filter by kind and path.
scalex grep
Regex search in .scala file contents. Like grep, but with --path and --no-tests built in.
scalex packages
What packages exist in this project?
scalex batch
Multiple queries, one index load. 5 queries in ~1s instead of ~5s.
scalex index
Force reindex. Normally automatic — every command auto-indexes.

Benchmarks on real codebases.

Tested on the Scala 3 compiler itself. Native binary, GraalVM.

Project Files Symbols Cold Index Warm Index
Small library 92 259 ~50ms ~10ms
Mill build tool 1,415 12,778 214ms 50ms
Production monorepo 13,958 214,803 3.3s ~1s
Scala 3 compiler 17,731 202,916 3.1s 723ms

Get started in 10 seconds.

Claude Code users

The fastest way — installs the binary + skill in one step.

# In Claude Code, run:
/plugin marketplace add nguyenyou/scalex
/plugin install scalex@scalex-marketplace

Other AI agents / manual install

Download the binary to ~/.local/bin, then grab the skill.

# 1. Install the binary (pick your platform)

# macOS Apple Silicon
mkdir -p ~/.local/bin
curl -fsSL https://github.com/nguyenyou/scalex/releases/latest/download/scalex-macos-arm64 -o ~/.local/bin/scalex && chmod +x ~/.local/bin/scalex

# macOS Intel
mkdir -p ~/.local/bin
curl -fsSL https://github.com/nguyenyou/scalex/releases/latest/download/scalex-macos-x64 -o ~/.local/bin/scalex && chmod +x ~/.local/bin/scalex

# Linux x64
mkdir -p ~/.local/bin
curl -fsSL https://github.com/nguyenyou/scalex/releases/latest/download/scalex-linux-x64 -o ~/.local/bin/scalex && chmod +x ~/.local/bin/scalex
# 2. Download the skill (teaches your AI agent how to use scalex)

# The skill lives at plugin/skills/scalex/SKILL.md in this repo.
# Download it and place it wherever your agent reads skills from.
mkdir -p scalex
curl -fsSL https://raw.githubusercontent.com/nguyenyou/scalex/main/plugin/skills/scalex/SKILL.md -o scalex/SKILL.md