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 🙏

© 2025 – Pkg Stats / Ryan Hefner

repoquery

v0.7.1

Published

A tool to query your codebase using Anthropic's Claude with full file tree and your whole repository as context.

Downloads

9

Readme

RepoQuery

A tool to query your codebase using Anthropic's Claude with full file tree and your whole repository as context.

  • Ask questions about the whole codebase
  • Create a detailed implementation plan to hand to Cursor/Windsurf or another AI code editor

Overview

Why?

AI Code Editors are great, but to offer a $20 a month subscription they have to severely limit the context window. They load a few lines from a few files and that's it. The chat interface for ChatGPT, Claude, Grok are limited to ~20k tokens and start to summarise, truncate or refuse to answer.

This tool (at a cost [API usage fees]) gives you access to larger context windows, to answer full codebase questions or generate complex plans spanning multiple files.

Warning

This tool is experimental, it will have bugs, ensure you update to the latest version and post an issue on GitHub.

You should be selective with the files you include, models claim large context windows but rarely operate well at the limit.

Installation

bun install -g repoquery

Note: This tool requires Bun and does not support Node.js.

Usage

  1. Create a query.md file in your project:
---
include:
  - "src/**/*.ts"
  - "package.json"
ignore:
  - "src/tests/**"
---

Tell me about the codebase
  1. Run repoquery in your project directory:
repoquery

# or with thinking
repoquery --think

Options

  • --think: Show Claude's thinking process
  • --help: Display help information
  • --out: Write response to response.md file

Process

  • The AI assistant will determine if you are asking a question or requesting a code change.
  • It will then determine if it has enough information to answer the question or implement the change.
  • If it doesn't have enough information it will ask for more context.
  • If it has enough information it will generate a response.

This proccess is not perfect especially at larger context windows

If you provide too little context you will repeativly get asked for more context and the AI will not have enough examples to generate a good plan. If you provide too much context (too many files) the model will start to hallucinate and forget the context.

Features

  • Full file tree context for better comprehension of your codebase
  • Include using glob patterns
  • Gitignore support works automatically (excluded files won't be included)
  • Cursor rules automatically added to prompt
  • Smart token caching

Requirements

  • An Anthropic API key (Claude 3.7 Sonnet)
  • Create a .env file with:
ANTHROPIC_API_KEY=your_api_key_here

Cost Considerations

This tool uses Claude 3.7 Sonnet with a large context window, which can be expensive to run. This tool optimizes token usage by:

  • Suggesting files that should be included in the context window
  • Using prompt caching where possible
  • Calculating and displaying token usage and costs

The tool will show you token counts before making API calls and requires confirmation to proceed.