Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/asmaelabid/project-readme-gen

This open-source npm package leverages AI to analyze your project structure and automatically generate a professional, detailed, and SEO-friendly README file. It simplifies documentation by creating sections for installation, usage, features, and more—all tailored to your project. Perfect for developers looking to enhance project visibility.
https://github.com/asmaelabid/project-readme-gen

ai-generated-readme automation developer-tools npm-package open-source openai project-documentation readme-builder readme-generator

Last synced: 22 days ago
JSON representation

This open-source npm package leverages AI to analyze your project structure and automatically generate a professional, detailed, and SEO-friendly README file. It simplifies documentation by creating sections for installation, usage, features, and more—all tailored to your project. Perfect for developers looking to enhance project visibility.

Awesome Lists containing this project

README

        

## Project: README Generator (project-readme-gen)

**Generate high-quality README files effortlessly using the power of AI.** `project-readme-gen` is a command-line tool that leverages Google's Generative AI and OpenAI's API to automatically create informative and well-structured README files for your projects. Save time and ensure your projects are well-documented with minimal effort.

## Key Features

* **AI-Powered Generation:** Utilizes both Google Generative AI and OpenAI to create comprehensive README content.
* **Automated Documentation:** Quickly generate README files, saving you valuable time and effort.
* **Customizable Output:** Tailor the generated README to your specific project needs. (Future Enhancement)
* **Easy to Use:** Simple command-line interface for seamless integration into your workflow.
* **Supports Multiple AI Providers:** Benefit from the strengths of both Google and OpenAI.

## Technologies Used

* **Google Generative AI (`@google/generative-ai`):** Provides powerful text generation capabilities.
* **OpenAI API (`openai`):** Leverages OpenAI's language models for content creation.
* **Commander (`commander`):** Handles command-line arguments and options.
* **Dotenv (`dotenv`):** Manages environment variables securely.
* **fs-extra (`fs-extra`):** Simplifies file system operations.
* **Glob (`glob`):** Enables file pattern matching for project analysis.
* **Node.js:** The runtime environment for this CLI tool.

## Installation

1. **Clone the repository:** `git clone https://github.com/asmaelabid/project-readme-gen.git`
2. **Navigate to the project directory:** `cd project-readme-gen`
3. **Install dependencies:** `npm install`
4. **Set up API keys:** Create a `.env` file in the root directory and add your Google Generative AI and OpenAI API keys:

GOOGLE_API_KEY=your_google_api_key
OPENAI_API_KEY=your_openai_api_key

## Usage

```bash
node index.js --help # Display available commands and options

# Example usage (assuming 'index.js' is your main script)
node index.js generate --output README.md # Generates a README.md file
```

## Code Example (Illustrative - Adapt to your actual implementation)

```javascript
// Example of using the OpenAI API within the project
const { Configuration, OpenAIApi } = require("openai");
const configuration = new Configuration({
apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);

async function generateReadmeContent(prompt) {
const response = await openai.createCompletion({
model: "text-davinci-003", // Or a suitable model
prompt: prompt,
max_tokens: 500, // Adjust as needed
});
return response.data.choices[0].text;
}

// ... rest of your code ...
```

[![Build Status](YOUR_BUILD_STATUS_BADGE_URL)](YOUR_BUILD_STATUS_LINK)
[![npm version](YOUR_NPM_VERSION_BADGE_URL)](YOUR_NPM_PACKAGE_LINK)
[![License: MIT](YOUR_LICENSE_BADGE_URL)](YOUR_LICENSE_LINK)

## Keywords

README, Generator, AI, Automation, Documentation, Google Generative AI, OpenAI, Command-line, CLI, Node.js, Software Development, Open Source.

```

```markdown
## Project README Generator

This project simplifies the process of creating professional and informative README files for your GitHub repositories. Leveraging the power of AI (Google Gemini and OpenAI), it automates the generation of key sections, saving you time and ensuring consistency across your projects.

## Key Features

* **AI-Powered Content Generation:** Automatically generates project descriptions, feature lists, and other sections using advanced language models.
* **Customizable Templates:** Tailor the generated README to your specific needs with customizable templates.
* **Support for Multiple AI Providers:** Choose between Google Gemini and OpenAI as your AI provider.
* **Easy Integration:** Seamlessly integrates into your existing workflow through a simple command-line interface.
* **Automated Dependency Detection:** Automatically identifies and lists project dependencies.

## Technologies Used

* **Node.js:** JavaScript runtime environment.
* **@google/generative-ai:** Google's Gemini AI API client.
* **OpenAI API:** OpenAI's language model API client.
* **Commander:** Node.js command-line interface framework.
* **dotenv:** Loads environment variables from a .env file.
* **fs-extra:** Enhanced file system module for Node.js.
* **glob:** File path pattern matching library.

## Installation and Usage

1. **Clone the repository:** `git clone https://github.com/your-username/project-readme-gen.git`
2. **Install dependencies:** `npm install`
3. **Set up API keys:** Create a `.env` file in the root directory and add your Google Gemini and OpenAI API keys:

```
GOOGLE_API_KEY=your_google_api_key
OPENAI_API_KEY=your_openai_api_key
```

4. **Run the CLI:** `npx project-readme-gen --help` to see available options. A typical command might look like:

```bash
npx project-readme-gen --provider openai --output README.md
```

Replace `openai` with `gemini` if using Google's Gemini.

## Code Example (Using the CLI)

```bash
npx project-readme-gen --provider openai --output README.md --projectName "My Awesome Project" --description "A brief description of my project."
```

This command generates a README.md file using OpenAI, sets the project name to "My Awesome Project", and includes the provided description. Explore other command-line options for more customization.

