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

repotok

v0.0.1

Published

A tokenizer for AI repositories

Readme

repotok

A utility that processes a source code repository and converts it into a single text file optimized for AI context windows. It respects .gitignore rules and intelligently skips binary files, large files, and common directories that should be excluded.

Features

  • ✅ Respects .gitignore patterns
  • ✅ Skips binary files automatically
  • ✅ Ignores large files (>1MB)
  • ✅ Excludes common directories (node_modules, .git, etc.)
  • ✅ Formats output with clear file separators
  • ✅ Simple, zero-dependency CLI

Installation

You don't need to install this package permanently. Use it directly with your preferred package manager:

# Using npx (npm)
npx repotok [project-path] [output-path]

# Using yarn
yarn dlx repotok [project-path] [output-path]

# Using pnpm
pnpm dlx repotok [project-path] [output-path]

# Using bun
bunx repotok [project-path] [output-path]

Usage

# Process the current directory and save output to the default location
npx repotok

# Process a specific project path
npx repotok /path/to/your/project

# Process a project and save to a specific output file
npx repotok /path/to/your/project /path/to/output/file.txt

Default Values

  • Project Path: Current working directory if not specified
  • Output Path: ./tokenized_project.txt if not specified

How It Works

  1. Loads and parses .gitignore rules (if available)
  2. Recursively walks through the project directory
  3. Skips files and directories based on defined rules
  4. For each included file, adds a formatted header and content to the output
  5. Writes all combined content to a single output file

Why Use This?

When working with AI coding assistants like GitHub Copilot, Claude, or ChatGPT, providing comprehensive context about your project can significantly improve the quality of assistance. This tool creates a single file that you can easily upload or paste into your AI interface to give it full context about your codebase.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

About AI Contributions

This project was created (almost) entirely with AI assistance, and we welcome contributions similarly created or enhanced by AI tools. We believe that AI-human collaboration represents the future of software development.

When contributing:

  • Be transparent about AI-generated content
  • Review and verify AI-generated code before submission
  • Focus on delivering value, regardless of whether the code was written by human, AI, or collaboration

License

MIT