DocBot-AI
DocBot-AI is a powerful command-line tool that automates the creation of comprehensive README files for your projects. Utilizing advanced AI models through the Groq API, DocBot-AI analyzes source code files to generate detailed documentation. This tool is ideal for developers who want to simplify their documentation process.
Features
- Automated README Generation: Generate detailed README files based on your source code.
- Model Selection: Choose from various Groq models, including
llama3-8b-8192,mixtral-8x7b-32768, andllava-v1.5-7b-4096-preview. - Token Usage Statistics: View token usage data after README generation (optional).
- Custom Output: Direct the output to a specific file or display it in the terminal.
- TOML Configuration Support: Set default parameters using a configuration file.
Installation
Prerequisites
- Python 3.10 or higher.
- Groq API Python Client.
pipinstalled on your system.- Note: Ensure that the Groq API key is set as an environment variable (GROQ_API_KEY) before using the tool. This can be done by adding the key to your .env file or directly exporting it in your terminal.
Installation Steps
-
Install DocBot-AI:
pip install docbot-ai
-
Verify Installation: Ensure the tool is installed correctly by running:
docbot-ai -vYou should see the version of DocBot-AI displayed.
Usage
Running the Tool
Run the docbot-ai command from your terminal, providing source files and any necessary options:
docbot-ai <files> [OPTIONS]
Common Options
files: List of source files to process for README generation.--output <output_file>: Specify the output file for the generated README.--models <model1> <model2>: List of Groq models to use for generation.--api_key <API_KEY>: API key for Groq (optional if specified in a.envfile).--token (-t): Display token usage after generating the README.--config <config_file>: Path to a TOML config file (default:.docbot-config.toml).--version (-v): Display the current version of DocBot-AI.
Example Usage
-
Generate a README for
app.pyand save it toREADME.md:docbot-ai app.py --output README.md
-
Specify multiple AI models for README generation:
docbot-ai app.py --models llama3-8b-8192 mixtral-8x7b-32768
-
Use a custom TOML configuration file:
docbot-ai app.py --config my-config.toml
Video of Tool in Action
https://github.com/user-attachments/assets/e1930888-27c4-4feb-ad80-62691ec9c2cd
Development Setup
Clone the Repository
For local development, clone the repository and set up the environment:
git clone https://github.com/ajogseneca/DocBot.git
cd DocBot
Install Dependencies
Install the required Python dependencies:
pip install -r requirements.txt
Run the CLI Locally
Use the following command to test the tool locally:
python -m docbot_app.src.DocBot <files> [OPTIONS]
Code Overview
src/api.py: Handles Groq API interactions, including README content generation and error handling.src/arg_parser.py: Parses command-line arguments and manages TOML configurations.src/file_handler.py: Processes input files and directs README content to the specified output.src/DocBot.py: The main script that orchestrates the CLI operations, integrates components, and generates READMEs.
Important Notes
- Install all dependencies (
dotenv,groq, etc.) before running the tool. - Ensure you have access to the Groq API and a valid API key to use this tool.
- The generated README content serves as a starting point and may require manual refinement.
- Review Groq API pricing and usage policies before using this tool for production-level projects.
License
This project is licensed under the MIT License.
Metadata
Release files for docbot-ai 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| docbot_ai-1.0.1.tar.gz | 8.6 kB | Without provenance | Details for docbot_ai-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| docbot_ai-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for docbot_ai-1.0.1-py3-none-any.whl |
Total release size: 19.9 kB
Release files / docbot_ai-1.0.1.tar.gz
| Download URL | docbot_ai-1.0.1.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d119605955b72ee4553d1cf620571433dd00f26dabaea0bfa888f7985f2605d2
|
|
BLAKE2b-256 checksum How to use checksums |
cc1e416930156c9a9808d127b59fe443aaa3e527d38211a1ef6ad33d6a1c597d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Release files / docbot_ai-1.0.1-py3-none-any.whl
| Download URL | docbot_ai-1.0.1-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a12e2341beae4df6bcb86e6a424f1c083459d0a3ba15a063082f42a0d90bfd7d
|
|
BLAKE2b-256 checksum How to use checksums |
600e3dad52ffd8d4a44a2f1b9990419fefe348c5b27b10fe3f34833891ba9e46
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.6
|
Security for docbot-ai 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.