Skip to content

Automatically generate documentation for Python scripts.

License

Notifications You must be signed in to change notification settings

amir-abdi/docgpt

Repository files navigation

Timeline of Events: https://irantimelines.com/
Read wiki: https://en.wikipedia.org/wiki/Mahsa_Amini_protests
Or watch YouTube: https://www.youtube.com/watch?v=wZpkmUx4RFc

But, please don't scroll passed this.
Innocent lives need your voice.

Start by following #MahsaAmini on Twitter.

DocGPT

DocGPT (docgpt) is a CLI tool that automatically generates documentation for code.

👉 All the in-code documentation of docgpt project are generated with docgpt! So meta! :point_left:

Installation

pip install docgpt

API Key

DocGPT depends on the GPT3 model, hence the name, trained and served by OpenAI.
Register for an account and get your API key here: https://openai.com/api/
Check OpenAI's Pricing and use it responsibly (roughly speaking, auto-documenting 4 pages of code with docgpt costs $0.05 USD).

Set the OPENAI_API_KEY environment variable, or specify via --api_key flag. The key will get cached in ~/.docgpt for future use.

Usage

# conventional use
docgpt <source> --target <target>

# piped
cat <source> | docgpt --target <target>

# overwrite
docgpt <source> --overwrite

To see available options try docgpt --help

Contributing

DocGPT is GNU GPL licensed and we intend to keep it purely open-source. We welcome contributions to docgpt. Your forks and pull-requests are always welcome.

To open a feature request or report a bug, please open an issue here.

Cause

DocGPT is open-sourced as part of the global action in solidarity with Iranians who are courageously demonstrating peacefully for their human rights.

About

Automatically generate documentation for Python scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published