2 unstable releases

Uses new Rust 2024

0.2.0 Apr 7, 2026
0.1.0 Mar 22, 2026

#17 in #oxc


Used in 3 crates (2 directly)

MIT license

155KB
3.5K SLoC

Source code and documentation parsing for repoask.

Handles TS/JS (via oxc) and Markdown. Pure Rust, WASM-compatible. For tree-sitter based languages (Rust, Python, Go, etc.), see repoask-treesitter.


repoask

Code understanding tool for any repository. Local-first, no external services, fast.

repoask search  vercel/next.js "middleware authentication"  # find code and docs
repoask explore supabase/auth-js "session management"       # understand how to use a library
repoask trace   ./my-app src/auth/session.ts#UserSession    # trace impact of changes

Install

cargo install repoask

Commands

Search a repository's code and documentation using natural language.

repoask search owner/repo "query"

Pin to a specific ref:

repoask search owner/repo@v2.0.0 "query"

Options:

  • -n, --limit — max results (default: 10)
  • -f, --format — output format: json (default) or text
  • --dir — restrict results to files under a directory prefix. Repeat or use commas
  • --ext — restrict results to file extensions. Repeat or use commas
  • --type — restrict results to code or doc
  • --verbose — print parse diagnostics to stderr when rebuilding the index, or note cache reuse on cache hits

Output includes code symbols (functions, classes, types) and documentation sections, ranked by relevance.

$ repoask search colinhacks/zod "parse error" --format text
[code] src/ZodError.ts:15-120  Class ZodError  (score: 0.847)
[doc]  README.md#error-handling  "ZodError is a subclass of Error..."  (score: 0.723)
[code] src/types.ts:340-365  Function safeParse  (score: 0.651)

Filter to docs under docs/:

repoask search owner/repo "authentication" --dir docs --ext md --type doc

explore

Understand how to use an external repository. Surfaces docs, public APIs, types, and examples — top-down.

$ repoask explore supabase/auth-js "authentication setup" --format text
[doc]     README.md#quick-start
          "Install @supabase/auth-js and call createClient()..."
[api]     src/GoTrueClient.ts  signInWithPassword(credentials)
           returns AuthResponse { user, session }
[api]     src/GoTrueClient.ts  signUp(credentials)
           returns AuthResponse { user, session }
[example] examples/nextjs/middleware.ts  createMiddleware()
          lines 8-30
[type]    src/lib/types.ts  AuthResponse
          { user: User | null, session: Session | null }

Coming soon.

trace

Trace impact of changes in your own repository. Shows call graphs, type dependencies, and affected files — center-out.

$ repoask trace ./my-app src/auth/session.ts#UserSession --format text
target:   src/types/session.ts:15  type UserSession

produces: (2 files)
  src/auth/login.ts       createSession()
  src/auth/refresh.ts     refreshSession()

consumes: (12 files)
  src/api/users.ts        getUser()          score: 0.95
  src/api/profile.ts      updateProfile()    score: 0.87
  src/middleware/auth.ts   requireAuth()      score: 0.82
  ... and 9 more

impact: high (23 references across 14 files)

Coming soon.

cleanup

Remove cached data.

repoask cleanup              # remove all
repoask cleanup owner/repo   # remove specific repo

How It Works

  1. Shallow clones the repo on first use (git clone --depth 1)
  2. Parses code with oxc (TS/JS) and tree-sitter (Rust, Python, Go, Java, C, C++, Ruby)
  3. Parses documentation (Markdown) into sections
  4. Builds a BM25 inverted index over symbols, docs, and file paths
  5. Caches everything locally — subsequent searches return in <100ms

No LLM, no embedding, no external service, no Docker.

Supported Languages

Language Parser
TypeScript, JavaScript oxc
Rust, Python, Go, Java, C, C++, Ruby tree-sitter
Markdown built-in

License

MIT

Dependencies

~13MB
~204K SLoC