1.0.19 • Published 11 months ago
generate-code-context v1.0.19
Generate Code Context of your Project
This npm package reads all files in a directory (excluding specified ones) and writes their contents to a .txt
file.
Installation
npm i generate-code-context
Usuage
Create a file named generate.js in your project directory.
Add the following code to generate.js:
const { run } = require('generate-code-context');
const path = require('path');
const startDir = __dirname; // Root directory
const excludeDirs = ['node_modules', 'dist', 'build'];
const excludeFiles = ['package.json', 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml'];
const outputFilePath = path.join(__dirname, 'code_context.txt'); // Save in root directory
run(startDir, excludeDirs, excludeFiles, outputFilePath);
Get Gemini API Key from https://aistudio.google.com and paste it in .env file
API_KEY=your_google_api_key_here
RUN
node generate.js
1.0.19
11 months ago
1.0.18
11 months ago
1.0.17
11 months ago
1.0.16
11 months ago
1.0.15
11 months ago
1.0.14
11 months ago
1.0.13
12 months ago
1.0.12
12 months ago
1.0.11
12 months ago
1.0.10
12 months ago
1.0.9
12 months ago
1.0.8
12 months ago
1.0.7
12 months ago
1.0.6
12 months ago
1.0.5
12 months ago
1.0.4
12 months ago
1.0.3
12 months ago
1.0.2
12 months ago
1.0.1
12 months ago