How to use Code2Prompt ?
Code2Prompt comes with different flavors depending on your needs.
Code2Prompt simplifies code ingestion, turning your repository into structured prompts for AI and automation.
Code2prompt transforms any text repositories into meaningful prompts... Check it out !
node_app ├── README.md ├── data │ └── sample.json └── src ├── index.js └── utils.js
Project Path: node_app
Source Tree:
```txt
node_app
├── README.md
├── data
│ └── sample.json
└── src
├── index.js
└── utils.js
```
`node_app/README.md`:
```md
Simple Node.js app to process JSON data.
Feature idea: Add a filter function to sort users by age.
```
`node_app/data/sample.json`:
```json
{
"users": [
{
"name": "Alice",
"age": 25
},
{
"name": "Bob",
"age": 30
}
]
}
```
`node_app/src/index.js`:
```js
const { processData } = require("./utils");
console.log("App started");
processData();
```
`node_app/src/utils.js`:
```js
function processData() {
console.log("Processing data...");
}
module.exports = { processData };
```
Code2Prompt comes with different flavors depending on your needs.
Code2Prompt introduces a new development workflow, enabling AI and human agents to interact with code efficiently.
Code2Prompt leverages glob patterns to include or exclude only the relevant files.
This allows you to query LLMs without extra noise, thus reducing hallucination and increasing performance.
code2prompt . --include "*.js,*.html" --exclude "node_modules/"
Discover the new features
Code2Prompt transforms your codebase into structured prompts for AI models, making it easier to get accurate, context-aware responses.
Code2Prompt is built by and for developers. Contribute, suggest features, and help shape the future of AI-driven code analysis.