@bagustri3/aire
v1.0.9
Published
CLI tool for reviewing code and generating docs using Gemini 2.5
Readme
🧠 @bagustri3/aire
AI-powered CLI for reviewing source code and generating documentation using Gemini 2.5
aire helps developers instantly review code and generate technical documentation through a simple command-line interface.
It integrates with Gemini 2.5, providing smart code insights and clean, structured documentation output.
📦 Installation
npm install -g @bagustri3/aire⚙️ Usage
1. Review Code
Review one or more source files using a glob-like pattern.
aire --review "src/*.js"What it does:
- Reads each matching file in the folder.
- Sends it to Gemini 2.5 for detailed review.
- Saves the output as
aire-<filename>-review.mdbeside each file.
Example output:
📄 Review saved to src/aire-app.js-review.md2. Generate Documentation
Generate structured documentation for all supported files in a folder.
aire --doc ./srcWhat it does:
- Scans the folder for
.js,.ts,.tsx,.html,.java,.prisma,.py,.phpfiles. - Sends each to Gemini 2.5 for documentation generation.
- Saves the output as
aire-<filename>-docs.md.
Example output:
📄 Documentation saved to src/aire-userService.ts-docs.md🧩 Supported File Types
| Language | Extensions |
|-----------|-------------|
| JavaScript | .js, .jsx |
| TypeScript | .ts, .tsx |
| Python | .py |
| PHP | .php |
| HTML | .html |
| Java | .java |
| Prisma | .prisma |
🪄 Example Scenarios
Code Review
aire --review "backend/*.ts"→ Creates detailed feedback on logic, style, and maintainability.
Documentation
aire --doc ./components→ Generates readable markdown docs for each component.
⚡ Dependencies
- commander — CLI framework
- chalk — Colored console output
- ora — Loading spinners
- fs — File handling
- path — File path utilities
- askGemini — Custom Gemini 2.5 API integration
🧠 Example Output Files
src/
├── app.js
├── aire-app.js-review.md
├── aire-app.js-docs.md🚀 Development
Clone the repository and run locally:
git clone https://github.com/bagustri3/aire.git
cd aire
npm install
npm linkNow you can use aire globally on your system for testing.
📜 License
MIT © 2025 Bagus Tri
“Code tells you how. Comments tell you why. Documentation tells others everything.”
