BigHugger
GH Repository · mufeedvh

code2prompt

A CLI tool to convert your codebase into a single LLM prompt with source tree, prompt templating, and token counting.

stars
7,656
30-day movement
+207/day
Related entries
61
Connections
2
otherRustaiclaudellmchatgptcommand-linecommand-line-toolpromptgptprompt-toolkitprompt-engineeringcliprompt-generatorrust

code2prompt is a Rust-based CLI tool that turns a codebase into a single LLM prompt. It includes a source tree, prompt templating, and token counting in the output.

Use it when you need to hand an LLM your whole codebase context in one prepared prompt.

Use it to

  • Generate a full-codebase prompt for ChatGPT or Claude
  • Apply custom prompt templates to a codebase
  • Count tokens before submitting a prompt
  • Include a source tree alongside code in prompts

For Developers preparing code context for LLM workflows

Role
other
Language
Rust
Licence
MIT
Forks
436
Open issues
4
Last push
2026-09-11
Latest release
v1.0.0 · 2024-03-16
Skills shipped
1
topicsclillmprompt-engineeringcodebaserusttoken-counting