Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Loupe is an all-in-one suite of ergonomic APIs and CLI tools for code analysis & codebase querying, aiming for code comprehension, refactoring & automation.

It leverages well-known program analysis techniques, algorithms, and heuristics to answer very common questions about codebases.

Components

Structure-wise, Loupe has 2 main parts: the API and the CLI interface.

Functionality-wise, Loupe is concerned with 4 aspects:

  • Code analysis: understanding structure, symbols, and relationships within a codebase.
  • Code querying: searching and pattern-matching over code in a structured, expressive way.
  • Code refactoring: applying transformations like renaming, reorganizing, and restructuring.
  • Quality assurance: detecting smells, bad patterns, and potential bugs.

Goals

  • Ergonomic: easy-to-use APIs that feel natural to work with.
  • Extensible: can be extended from the core API without fighting the design.
  • Fast: instant results; must be meaningfully faster than AI doing manual search.
  • Simple: self-contained and not bloated.