@jayanithu/readmi
Version:
Modern README generator powered by AI
258 lines (174 loc) โข 5.71 kB
Markdown
# ๐ ReadMI
Modern AI-powered README generator that analyzes your codebase and creates professional documentation automatically.
## โจ Features
- ๐ **Smart Codebase Analysis** - Automatically analyzes your project structure and source code
- ๐ค **AI-Powered Generation** - Uses Google Gemini AI to generate comprehensive README files
- ๐ **Multi-Language Support** - Generate READMEs in 10+ languages
- ๐ฏ **Project-Aware** - Extracts actual features and functionality from your code
- โจ **Modern & Clean** - Generates well-formatted, professional documentation
- โก **Zero Configuration** - Works out of the box with minimal setup
## ๐ฆ Installation
### ๐ ๏ธ Prerequisites
Before you begin, ensure you have:
- Node.js (v14 or higher)
- npm or yarn
- Google AI API Key ([Get one here](https://makersuite.google.com/app/apikey))
### โก Quick Start
**1. Install ReadMI globally:**
```bash
npm install -g @jayanithu/readmi
```
**2. Verify installation:**
```bash
readmi -v
```
You should see the version number displayed.
## ๐ Getting Your Google AI API Key
1. **Visit Google AI Studio:**
- Go to [https://makersuite.google.com/app/apikey](https://makersuite.google.com/app/apikey)
2. **Sign in:**
- Use your Google account to sign in
3. **Create API Key:**
- Click "Create API Key"
- Select or create a Google Cloud project
- Copy your API key
4. **Save your API Key:**
- When you first run `readmi`, you'll be prompted to enter your API key
- Choose to save it for future use
> โ ๏ธ **Important:** Keep your API key secure and never commit it to version control.
## ๐ Usage
### ๐ Generate README
Navigate to your project directory and run:
```bash
readmi
```
> ๐ก **Pro Tip:** You can double-check your README at https://readmi.jayanithu.dev/editor
### ๐ Select Language
Generate README in a specific language:
```bash
readmi --select-language
```
Or use the short form:
```bash
readmi -sl
```
### ๐ Update Existing README
Smart update mode for maintaining your README:
```bash
readmi -u
```
Or use the long form:
```bash
readmi --update-readme
```
This will:
- Detect outdated information (version mismatches, missing scripts, etc.)
- Let you choose what to update (full update, selective sections, or version only)
- Preserve custom sections you've added
- Show a diff summary of changes
## โ๏ธ Configuration
### View Configuration
```bash
readmi config
```
### Set Preferred Language
```bash
readmi config -l
```
### Select Preferred Model
```bash
readmi config model
```
### Remove Saved API Key
```bash
readmi config -r
```
### Remove Preferred Model
```bash
readmi config -rm
```
### Remove Preferred Language
```bash
readmi config -rl
```
## ๐ Commands Reference
### Main Commands
| Command | Description |
|---------|-------------|
| `readmi` | Generate README for current project |
| `readmi -u` | Update existing README (smart mode) |
| `readmi config` | Manage configuration |
### Options
| Option | Description |
|--------|-------------|
| `-v, --version` | Display version number |
| `-h, --help` | Show help information |
| `--update` | Update to latest version |
| `-u, --update-readme` | Smart README update mode |
| `-sl, --select-language` | Select README language |
### Configuration Commands
| Command | Description |
|---------|-------------|
| `readmi config -r` | Remove saved API key |
| `readmi config -rm` | Remove preferred model |
| `readmi config -rl` | Remove preferred language |
| `readmi config -l` | Set preferred language |
| `readmi config model` | Select preferred AI model |
## ๐ Supported Languages
ReadMI supports generating READMEs in the following languages:
โข English (en)
โข Spanish (es)
โข French (fr)
โข German (de)
โข Chinese (zh)
โข Japanese (ja)
โข Portuguese (pt)
โข Russian (ru)
โข Hindi (hi)
โข Arabic (ar)
## โ๏ธ How It Works
### 1. Project Analysis ๐
- Scans your project directory
- Reads package.json and configuration files
- Analyzes source code structure
- Detects dependencies and technologies
### 2. Code Understanding ๐ป
- Reads key source files
- Extracts features and functionality
- Identifies project type (CLI, library, web app, etc.)
- Detects environment variables and configuration
### 3. AI Generation ๐ค
- Uses Google Gemini AI models
- Generates comprehensive documentation
- Includes relevant sections based on project type
- Formats with proper markdown syntax
### 4. Post-Processing ๐งน
- Cleans and formats the output
- Ensures proper code block formatting
- Adds project-specific badges
- Creates professional presentation
## ๐ ๏ธ Troubleshooting
### ๐ API Key Issues
If you encounter API key errors:
- Verify your API key is correct
- Check if the API key is saved: `readmi config`
- Remove and re-enter: `readmi config -r`
- Ensure you have internet connection
### โ Model Not Available
If a model is not available:
- ReadMI will automatically try the next available model
- Select a different model: `readmi config model`
- Ensure your API key has access to Gemini models
## ๐ค Contributing
Contributions are welcome! Feel free to:
โข Report bugs
โข Suggest new features
โข Submit pull requests
โข Improve documentation
Visit our [GitHub repository](https://github.com/jayanithu/readmi) to contribute.
## ๐ License
MIT License - see [LICENSE](LICENSE) file for details
## ๐ Support
โข **GitHub Issues:** [Report issues](https://github.com/jayanithu/readmi/issues)
โข **ReadMI Landing Page:** [readmi.jayanithu.dev](https://readmi.jayanithu.dev/)
โข **Author:** [jayanithu](https://github.com/Jayanithu)