mufeedvh / code2prompt
A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.
Why this job: works in the areas we cover, but does not say which job it does

What it does
- Terminal User Interface (TUI). Interactive terminal interface for configuring and generating prompts
- Smart Filtering. Include/exclude files using glob patterns and respect .gitignore rules
- Flexible Templating. Customize prompts with Handlebars templates for different use cases
- Automatic Code Processing. Convert codebases of any size into readable, formatted prompts
- Token Estimates. Estimate prompt size using parallel per-file token counts and estimated template overhead, including optional line numbers. The full rendered prompt is not re-tokenized, and the estimate excludes the JSON output envelope.
Get started
No single install command. Read the steps in the README (opens in new tab)
- Maintenance
- Active
- Last commit 9 days ago
- Stars
- 7,761
- +17 this week
- Licence
- MIT
- Allows business use
- Downloads for
- 3 systems
- Mac, Windows, Linux
- Latest version
- v4.2.0
- Released 11 months ago
- Built with
- Rust
- 49% of the code
Is it looked after?
- Contributors
- Not stated
- Last 90 days
- Issues
- 95% closed
- 5 still open
- Pull requests
- 126 merged
- 15 waiting
- Releases
- 6
- 1 in the last year
- No contributing guide
- No security policy
- No code of conduct
Similar repos
| Repo | Stars | Last commit | Licence | Downloads for |
|---|---|---|---|---|
| linshenkx / prompt-optimizer | 41,312 | 3 days ago | Custom | Mac, Windows, Linux |
| microsoft / promptflow | 11,266 | 24 days ago | MIT | No downloads |
| yarin-zhang / AI-Gist | 915 | 14 days ago | AGPL-3.0 | Mac, Windows, Linux |
More: download files, languages, topics and project record
Download files, v4.2.0
- Mac2 files, 686 downloads
- Windows1 file, 1,900 downloads
- Linux1 file, 3,065 downloads
Languages
- Rust 49%
- MDX 43%
- Astro 3%
- Handlebars 2%
Topics
- ai
- chatgpt
- claude
- cli
- command-line
- command-line-tool
- gpt
- llm
- prompt
- prompt-engineering
- prompt-generator
- prompt-toolkit
Project record
- JobOther AI tools
- StatusListed
- Commits712
- Forks458
- Watching43
- Stars in 28 days+52
- CreatedMar 9, 2024
- First seen by usNov 7, 2026
- CheckedNov 8, 2026
