gimme_readme is a command-line tool powered by AI that generates a comprehensive README.md file for your project. It analyzes multiple source code files at once, providing concise explanations of each file's purpose, functionality, and key components, all in a single, easy-to-read document.
MIT License
gimme_readme
is a command-line tool powered by AI that generates a comprehensive README.md
file for your project. It analyzes multiple source code files at once, providing concise explanations of each file's purpose, functionality, and key components, all in a single, easy-to-read document.
See our 0.1 Release Demo!
To get started with gimme_readme
, follow these steps:
Install the latest version of Node.js for your operating system.
Run the following command to install gimme_readme
globally:
npm i -g gimme_readme
NOTE: MAC/LINUX users may need to run sudo npm i -g gimme_readme
Generate a configuration file by running in any folder you'd like:
gr-ai -c
This command creates a .gimme_readme_config
file in your home directory. Do not move this file from this location.
Open the .gimme_readme_config
file and add your API keys and preferred default values as prompted. Ensure you leave the variable names unchanged.
gr-ai -c
will display the path to your existing config file..gimme_readme_config
file looks like!gimme_readme
uses AI to generate a README.md
file that explains a given source code file or files. Below are the available options:
Option | Description |
---|---|
-v , --version
|
Output the current version |
-f , --file [files...]
|
Specify one or more files to generate explanations for |
-o , --outputFile <string>
|
Specify the file to output the generated README to |
-m , --model <string>
|
Choose a free-tier AI model to use (e.g., gemini, openai, grok) |
-p , --prompt <string>
|
Provide a custom prompt to the AI |
-c , --config
|
Show the location of the configuration file and provide links to examples |
-t , --temperature <number>
|
Set the level of determinism for the AI (value between 0 and 1) |
-tkn , --token
|
get information on the tokens consumed (i.e., prompt, completion, & total tokens) |
-h , --help
|
Display help for the command |
Below are some simple examples to help you get started with gimme_readme
. For more detailed examples,
see here.
To display the help menu with all available commands:
gr-ai -h
To show the current version of gimme_readme
:
gr-ai -v
To generate a README.md
file for one or more source files:
gr-ai -f example.js anotherFile.py -o README.md -m gemini-1.5-flash
gr-ai -f example.js anotherFile.py -o README.md -m gemini-1.5-flash -tkn
gr-ai -f example.js anotherFile.py -o README.md -m llama3-8b-8192 --token
Provider | Models |
---|---|
gemini |
gemini-1.5-flash |
groq |
llama3-8b-8192 |
We welcome contributions to improve gimme_readme
! To contribute, please follow these steps:
gimme_readme
, please read section 6. Testing Locally
When making a pull request, please ensure that your changes are well-documented and adhere to the coding standards of the project.
If you are trying to contribute to the gimme_readme
repository, please follow the following steps in sequence to test your changes locally:
Ensure you have Node.js installed
Fork this repository, and clone your forked repository.
On your machine, after cloning your forked repository, navigate to the root of the cloned repository and run the following:
# Remove the pre-existing, global installation of the gimme-readme repository.
npm uninstall -g gimme_readme
# Install the necessary node_modules
npm i
# Simulate the environment as if gimme-readme was installed globally via `npm i -g gimme_readme`
# You can now use the `gr-ai` executable, and changes to your source code should be reflected when you make changes to the repo
# If your changes aren't reflected after changing the source code, repeat the commands above in sequence.
npm link
After adding any new code, please try to have a test
case made for this code as well.
When you're ready to make a commit, this repository has been set-up to run a pre-commit hook that runs the following:
# To spot any code issues
npm run lint
# To spot any formatting issues
npm run format
# To see if any of the existing tests are broken/need to be updated based on your update
npm run test
This pre-commit hook aims to ensure that your commit passes the continuous integration tests.
Developed by Peter Wan.
For any questions or feedback, feel free to reach out through the GitHub repository.