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

chatgpt-context-cli

v1.0.5

Published

A CLI tool that generates a project context prompt for ChatGPT by scanning your project files.

Readme

chatgpt-context-cli

npm version Build Status License: MIT

chatgpt-context-cli is an open-source CLI tool that scans your project files and generates a comprehensive context prompt for ChatGPT. This allows you to ask questions about your codebase with all the context needed for a precise answer.

Features

  • Project File Tree: Automatically generates a tree-like representation of your project's directory structure.
  • File Contents Aggregation: Collects file contents of your choice, with a clear separation and labeling for each file.
  • Customizable Extensions: Prompt for file extensions to include, with sensible defaults for TypeScript, React, Next.js, CSS, and SCSS files.
  • ES Module Support: Built with TypeScript and published as an ES module for compatibility with the latest Node.js versions.

Installation

You can install chatgpt-context-cli globally via npm:

npm install -g chatgpt-context-cli

Or you can run it without installation using npx:

npx chatgpt-context-cli

Usage

Simply navigate to the root directory of your project and run:

chatgpt-context

Follow the interactive prompt to enter the file extensions you want to include (the default is set to .tsx, .ts, .css, .scss). The tool will scan your project—ignoring files and directories specified in your .gitignore—and output a formatted prompt with your project’s file tree and file contents.

Example Output

Below is the context of the project files that will be used to answer the following question:

===== Project File Tree =====
├── app
│   ├── globals.css
│   └── layout.tsx
├── components
│   └── Note.tsx
├── pages
│   ├── api
│   │   ├── note
│   │   │   └── [id].ts
│   │   └── notes.ts
│   └── index.tsx
└── tailwind.config.ts

===== File Contents =====

--- File: app/globals.css ---
@tailwind base;
@tailwind components;
@tailwind utilities;

...

..........................................................

You can now copy the generated prompt and use it as context when asking ChatGPT questions about your project.

Contributing

Contributions are welcome! If you have suggestions or find issues, please follow these steps:

  1. Fork the Repository
  2. Create a Feature Branch:
    git checkout -b feature/your-feature-name
  3. Commit Your Changes:
    Make sure your code is well-documented and includes tests if applicable.
  4. Push to Your Branch:
    git push origin feature/your-feature-name
  5. Open a Pull Request:
    Describe your changes clearly and reference any related issues.

For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

If you have any questions or need help, please open an issue on the GitHub repository.