Skip to content

Latest commit

 

History

History
34 lines (31 loc) · 1.25 KB

File metadata and controls

34 lines (31 loc) · 1.25 KB

🤓 DocNerd

An AI docstring generator because I find writing docstrings a big bore. Now has support for Python, Rust, C & it's header files, C++ & it's header files, JavaScript, TypeScript & Java.

Installation

  1. CLone the repository and create a .env file
git clone https://github.com/AalbatrossGuy/DocNerd.git
cd DocNerd
touch .env
  1. Set GROQ_API_KEY=<api-key> in .env or export GROQ_API_KEY=<api-key>

Instructions

  1. Make sure the file is structured like this:
# DOCSTRING START
def func(a, b):
    <do-something>
# DOCSTRING END
  1. If the file is called python_file.py, then do
python3 docnerd.py python_file.py

If you want to rewrite existing docstrings, do

python3 docnerd.py python_file.py --replace-existing-docstring
  1. For knowing what other parameters are there, do python3 docnerd.py --help.

Screenshots

image
image
image