3 ms·
I do something similar, but "raw" markdown instead + filename, so all my prompts end up like this basically: Do blah blah blah while taking blah and blah i
by diggan 2y ago
I do something similar, but "raw" markdown instead + filename, so all my prompts end up like this basically:
Do blah blah blah while taking blah and blah into account. Here is my current code:
File `file1.js`:
```javascript
console.log('I am number one!')
```
File `file2.js`:
```javascript
console.log("I am number two :(")
```
Not sure if I'm imagining, but when I tried with/without the markdown code blocks, it seems to do better when I used markdown code blocks, so wrote a quick CLI that takes a directory path + prompt and creates something like that automatically for me. Often times I send identical prompts to ChatGPT+DeepThink+Claude, compare the approaches and continue with the one that works best for that particular problem, so having something reusable really saved time for this.
Edit: fuck it, in case people are curious how my little CLI works, I threw it up here: https://github.com/victorb/prompta https://github.com/victorb/prompta (beware of bugs and whatnot, I've quite literally hacked this together without much thought)
- atxtechbro 2y agoI actually have a perfect tool called siphon-cli for this. It adds the headers in between files and everything. https://docs.siphon-cli.com/ https://docs.siphon-cli.com/
- diggan 2y agoYeah, like a lightweight version of my prompta CLI :) What I end up with, is one .md file that uses variables like "$SRC", "$TESTS" and "$DOCS" inside of it, that gets replaced when you run `prompta output`, and then there is also a JSON file that defines what those variables actually get replaced with. Bit off-topic, but curious how your repository ends up having 8023 lines of something for concatenating files, while my own CLI sits on 687 lines (500 of those are Rust) but has a lot more functionality :)
- quartzic 2y agoNot OP, but practically all of those lines are from a package-lock.json file (6755 lines) and a changelog (541 lines). It looks like the actual source is 179 lines long.