Say goodbye to writer's block when creating README files! This command-line tool harnesses the power of Google Gemini to automatically generate comprehensive and informative README.md files for your coding projects.
-
Clone the Repository:
git clone https://github.com/your-username/README-Maker.git cd README-Maker -
Install Dependencies:
pip install -r requirements.txt
-
Set your Google API Key:
-
Create a
.envfile in the root directory of the project. -
Add your Google API key to the
.envfile:GOOGLE_API_KEY="YOUR_API_KEY_HERE"
-
Customize the analysis by excluding specific files and directories. Edit these CSV files in the project's root directory:
- ignored_dir.csv: List directories to ignore (e.g., "tests", "docs", "pycache").
- ignored_exts.csv: List file extensions to ignore (e.g., ".txt", ".log", ".csv").
- ignored_files.csv: List specific file names to ignore (without extensions, e.g., "LICENSE", "mnvw").
-
Navigate to the Project Directory:
cd README-Maker -
Using the CLI: Execute the following commands from your terminal within the project directory:
python main.py --local <local_directory_path> python main.py --git <repository_url> --root <clone_at_local_directory> python main.py -h
--local <local_directory_path>:
Analyze a local project directory (replace<local_directory_path>with the actual path).

--git <repository_url> --root <clone_directory>:
Clone a Git repository and analyze it.

- Use
--rootto specify the local directory where the repository will be cloned.
- Use
-h: Display help information.
-
Providing a Project Description:
- The tool will prompt you to enter a brief description of your project, which aids in generating a contextually relevant README.
- The tool will prompt you to enter a brief description of your project, which aids in generating a contextually relevant README.
e2e.mp4
- Review and Feedback:
- The generated README.md will be saved as for example READMEv1.md in your root directory. Review the content and request revisions if needed.
- The generated README.md will be saved as for example READMEv1.md in your root directory. Review the content and request revisions if needed.
itred.mp4
- README Generation:
- The final README.md file will be created in the root directory of the project, overwriting any existing README.md file.
Here’s a comparison showing the README before and after using the README-Maker tool:
graph LR
A[Choose: Local Repo or Git Clone] --> B{Iterate Through Directories}
B --> C{Generate File Summaries}
C --> D{Combine File Summaries into Directory Summaries}
D --> E{Generate Initial README Draft}
E --> F{User Review and Feedback}
F --> E
F --> G{Save Final README.md}
- Source Selection: Choose to analyze either a local directory or a Git repository. The tool clones Git repositories to your machine before analysis.
- Directory Traversal: README-Maker recursively explores your project directory structure, identifying code files while respecting your configured exclusions.
- File Summary Generation: Each code file is analyzed using Google's Gemini 1.5 Pro model, which generates a concise summary of its contents and purpose.
- Directory Summary Aggregation: File summaries within a directory are combined into a comprehensive directory-level summary, providing a higher-level overview of the code organization.
- README Draft Generation: The tool leverages the directory summaries and your provided project description to generate an initial draft of your README.md file.
- User Feedback and Iteration: You have the opportunity to review the generated README and provide feedback. The model uses your input to refine the README until you're satisfied.
- Final README Generation: Once you're happy with the content, the final README.md file is saved in your project directory, ready to enhance your project's documentation.
External Libraries:
argparseostimepandastqdmsysgoogle.generativeaidotenvthreading
Internal Modules:
spinnerredme_modelcode_reader_modeldir_sticher_modelutils
This project is licensed under the MIT License - see the LICENSE file for details.