[![npm version](https://badge.fury.io/js/project-readme-gen.svg)](https://badge.fury.io/js/project-readme-gen) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

```

This example incorporates several best practices for README files:

* **Clear headings:** Makes it easy to scan and find relevant information.
* **Concise descriptions:** Keeps the reader engaged without overwhelming them.
* **Bullet points:** Highlights key features effectively.
* **Code examples:** Shows how to use the project.
* **Badges:** Provides quick visual information about the project.
* **Keywords:** Uses relevant keywords (e.g., "README generator," "AI-powered," "OpenAI," "Google Gemini") to improve searchability.
* **Well-structured:** Organizes information logically for easy readability. Remember to replace placeholders like `your-username`, API keys, and build status URLs with your actual values. Also, adapt the code examples and installation instructions to your specific project setup.

```markdown
## Project README Generator

This project simplifies the process of creating professional and informative README files for your GitHub repositories. It leverages the power of AI (Google's Generative AI and OpenAI) to generate compelling project descriptions and includes functionalities to automatically populate sections with project details, such as dependencies and installation instructions. Save time and ensure your projects are well-documented with this easy-to-use tool.

## Key Features

* **AI-Powered Project Descriptions:** Generate concise and engaging project descriptions using Google's Generative AI and OpenAI.
* **Automatic Dependency Population:** Automatically lists project dependencies from your `package.json` or `package-lock.json` file.
* **Customizable Templates:** Tailor the README structure and content to your specific needs. (Future Feature)
* **Installation and Usage Instructions Generation:** Easily add clear instructions for users to get started with your project.
* **Support for Multiple Programming Languages:** Designed to work with various project types. (Future Feature)

## Technologies Used

* **Node.js:** The core runtime environment.
* **@google/generative-ai:** Google's Generative AI library for text generation.
* **OpenAI:** OpenAI's API for accessing powerful language models.
* **Commander:** For handling command-line arguments.
* **dotenv:** For managing environment variables.
* **fs-extra:** For file system operations.
* **glob:** For file pattern matching.

## Installation and Usage

1. **Clone the Repository:**
```bash
git clone
```

2. **Install Dependencies:**
```bash
cd
npm install
```

3. **Set Up API Keys:**
Create a `.env` file in the project's root directory and add your OpenAI and Google Generative AI API keys:

```
OPENAI_API_KEY=
GOOGLE_API_KEY=
```

4. **Run the Generator:**
```bash
node
```
(Replace `` with the name of your main script file and `` with any command-line options your script accepts.)

## Example Usage (Illustrative)

```bash
node generate-readme.js --project-path ./my-project
```

This command would generate a README file for the project located in the `./my-project` directory.

[![Build Status](link-to-build-badge)](link-to-build-status)
[![npm version](https://img.shields.io/npm/v/project-readme-gen.svg?style=flat-square)](https://www.npmjs.com/package/project-readme-gen) *(Placeholder - Replace with your package name after publishing)*
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) *(Example - Replace with your chosen license)*

```

This enhanced README provides a more comprehensive overview of your project, making it easier for others to understand its purpose, features, and how to use it. Remember to replace placeholder information with your actual project details. Adding a license badge is highly recommended; choose the license that best suits your project's needs. The npm version badge is a placeholder and assumes you will publish your package — adjust if not applicable. The build status badge requires setting up a CI/CD pipeline.

```markdown
## Gemini Code Analyzer

This project leverages the power of Google's Gemini AI to analyze your codebase and provide insights. It scans your project files, identifies potential issues, and offers suggestions for improvement, helping you write cleaner, more efficient code.

## Key Features

* **Automated Code Analysis:** Quickly analyzes your JavaScript projects using the Gemini-1.5-Pro model.
* **Identifies Potential Issues:** (Placeholder - Replace with specific issues the analyzer targets, e.g., unused variables, inefficient algorithms, code style violations)
* **Provides Improvement Suggestions:** (Placeholder - Elaborate on the types of suggestions provided, e.g., refactoring opportunities, performance optimizations)
* **Easy Integration:** Simple setup and usage within your development workflow.
* **Customizable:** (Optional - If applicable, mention any customization options, e.g., configuration files, ignore patterns)

## Technologies Used

* **Node.js:** JavaScript runtime environment.
* **Google Gemini AI:** Advanced language model for code analysis.
* **fs-extra:** Enhanced file system library.
* **glob:** File pattern matching.
* **dotenv:** Environment variable management.

## Installation

1. Clone the repository: `git clone `
2. Install dependencies: `npm install`
3. Set up your Gemini API key: Create a `.env` file in the project root and add `GEMINI_API_KEY=`

## Usage

1. Navigate to the project directory: `cd `
2. Run the analyzer: `node src/index.js ` (Replace `` with the path to the project you want to analyze)

## Code Example

```javascript
const analyzeProject = (projectPath) => {
const files = glob.sync("**/*.js", { cwd: projectPath, ignore: ["node_modules/**"] }); // Example of using glob to find js files
// ... (Rest of your code to analyze the files using the Gemini API)
};
```

## Badges

[![Build Status](https://img.shields.io/badge/build-passing-brightgreen)](Replace with actual build status link)
[![npm version](https://img.shields.io/npm/v/your-package-name.svg)](Replace with your package name or link)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

```

This enhanced README section provides a more comprehensive overview of the project and its functionalities. Remember to replace the placeholders with actual details specific to your code analyzer's capabilities. Also, ensure the badges link to the correct resources and that "your-package-name" is updated if you publish the project as an npm package. This structure and detail will help potential users and contributors understand your project better.