Skip to main content

A simple CLI tool to generate documentation for your Python projects automatically.

Project description

aidoc

aidoc is a command line interface (CLI) tool that uses AI to automatically generate documentation for your code.

PyPI

Requirements

Installation

  • standalone
python3 -m pip install aidoc
  • create a virtual environment and install the package (recommended)
pip install aidoc

Usage

To configure the API key and model for aidoc, run the following command:

aidoc configure

To generate documentation for a source file or directory, run the following command:

aidoc gen <source_file>

You can also specify the following optional arguments:

  • -o or --overwrite: Overwrite existing docstrings
  • -f or --format: Format the entire source file using black (default=True)
  • -pr or --pull-request: Create a pull request with the changes

Examples

Generate docstrings for the main.py file:

aidoc gen main.py

Generate docstrings for all Python files in the src directory and its subdirectories:

aidoc gen src

Generate docstrings and create a pull request with the changes:

aidoc gen main.py -pr

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

Acknowledgments

Disclaimer

This project is not affiliated with OpenAI. The OpenAI API and GPT-3 language model are not free. You will need to sign up for a free OpenAI account and create an API key to use this tool.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aidoc-0.1.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

aidoc-0.1.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file aidoc-0.1.1.tar.gz.

File metadata

  • Download URL: aidoc-0.1.1.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for aidoc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1b8b3f33abd4bf69b27e68cf9d987c2e28c5ea6ff99dee10117f9919d377614e
MD5 f59c510459660feb3964fab4f7cc1401
BLAKE2b-256 c0c65b4af9a0edb652e3787590420286dedac9ad3196315e2e2eb23667669b49

See more details on using hashes here.

Provenance

File details

Details for the file aidoc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aidoc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for aidoc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c8f23faa33a59b90ac1af3908e23af17325cbc9f0bfa5faf4632d57632edea7f
MD5 48b3235139b02ea6c0a0275f0be16b06
BLAKE2b-256 f260a1bf263221cc9776171f748261daf62e6d055e097d6a1c0c51f13eb2a078

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page