UNPKG

@jayanithu/readmi

Version:

Modern README generator powered by AI

258 lines (174 loc) โ€ข 5.71 kB
# ๐Ÿ“ 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)