๐Ÿ” Rustlens

April 2, 2026 ยท View on GitHub

A blazing-fast Rust code inspector for the terminal

CI License: MIT Crates.io Rust


Rustlens is a terminal-based application for exploring Rust codebases. It parses your Rust source files and provides an interactive interface to browse functions, structs, enums, traits, and more โ€” all without leaving your terminal.

Built with Ratatui for a smooth, responsive TUI experience.

Built With Ratatui

โœจ Features

  • ๐Ÿ“ฆ Code Analysis โ€” Parses Rust source files using syn:

    • Functions (parameters, return types, async/const/unsafe)
    • Structs (fields, derives, generics)
    • Enums (variants with all field types)
    • Traits (methods, associated types, supertraits)
    • Impl blocks (inherent and trait implementations)
    • Modules, Type aliases, Constants, Statics
  • ๐Ÿ” Smart Search โ€” Fuzzy matching with real-time filtering

  • ๐Ÿ“‹ Dependency Analysis โ€” Visualize Cargo.toml dependencies

  • ๐ŸŽจ Multiple Themes โ€” Default Dark, Nord, Catppuccin Mocha, Dracula

  • โšก Smooth Animations โ€” Selection highlights, tab transitions

  • โŒจ๏ธ Vim-style Navigation โ€” j/k for movement, / for search

Rustlens Crates Tab Demo

๐Ÿ“ฆ Installation

With Rust and Cargo installed:

cargo install rustlens

From source

git clone https://github.com/yashksaini-coder/vizier.git
cd vizier
cargo install --path .
# or: make install

Pre-built binaries

See Releases for Linux (x86_64), macOS (x86_64, Apple Silicon), and Windows (x86_64) binaries.

๐Ÿš€ Usage

Rustlens Copilot Chat Demo

# Cd into the project directory
cd path/to/rust-project
# Analyze current directory (must be a Cargo project root or folder with .rs files)
rustlens

โŒจ๏ธ Keyboard Shortcuts

KeyAction
Focus & panels
Tab / Shift+TabNext / previous panel (search โ†’ list โ†’ inspector)
/Focus search
EscClear search, back to list, or close popup
List & inspector
โ†‘ / โ†“ or j / kMove selection / scroll inspector
Enter / โ†’ / lOpen item / focus inspector
โ† / hBack to list (e.g. exit crate view)
HomeFirst item
G / EndLast item
PgUp / PgDnPage up / down
Tabs
1 2 3 4Types ยท Functions ยท Modules ยท Crates
Crates tab only
oOpen docs.rs in browser
cOpen crates.io in browser
Other
COpen Copilot chat (ask about current item)
tCycle theme
SSettings overlay
?Toggle help
q / EscQuit
Links
gOpen GitHub repo in browser
sOpen Sponsor page in browser

๐Ÿ› ๏ธ Development

# See all commands
make

# Install development tools
make dev-setup

# Full check (format, lint, typecheck)
make check

# Run linter
make lint

# Run tests
make test

# Build release
make release

๐Ÿ“ค Releasing (maintainers)

  • Publish to crates.io (after cargo login): make publish-dry-run then make publish. The crate is published as rustlens.
  • GitHub Release: Push a version tag (e.g. v0.1.0). The release workflow builds binaries for Linux, macOS (Intel + Apple Silicon), and Windows and creates a release. Optionally set CARGO_REGISTRY_TOKEN in repo secrets to auto-publish to crates.io on tag push.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes using Conventional Commits
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

Commit Convention

We use Conventional Commits. Examples:

  • feat: add new search feature
  • fix: correct parsing error
  • docs: update README
  • refactor!: change API structure (breaking change)

Star History

Star History Chart

๐Ÿ“„ License

This project is licensed under the MIT License.