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

@yigitkonur/cli-repo-to-prompt

v1.1.2

Published

Gather project context for LLMs - intelligently scan repositories and format for AI consumption

Readme

cli-repo-to-prompt

Gather project context for LLMs — intelligently scan repositories and format for AI consumption.

npm version License: MIT

Why?

When working with AI coding assistants, you often need to share your project's context. Manually copying files is tedious and error-prone. cli-repo-to-prompt intelligently scans your codebase, respects .gitignore, filters out noise, and formats everything into clean Markdown ready for LLMs.

Features

  • 📁 Smart Scanning — Respects .gitignore, skips binaries, build artifacts, and node_modules
  • 🐙 GitHub Support — Clone and scan any public repository directly
  • 📋 Clipboard Ready — Copies to clipboard by default, ready to paste
  • 🌲 Tree Visualization — Beautiful project structure display
  • 🔍 Tech Detection — Automatically detects your stack
  • Fast — Built on native ESM with fast-glob

Installation

# Run instantly with npx (no install)
npx @yigitkonur/cli-repo-to-prompt

# Or install globally
pnpm add -g @yigitkonur/cli-repo-to-prompt

After global install, use any of these aliases:

cli-repo-to-prompt .
repo-to-prompt .
context .
llmcontext .
repocp .

Quick Start

# Scan current directory → clipboard
npx @yigitkonur/cli-repo-to-prompt

# Scan specific folder
npx @yigitkonur/cli-repo-to-prompt ./src

# Scan GitHub repo
npx @yigitkonur/cli-repo-to-prompt owner/repo

# Write to file
npx @yigitkonur/cli-repo-to-prompt -o context.md

# Preview what will be included
npx @yigitkonur/cli-repo-to-prompt --preview

Usage Examples

Basic

# Current directory to clipboard
cli-repo-to-prompt

# Specific directory
cli-repo-to-prompt ./backend

# Output to file
cli-repo-to-prompt -o output.md

# Print to stdout
cli-repo-to-prompt --stdout

GitHub Repositories

# Clone and scan
cli-repo-to-prompt facebook/react

# Specific branch
cli-repo-to-prompt vercel/next.js@canary

# Full URL
cli-repo-to-prompt https://github.com/microsoft/typescript

Filtering

# Include only Python files
cli-repo-to-prompt --include "*.py" --include-only

# Exclude test files
cli-repo-to-prompt --exclude "*.test.ts" --exclude "*.spec.ts"

# Include data files (off by default)
cli-repo-to-prompt --include-json --include-yaml --include-markdown

# Limit depth
cli-repo-to-prompt --max-depth 3

Output Control

# Preview files (no content)
cli-repo-to-prompt --preview

# Dry run (stats only)
cli-repo-to-prompt --dry-run

# JSON format
cli-repo-to-prompt --format json

# Show stats with output
cli-repo-to-prompt --show-stats

Options

Output

| Option | Description | |--------|-------------| | -o, --output <file> | Write to file | | --stdout | Print to stdout | | --no-clipboard | Don't copy to clipboard | | --format <type> | markdown (default) or json |

Filtering

| Option | Description | |--------|-------------| | --include <pattern> | Include glob pattern | | --exclude <pattern> | Exclude glob pattern | | --include-only | Only include matching patterns | | --max-size <size> | Max file size (default: 2M) | | --max-depth <n> | Max directory depth | | --include-binary | Include binary files |

File Types

| Option | Description | |--------|-------------| | --include-json | Include JSON files | | --include-yaml | Include YAML/YML files | | --include-markdown | Include Markdown files | | --include-html | Include HTML files | | --include-css | Include CSS files | | --include-sql | Include SQL files | | --include-csv | Include CSV files | | --include-xml | Include XML files |

Git

| Option | Description | |--------|-------------| | --no-gitignore | Ignore .gitignore | | --use-git | Only include git-tracked files |

Features

| Option | Description | |--------|-------------| | --preview | Preview files without content | | --dry-run | Show stats only | | --interactive | Interactive configuration | | --sort-alpha | Sort alphabetically | | --check-updates | Check for updates |

Output Example

# 📁 Project Context
*Directory: `~/my-project`*

## Overview
- **Stack:** TypeScript, React
- **Files:** 24
- **Lines:** 2,456

## Structure
.
├── 📁 src
│   ├── 📄 index.ts (50L)
│   └── 📁 components
│       └── 📄 App.tsx (120L)
└── 📄 package.json (30L)

---

## Source Files

### 📘 `src/index.ts`
*50 lines • 1,234 chars*

\`\`\`typescript
// Your code here...
\`\`\`

Requirements

  • Node.js 18+
  • git (for GitHub cloning)

License

MIT © Yigit Konur