npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ast-bro/cli

v3.0.0

Published

Fast, AST-based code-navigation and log-squeezing toolkit — downloads the binary on install

Readme

@ast-bro/cli

npm License: MIT

npm installer for ast-bro — a fast, AST-based code-navigation toolkit for source files (shape, public API, dep & call graphs, hybrid semantic search, structural rewrite, MCP server). Downloads the pre-built Rust binary on install.

Formerly @ast-outline/cli. Same project under a new scope (the ast-outline name became overloaded after the tool grew beyond outlining). The ast-outline command is still installed as a thin proxy that forwards to ast-bro, so existing scripts keep working.

Install

npm install -g @ast-bro/cli

This installs three commands, all forwarding to the same binary:

  • ast-bro — canonical name
  • sb — short alias (same tool, fewer keystrokes)
  • ast-outline — backward-compat shim

Usage

# Map the structure of a file (signatures + line ranges, no bodies)
ast-bro map src/player.rs

# Show the exact source of a specific method
ast-bro show Player.cs TakeDamage

# Compact digest of a whole module
ast-bro digest src/services/

# True public API (resolves pub use / __all__ re-exports)
ast-bro surface .

# Find all implementations of a type
ast-bro implements IDamageable src/

# Dependency graph
ast-bro deps src/auth.rs --depth 2
ast-bro reverse-deps src/auth.rs
ast-bro cycles

# Call graph (AST-accurate)
ast-bro callers TakeDamage
ast-bro callees Player.TakeDamage

# Hybrid BM25 + dense semantic search
ast-bro search "how does login work"

# Find semantically similar code
ast-bro find-related src/auth/login.rs:42

# AST-aware structural search and rewrite (with metavariables)
ast-bro run -p '$FUNC($$$)' -l rust
ast-bro run -p 'foo($A)' -r 'bar($A)' --write    # apply to disk

On first run, the CLI downloads the pre-built binary for your platform from GitHub releases and caches it locally.

| Platform | Cache directory | |---|---| | macOS | ~/Library/Caches/ast-bro-<version>/ | | Linux | ~/.cache/ast-bro-<version>/ |

Supported Platforms

| Platform | Status | |---|---| | macOS ARM64 | Pre-built binary available | | Other platforms | Build from source (see below) |

For unsupported platforms, build from source:

cargo install ast-bro

What is ast-bro?

ast-bro is a fast, AST-based code-navigation toolkit built for LLM coding agents and humans. It uses tree-sitter via ast-grep to parse source files and provide:

  • File shapemap / digest / show for signatures with line ranges (95% token savings vs reading full files)
  • True public APIsurface resolves re-export graphs across Rust, Python, TypeScript, and more
  • Dependency graphdeps / reverse-deps / cycles / graph for import analysis
  • Call graphcallers / callees with AST accuracy across 14 languages
  • Semantic search — hybrid BM25 + dense embeddings via search and find-related
  • Structural rewriterun for AST-aware pattern matching with metavariables (find + replace)
  • MCP server — every command exposed as an MCP tool for LLM agents

Supports Rust, Python, TypeScript, JavaScript, Java, C#, C++, Kotlin, Scala, Go, PHP, Ruby, SQL, and Markdown.

Links

License

MIT