Metadata-Version: 2.4
Name: nextpy-agent
Version: 0.1.0
Summary: NextPy AI Agent - Intelligent coding assistant for NextPy framework
Author: NextPy Team
License: MIT
Project-URL: Homepage, https://github.com/RahimStudios/NextPy-AI
Project-URL: Repository, https://github.com/RahimStudios/NextPy-AI
Keywords: ai,agent,coding assistant,nextpy,llm,anthropic,ollama
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: click>=8.3.1
Requires-Dist: pydantic>=2.12.5
Requires-Dist: python-dotenv>=1.2.1
Requires-Dist: rich>=13.0.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: anthropic>=0.40.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Provides-Extra: ollama
Requires-Dist: ollama>=0.1.0; extra == "ollama"

# NextPy Agent

**Version:** 0.1.0  
**Status:** Alpha (Phase B - Stage 1)

## Overview

NextPy Agent is an AI-powered coding assistant specifically designed for the NextPy framework. It provides intelligent code generation, debugging, and refactoring capabilities with deep understanding of NextPy's architecture.

## Quick Start

### Installation

```bash
pip install nextpy-agent
```

### Basic Usage

```bash
# Start a chat session
nextpy-agent chat

# Or with a specific provider
nextpy-agent chat --provider anthropic
nextpy-agent chat --provider ollama
```

## Phase B - Stage 1 Features

**Current Capabilities:**
- Multi-provider support (Anthropic, Ollama)
- Interactive chat interface
- Framework-aware context via introspection
- Configuration management
- Quick start (<2 min setup)

**Coming Soon (Stages 2-7):**
- Tab completion
- Diff rendering
- Inline editing
- RAG with framework documentation
- Memory across sessions
- Composer mode with task planning

## Provider Support

### Anthropic (Cloud)
- **Default provider** for zero-install experience
- Requires API key: `ANTHROPIC_API_KEY` environment variable
- Best for: Production use, highest quality responses

### Ollama (Local)
- **Optional local provider** for privacy and cost savings
- Requires Ollama installation and running service
- Best for: Development, offline use, cost-sensitive projects

## Configuration

Create a `.env` file or set environment variables:

```bash
# Anthropic (cloud provider)
ANTHROPIC_API_KEY=your_api_key_here

# Ollama (local provider)
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_MODEL=gemma3:4b

# Default provider
NEXTPY_PROVIDER=anthropic
```

## Development

### Setup

```bash
# Clone repository
git clone https://github.com/IBRAHIMFONYUY/nextpy-agent.git
cd nextpy-agent

# Install with dev dependencies
pip install -e ".[dev,ollama]"

# Run tests
pytest

# Format code
black src/
ruff check src/
```

### Architecture

```
nextpy-agent/
├── src/nextpy_agent/
│   ├── __init__.py
│   ├── cli.py              # Command-line interface
│   ├── config.py           # Configuration management
│   ├── providers/          # LLM provider implementations
│   │   ├── __init__.py
│   │   ├── base.py         # Abstract provider interface
│   │   ├── anthropic.py    # Anthropic provider
│   │   └── ollama.py       # Ollama provider
│   └── chat.py             # Chat functionality
├── tests/
├── pyproject.toml
└── README.md
```

## Roadmap

### Phase B - Stage 1 (Current)
- ✅ Provider interface
- ✅ Anthropic integration
- ✅ Ollama integration
- ✅ Basic chat functionality
- ✅ Configuration management

### Phase C - Stages 2-3
- Tab completion
- Diff rendering
- Inline editing

### Phase D - Stages 4-5
- RAG with framework docs
- Memory across sessions

### Phase E - Stages 6-7
- Composer mode
- Task planning and execution
- AST-aware editing

## License

MIT License - see LICENSE file for details.

## Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.
