Thanks for your interest in contributing! Here's how to get started.
git clone https://github.com/nedcodes-ok/rule-gen.git
cd rule-gen
export GEMINI_API_KEY=your-key # free at aistudio.google.com/apikey
node bin/rule-gen.js ./some-project --dry-runNo build step. No dependencies to install. The project runs on Node.js built-in modules only.
- Fork the repo
- Create a branch (
git checkout -b my-fix) - Make your changes
- Test manually with
--dry-runon a real project - Submit a PR
- Bug fixes
- Better project detection (Python, Go, Rust, etc.)
- Scanner improvements (smarter file selection)
- Prompt improvements (better rule quality)
- Documentation improvements
Check the issues labeled good first issue for beginner-friendly tasks.
- Zero external dependencies — use Node.js built-ins only
- Five modules:
scanner.js,budgeter.js,gemini.js,writer.js,cli.js - Use Gemini structured output (
responseSchema) for all API calls - Error messages follow the pattern:
Error: <what failed>. <suggestion>
bin/rule-gen.js → entry point
src/cli.js → argument parsing, orchestration
src/scanner.js → walks project tree, respects .gitignore
src/budgeter.js → selects files to fit context window
src/gemini.js → prompt + Gemini API + structured output parsing
src/writer.js → outputs rules in chosen format
Open an issue with:
- What you expected
- What happened
- The project you scanned (or a description of it)
- Your Node.js version (
node -v)
Open an issue — happy to help.