Convert the whole codebase to a single Json File so that you can upload to Chatgpt.
npm install -g cbj
npm install -D cbj // pnpm install -D cbj
npx cbj compress // or pnpm exec cbj compress
npx cbj decompress // or pnpm exec cbj decompress
File will be created at ./cbj_representation.json
If not lastest: "npx cbj@latest compress" to run the lastest
(Optional) To initiate base cbj_representation.json with "npx cbj init"
Just upload to chat gpt with prompt template(maybe).
Rename the result to "cbj_representation.json" then use "npx cbj decompress".
Good luck.
[cbj_representation.json]
This is my codebase.
<Make a wish here.>
// response formating
Generated source code should be in ./src folder.
Just give me **json**, **file** format with content Array of {"path":string, "content":string} to download.
Next we expect ChatGpt give us the result in [cbj_representation.json].
- ✅Check uncommitted changes before overwrite.
- ✅Respect .gitignore file.
Welcome. Just PR or open issue.
- Enrich prompts to be able to deal with more cases.
- White list mode that confine the files and folders for safety.
- Need more complete test case.
- Convert more type of files to string(in the json file) so that AI can understand it.
- Extends this outside of the js world.
- Mode for silence(not so many console.log...).
- ✅(most of the time) Game of Life in HTML
- ✅(most of the time) Todo-list in HTML
-
❌ Failed to add a simple CRUD feature to an existing full-stack (T3 stack) app. Waiting for AI to improve in reasoning capabilities.
- Do not have enough respect for existing style. For example, I am using tailwind but it generates component using traditional component.
- Do not have enough respect for existing file structure.
MIT License © 2024-PRESENT Ethan Kao