@jagathratchagan.m/repoprompt
v0.1.0
Published
Generate a clean AI-ready repo-context.md from any GitHub repository.
Downloads
27
Maintainers
Readme
repoprompt
Turn any codebase into an AI-ready prompt for Claude, ChatGPT, Cursor, Codex, and Windsurf.
Quick Start
npx @jagathratchagan.m/repopromptThat creates:
repo-context.mdOpen repo-context.md, paste it into your AI coding tool, and ask:
Explain this project.Why?
AI coding tools work better when they understand your repo.
repoprompt gives them clean, safe, useful context without making you copy files by hand.
Features
- Respects
.gitignore - Redacts secrets
- Estimates tokens
- Creates
repo-context.md - Works with any AI coding tool
Demo

Terminal demo:
$ cd ~/code/random-open-source-repo
$ npx @jagathratchagan.m/repoprompt
Created /Users/dev/code/random-open-source-repo/repo-context.md
Included 42/57 files
Estimated tokens: 38420
Redacted possible secrets: 2
$ open repo-context.mdThen paste repo-context.md into Claude, ChatGPT, Cursor, Codex, or Windsurf:
Explain this project.The AI now has the repo tree, important source files, redacted secrets, and a prompt telling it how to reason about the codebase.
What Gets Generated?
repo-context.md includes:
- Repository summary
- File tree
- Selected source files with paths
- Rough token estimate
- Final
Prompt to use with AIsection
Example shape:
# Repository Context
## Summary
## File Tree
## Source Files
### `src/index.ts`
### `src/scanner.ts`
### `src/output.ts`
## Prompt to use with AISafety Defaults
repoprompt skips noisy or risky files by default:
.gitnode_modulesdist,build,coverage- lock files
- images, videos, fonts, archives, PDFs, Office documents, binaries
- large files
- paths ignored by
.gitignore
Secret redaction is best-effort. Review repo-context.md before sharing it publicly or pasting it into third-party tools.
See SECURITY.md for reporting security issues and safe-use guidelines.
Options
The tiny version is intentionally simple:
npx @jagathratchagan.m/repopromptWhen you need more control:
npx @jagathratchagan.m/repoprompt --output context.md
npx @jagathratchagan.m/repoprompt --max-tokens 80000
npx @jagathratchagan.m/repoprompt --include "src/**/*.ts"
npx @jagathratchagan.m/repoprompt --exclude "tests/**"Build Locally
npm install
npm test
npm run build
npm run devRoadmap
- Record official GIF/asciinema demo
- Add config file support
- Add
--dry-run - Add
--json - Improve token estimation
- Add framework presets
Contributing
Contributions are welcome.
- Fork the repository.
- Create a branch.
- Keep the change focused.
- Add or update tests.
- Run
npm test. - Open a pull request.
License
MIT. See LICENSE.
