Metadata-Version: 2.4
Name: anvil-py
Version: 0.1.0
Summary: AI-powered agentic dependency manager that analyzes changelogs and safely upgrades packages.
Project-URL: Repository, https://github.com/akashbhat/anvil
Project-URL: Issues, https://github.com/akashbhat/anvil/issues
Author-email: Akash Bhat <quentesia.art@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Akash Bhat
        
        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.
License-File: LICENSE
Keywords: agent,ai,automation,dependency-manager,forensics,llm,security,upgrade
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: langchain-ollama>=0.2.0
Requires-Dist: langchain-openai>=0.1.0
Requires-Dist: langchain>=0.3.0
Requires-Dist: langgraph>=0.2.0
Requires-Dist: packaging>=23.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: requests>=2.30.0
Requires-Dist: rich>=13.0.0
Requires-Dist: textual>=0.50.0
Requires-Dist: tomli>=2.0.0
Requires-Dist: typer>=0.9.0
Description-Content-Type: text/markdown

# Anvil - An Agentic Dependency Manager

<img src="https://raw.githubusercontent.com/quentesia/anvil/main/img/anvil.png" width="128">

Anvil is an AI-powered dependency upgrade system that autonomously analyzes, reasons about, and applies package updates.

## Features

✧ **Autonomous upgrade analysis** with AI-powered reasoning  
✧ **Multi-format support**: requirements.txt, poetry, uv, and conda environments  
✧ **Breaking change prediction** and mitigation strategies  
✧ **Safe rollback** on failure  
✧ **Changelog forensics** to understand what's changing

## Installation

**Recommended**: Install via `pipx` for isolation.

```bash
pipx install anvil-py
```

Or with `pip` (not recommended as it may conflict with project dependencies):

```bash
pip install anvil-py
```

## Configuration

Anvil requires an LLM to perform AI analysis. You have two options:

### Option 1: Local Ollama (Free)

Install and run [Ollama](https://ollama.ai) locally:

```bash
# Install Ollama, then pull a model
ollama pull llama3.2
```

Anvil will automatically use Ollama if it's running on `localhost:11434`.

### Option 2: OpenAI API

Set your OpenAI API key:

```bash
export OPENAI_API_KEY="sk-..."
```

Anvil will use OpenAI's models for analysis when the API key is present.

## Quick Start

Go to your project directory (supports `pip`, `poetry`, or `uv`) and run:

```bash
anvil upgrade
```

Anvil will:

1.  Detect your dependencies.
2.  Check for updates.
3.  Fetch changelogs & perform **AI Forensic Analysis**.
4.  Safely **Trial Install**, **Test**, and **Commit** upgrades.

## Usage

### Interactive Upgrade (Recommended)

The main way to use Anvil is the interactive wizard:

```bash
anvil upgrade
```

### Analysis Only (Dry Run)

If you just want to see what packages are outdated and read their changelogs without making changes:

```bash
anvil check .
```

### Check Version

```bash
anvil version
```

## Development

If you want to contribute to Anvil:

Check out [TODO.md](TODO.md) for a list of planned features and improvements you can help with!
Other contributions are also welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

```bash
# Run tests
pytest
```
