aygaoua-readme-generator
v1.8.1
Published
A smart CLI tool that generates professional README.md files by auto-detecting project info from package.json and git config.
Maintainers
Readme
aygaoua-readme-generator
A smart CLI tool that generates professional README.md files by auto-detecting project info from package.json and git config — so you answer fewer questions.
✨ What's New in v1.8.0
- 🔒 Supply Chain Security — Added dependency review workflow, OpenSSF Scorecard, and socket.yml configuration.
- 📋 Code of Conduct — Adopted Contributor Covenant v2.1 for community standards.
- 🔧 Dependabot Fixes — Properly configured Dependabot for npm and GitHub Actions ecosystems.
- 📝 Complete Changelog — Full version history from v1.0.0 to v1.8.0.
Features
- Auto-detection — Reads your
package.jsonand git config to pre-fill project name, license, GitHub username, email, install & test commands. - 3 README templates — Minimal (clean & concise), Standard (balanced), Detailed (full-featured with Features, Roadmap, Acknowledgments).
- Emoji section headers — Optionally prefix headings with thematic emoji (🚀 Installation, 📜 License, etc.).
- Inline preview — Previews the generated markdown directly in the terminal before writing to disk.
- Input validation & Overwrite protection — Validates required fields/emails and warns before replacing existing files.
- Custom output filename — Choose any
.mdfilename you want. - License badges — Automatically adds a Shields.io badge matching your project license.
- Dynamic sections — Skips sections like Tests if no command is detected.
- Interactive CLI UI — Powered by Inquirer for a polished terminal experience.
Installation
npm install -g aygaoua-readme-generatorOr use it directly with npx:
npx aygaoua-readme-generatorRequirements
- Node.js >= 18.0.0
- npm >= 8.0.0
Usage
Navigate to your project directory and run:
readme-genThe tool will:
- Auto-detect your project name, description, license, GitHub username, email, and test commands from
package.jsonand.git/config. - Prompt you only for information it couldn't detect.
- Generate a polished
README.mdwith proper formatting, badges, and table of contents.
CLI Options
| Flag | Description |
|------|-------------|
| -v, --version | Show version number |
| -h, --help | Show help message |
Example Output
The generated README includes:
- License badge from Shields.io
- Table of Contents with anchor links
- Description, Installation, Usage sections
- Contributing guidelines and Questions with your contact info
- Tests section (only if a test command is detected)
Supported Licenses
| License | Badge Color | |---------|-------------| | MIT | Yellow | | Apache-2.0 | Blue | | GPL-3.0 | Red | | BSD-3-Clause | Orange | | None | No badge |
Development
Setup
git clone https://github.com/aygaoua/readme-generator.git
cd readme-generator
npm installTesting
npm testRuns 19 unit tests using Node.js built-in test runner covering:
- Markdown generation and section rendering
- Prompt logic and auto-detection skipping
- Input validation (email format, filename)
- JSON parsing and error handling
Linting
npm run lintUses ESLint with strict rules for code quality.
Security
This project takes security seriously:
- Provenance — All npm releases include provenance attestations via OIDC Trusted Publishing
- CodeQL — Automated vulnerability scanning on every push and PR
- Dependency Review — PRs are scanned for risky dependency changes
- OpenSSF Scorecard — Continuous security scoring and assessment
- Socket.dev — Real-time supply chain security monitoring
For vulnerability reports, see SECURITY.md.
Contributing
Contributions are welcome! Please read our Contributing Guide and Code of Conduct before getting started.
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Run tests:
npm test - Submit a Pull Request
Changelog
See CHANGELOG.md for a complete list of changes across all versions.
License
This project is licensed under the MIT license — see the LICENSE file for details.
