Metadata-Version: 2.4
Name: pydepdoctor
Version: 0.1.1
Summary: AI-powered Python dependency fixer using Gemini.
Author-email: Vaibhav <vaibhav@example.com>
License: MIT License
        
        Copyright (c) 2025 Vaibhav
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/example/pydepdoctor
Project-URL: Bug Tracker, https://github.com/example/pydepdoctor/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click
Requires-Dist: google-generativeai
Requires-Dist: rich
Dynamic: license-file

# pydepdoctor

**pydepdoctor** is a CLI tool that automatically fixes Python dependency conflicts in your `requirements.txt` using Google's Gemini AI.

## Features

- **Automated Fixes**: Detects installation errors and asks Gemini to resolve version conflicts.
- **Safe**: Only updates versions; does not add new packages.
- **Retry Loop**: Retries installation up to 5 times until successful.
- **Cross-Platform**: Works on Windows, macOS, and Linux.

## Installation

You can install `pydepdoctor` directly from PyPI:

```bash
pip install pydepdoctor
```

### Global Installation (Recommended)

For a CLI tool like this, it is best to install it globally using `pipx` so it's available everywhere:

```bash
pipx install pydepdoctor
```

### Install from Source

If you want to install from the source code:

1. Clone the repository.
2. Navigate to the root directory.
3. Install using pip:

```bash
pip install .
```

## Usage

### 1. Initialize

First, set up your Gemini API key:

```bash
pydepdoctor init
```

You will be prompted to enter your API key. It will be validated and saved locally.

### 2. Fix Dependencies

Navigate to a project with a problematic `requirements.txt` and run:

```bash
pydepdoctor fix
```

The tool will:

1. Try to install dependencies.
2. If it fails, capture the error.
3. Send the error and `requirements.txt` to Gemini.
4. Apply the fix and retry.

### Running as a Module

You can also run `pydepdoctor` directly as a Python module. This is useful if the CLI command is not in your PATH or if you prefer this style:

```bash
python -m pydepdoctor
```

This is equivalent to running `pydepdoctor fix`. You can also pass commands:

```bash
python -m pydepdoctor init
python -m pydepdoctor fix
```

## Requirements

- Python 3.7+
- A valid Google Gemini API Key

## License

MIT
