Metadata-Version: 2.4
Name: jupyterpilot-ai
Version: 0.1.0
Summary: Agentic AI coding partner for IPython and Jupyter
Author-email: Wajoud Noorani <wajoudnoorani59@gmail.com>
Project-URL: Homepage, https://github.com/wajoud/jupyterpilot-ai
Project-URL: Bug Tracker, https://github.com/wajoud/jupyterpilot-ai/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Framework :: IPython
Classifier: Intended Audience :: Developers
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: ipython
Requires-Dist: litellm
Dynamic: license-file

# 🧠 JupyterPilot AI

**JupyterPilot AI** (`jupyterpilot-ai`) is a lightweight, provider-agnostic AI coding partner for IPython and Jupyter. It brings natural language code generation (`%do`) and automated error healing (`%fix`) to your notebook.

---

## 🚀 Features
- **%do <prompt>**: Transform instructions into Python code instantly.
- **%fix**: Post-mortem self-healing for your last error.
- **Context Awareness**: Remembers your last 3 cells for accurate variable usage.
- **Hybrid Support**: Switch between local **Ollama** and cloud **GPT-4o/Claude** via LiteLLM.

---

## 📥 Installation

```bash
pip install jupyterpilot-ai
```

### Enable the Extension
Add this to any cell in your notebook or your IPython startup script:
```python
%load_ext jupyterpilot_ai
```

---

## ⚙️ Configuration

JupyterPilot AI looks for a configuration file at `~/.jupyterpilot/config.json`. 

### Switching Modes
To switch between local and paid models, simply change the `"mode"` value in your config file:

```json
{
    "mode": "cloud", 
    "local": {
        "url": "http://localhost:11434/api/generate",
        "model": "qwen2.5-coder:7b"
    },
    "cloud": {
        "provider": "openai",
        "model": "gpt-4o",
        "api_key": "sk-..."
    }
}
```

- **Local Mode (`"mode": "local"`)**: 
  - Uses **Ollama** by default.
  - Requires Ollama to be running (`ollama run qwen2.5-coder:7b`).
  - You can customize the `url` and `model` in the `local` block.

- **Cloud Mode (`"mode": "cloud"`)**: 
  - Uses **LiteLLM** to connect to paid providers.
  - Supports OpenAI, Anthropic (Claude), Google (Gemini), etc.
  - Specify your `provider`, `model`, and `api_key`.

---

## 🛠️ Usage
- `%do plot a sine wave`
- `%fix` (after an error)

---

## 📬 Contact
**Wajoud Noorani** - [Wajoudnoorani59@gmail.com](mailto:wajoudnoorani59@gmail.com)

---

## 📄 License
MIT
