JSON Model Specification Tool
pnpm add -D @cluesurf/make-code-text
yarn add -D @cluesurf/make-code-text
npm i -D @cluesurf/make-code-text
// scripts/make-prompt.ts
import makeCodeText from '@cluesurf/make-code-text'
makeCodeText({
patterns: ['**/*'],
ignoredPatterns: [
'node_modules/**/*',
'.dockerfile',
'.env',
'test.ts',
'.gitignore',
'.prettierignore',
'*.md',
'eslint.config.ts',
'package.json',
'pnpm-lock.yaml',
'tsconfig.json',
'scripts/**/*.ts',
'**/*/.terraform/',
'**/*/*.tfstate',
'**/*/*.tfstate.backup',
'**/*/terraform.tfvars',
'**/*/*.tfvars',
'**/*/crash.log',
'**/*/*.tfplan',
'**/*/override.tf',
'**/*/override.tf.json',
'**/*/*_override.tf',
'**/*/*_override.tf.json',
'**/*/.terraform.lock.hcl',
],
outputFile: 'prompt.md',
})
Then:
pnpm tsx scripts/make-prompt
And there will be a prompt.md
file. Change the file path/name to
whatever in the code sample above.
Then copy/paste the file into ChatGPT or whatever, telling about your codebase.
Probably won't work for large repos, but for repos with a few dozen files, should work.
You can also add this to your package.json
:
{
"scripts": {
"make:prompt": "pnpm tsx scripts/make-prompt"
}
}
Then:
pnpm make:prompt
MIT
This is being developed by the folks at ClueSurf, a California-based project for helping humanity master information and computation. Find us on Twitter, LinkedIn, and Facebook. Check out our other GitHub projects as well!