Metadata-Version: 2.1
Name: pythion
Version: 1.0.13
Summary: AI-powered CLI tool for generating Python documentation strings effortlessly
Author-email: Asaniczka <asaniczka@gmail.com>
Maintainer-email: Asaniczka <asaniczka@gmail.com>
License: Apache-2.0
Project-URL: Homepage, https://github.com/asaniczka/pythion
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: annotated-types>=0.7.0
Requires-Dist: anyio>=4.6.0
Requires-Dist: certifi>=2024.8.30
Requires-Dist: click>=8.1.7
Requires-Dist: distro>=1.9.0
Requires-Dist: h11>=0.14.0
Requires-Dist: httpcore>=1.0.5
Requires-Dist: httpx>=0.27.2
Requires-Dist: idna>=3.10
Requires-Dist: jiter>=0.5.0
Requires-Dist: markdown-it-py>=3.0.0
Requires-Dist: mdurl>=0.1.2
Requires-Dist: openai>=1.47.0
Requires-Dist: pydantic>=2.9.2
Requires-Dist: pydantic_core>=2.23.4
Requires-Dist: Pygments>=2.18.0
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: pyperclip>=1.9.0
Requires-Dist: rich>=13.8.1
Requires-Dist: sniffio>=1.3.1
Requires-Dist: tqdm>=4.66.5
Requires-Dist: typing_extensions>=4.12.2
Requires-Dist: wrapworks>=1.0.6

# Pythion

Pythion is a command-line interface (CLI) tool designed to assist Python developers by generating documentation strings using AI. With an easy-to-use interface built on the [Click](https://click.palletsprojects.com/) library, Pythion provides a seamless way to enhance your Python projects with well-structured docstrings and documentation management.

## Features

- Generate documentation strings for Python functions and classes.
- Iterate through documents in specified directories.
- Flexible options to include or exclude already documented functions.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Commands](#commands)

## Installation

You can install Pythion via pip. Open your terminal and enter:

```bash
pip install pythion
```

## Usage

After installing Pythion, you can invoke the command-line tool as follows:

```bash
pythion [OPTIONS] COMMAND [ARGS]...
```

## Commands

### 1. `make-docs`

Generates documentation for any given function or class name.

```bash
pythion make-docs <root_dir>
```

- **Arguments:**
  - `root_dir`: The path to the root directory containing the Python files to analyze.

**Example:**

```bash
pythion make-docs /path/to/dir
```

### 2. `build-cache`

Bulk builds a documentation cache for functions and methods in a specified directory.

This cache then can later be used via `iter-docs`

```bash
pythion build-cache <root_dir> [--use_all]
```

- **Arguments:**
  - `root_dir`: The directory path where the Python files are located.
- **Options:**
  - `-ua`, `--use_all`: If set, generates docstrings for all functions; otherwise, only for those without docstrings.

**Example:**

```bash
pythion build-cache /path/to/dir --use_all
```

### 3. `iter-docs`

Iterates through the documentation cache.

```bash
pythion iter-docs <root_dir>
```

- **Arguments:**
  - `root_dir`: The path to the directory containing documents to be iterated.

**Example:**

```bash
pythion iter-docs /path/to/dir
```

# NOTES

- You must have an OpenAI API key saved on your environment for the key `OPENAI_API_KEY`
