@sidhxntt/readme-wizard
v1.0.3
Published
[](https://nodejs.org/) [](https://opensource.org/licenses/MIT) [
Installation
Install globally via npm:
npm install -g readme-wizardOr run directly with npx:
npx readme-wizard generateConfiguration
Set your Anthropic API key as an environment variable:
export ANTHROPIC_API_KEY=your-api-key-hereUsage
Generate README for current directory
readme-wizard generateGenerate for specific directory
readme-wizard gen /path/to/projectPreview without writing file
readme-wizard generate --dry-runCustom output location
readme-wizard generate -o DOCUMENTATION.mdScan only (see what would be sent to AI)
readme-wizard scanCLI Reference
generate [dir] (alias: gen)
Generate a README by scanning the project and sending context to Claude AI.
Options:
-o, --output <file>- Output file path (default:README.md)-m, --model <model>- Claude model to use (default:claude-sonnet-4-20250514)--max-files <n>- Maximum files to include in context (default:80)--max-lines <n>- Maximum lines per file to read (default:150)--no-tree- Skip project tree generation--dry-run- Print README to stdout instead of writing file--overwrite- Overwrite existing README without prompting
scan [dir]
Scan project and show what would be sent to the LLM without generating README.
Options:
--max-files <n>- Maximum files to include (default:80)--max-lines <n>- Maximum lines per file (default:150)
Project Structure
Readme_generator_llm/
├── docs/
│ └── index.html # Project documentation page
├── src/
│ ├── index.js # CLI entry point and command definitions
│ ├── scanner.js # Codebase scanning and file analysis
│ └── generator.js # Claude AI integration and README generation
└── package.json # NPM package configurationKey Files
src/index.js- Main CLI application using Commander.js with colorful output via Chalk and Orasrc/scanner.js- Core scanning logic that builds project trees, respects gitignore, and categorizes files by prioritysrc/generator.js- Handles Anthropic API integration and prompt construction for Claude AIdocs/index.html- Landing page with installation and usage instructions
How It Works
Scan Phase - Recursively walks project directory, filtering files based on:
- Gitignore patterns + built-in exclusions (node_modules, build artifacts, etc.)
- File extension allowlist (source code, configs, documentation)
- Priority patterns (package.json, Dockerfile, etc. get full content)
Context Building - Creates structured prompt with:
- Project name (from directory or package.json)
- Complete file listing
- Directory tree visualization
- Key file contents (truncated if needed)
AI Generation - Sends context to Claude AI with specific instructions to:
- Detect project type and purpose
- Generate appropriate sections (installation, usage, etc.)
- Use real code examples from the scanned files
- Output clean Markdown without placeholders
Contributing
- Clone the repository
- Install dependencies:
npm install - Run in development mode:
npm run dev - Make your changes and test with real projects
- Submit a pull request
The codebase uses ES modules and modern Node.js features. Key dependencies:
@anthropic-ai/sdk- Claude AI integrationcommander- CLI frameworkchalk&ora- Terminal styling and spinnersglob&ignore- File system operations
