rdme.sh
v1.0.1
Published
Generate perfect READMEs from your terminal
Maintainers
Readme
(Example created using rdme)
rdme
Generate perfect READMEs from your terminal using AI.
Table of Contents
Overview
rdme is an innovative command-line interface (CLI) tool designed to streamline and automate the creation of high-quality README.md files for your software projects. Leveraging the power of artificial intelligence, specifically Google Gemini, rdme intelligently scans a given project's structure, identifies its core technologies, dependencies, and purpose, and then generates a comprehensive, well-structured, and contextually relevant README. Its primary goal is to save developers time and ensure consistent, professional documentation for their open-source projects and internal tools, without manual effort.
Key Features
- AI-Powered Generation: Utilizes Google Gemini to deeply understand project context and craft highly relevant and informative documentation.
- Intelligent Project Analysis: Automatically detects programming languages (JavaScript, TypeScript, Python, Rust, Go, PHP), frameworks (Next.js, React, Vue.js, Express, NestJS, Fastify), dependencies, and common project files (e.g.,
package.json,docker-compose.yml,.env.example). - Configurable Output: Offers granular control over the generated README's structure and content through a
.rdmerc.jsonconfiguration file, allowing users to specify desired sections, badges, and a table of contents. rdme initCommand: Provides a convenient way to initialize a default.rdmerc.jsonconfiguration file in any project.rdme updateCommand: Enables effortless regeneration and updating of an existing README, ensuring it stays current with project changes or configuration modifications.rdme watchCommand: A planned future feature that will automatically regenerate the README in response to file system changes (currently a placeholder).- CLI Integration: A straightforward and efficient command-line interface for quick README generation and management.
Setup & Installation
Prerequisites
- Node.js: Version
16.0.0or higher. - Google Gemini API Key:
rdmerequires access to the Google Gemini API to perform its AI-powered analysis and generation.
Installation
You can install rdme globally using npm or yarn, making it accessible from any directory:
npm install -g rdme
# OR
yarn global add rdmeAlternatively, you can use npx to run it without a global installation:
npx rdmeConfiguration (API Key)
rdme requires a GEMINI_API_KEY to access the AI generation capabilities.
Obtain a Google Gemini API Key: Visit the Google AI Studio to generate your API key.
Set the API Key:
rdmelooks for theGEMINI_API_KEYenvironment variable. You can set it in two primary ways:- Using a
.envfile (recommended for projects): Create a file named.envin your project's root directory (where you runrdme) and add your key:GEMINI_API_KEY="YOUR_GEMINI_API_KEY_HERE" - Setting it in your shell (temporary):
For a single session or temporary use:
export GEMINI_API_KEY="YOUR_GEMINI_API_KEY_HERE"
- Using a
Usage
Generate a new README
Navigate to your project's root directory and simply run:
rdmeThis command will scan your project and generate a README.md file in the current directory.
Generate to a specific output path
If you want the README to be saved elsewhere (e.g., docs/PROJECT_README.md), use the --output option:
rdme --output docs/PROJECT_README.mdInitialize a configuration file
To customize the sections, badges, and table of contents in your generated README, create a .rdmerc.json file:
rdme initThis command will create a .rdmerc.json in your project root with default settings. You can then edit this file to suit your preferences.
Example .rdmerc.json:
{
"sections": [
"description",
"features",
"installation",
"usage",
"api",
"contributing",
"license"
],
"badges": true,
"toc": true
}Update an existing README
If you've made changes to your project, or updated your .rdmerc.json configuration, you can regenerate and update the README:
rdme updateNote: This command will overwrite the existing README.md.
Watch for changes (Coming Soon)
A future feature will allow rdme to automatically regenerate your README when it detects changes in your project files:
rdme watchAPI (rdme config file)
The .rdmerc.json file allows you to customize rdme's behavior. Place this file in your project's root directory.
| Property | Type | Description | Default Value (if not specified) |
| :---------- | :-------- | :---------------------------------------------------------- | :------------------------------- |
| sections | Array<string> | An array of strings defining the order and inclusion of README sections. Supported sections include: description, features, installation, usage, api, contributing, license. | All standard sections (as defined by rdme init) |
| badges | boolean | Set to true to include standard project badges (e.g., npm version, license). | true |
| toc | boolean | Set to true to include a Table of Contents at the beginning of the README. | true |
Example:
{
"sections": [
"description",
"features",
"installation",
"usage",
"contributing",
"license"
],
"badges": true,
"toc": false
}Contributing
We welcome contributions to rdme! If you're interested in improving this tool, please consider:
- Forking the repository.
- Cloning your fork:
git clone https://github.com/yourusername/rdme.git - Installing dependencies:
npm install - Creating a new branch:
git checkout -b feature/your-feature-name - Making your changes and committing them.
- Pushing to your fork:
git push origin feature/your-feature-name - Opening a Pull Request with a clear description of your changes.
Before submitting, please ensure your code adheres to the project's style and passes any existing tests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
