Metadata-Version: 2.4
Name: madagent
Version: 0.1.0
Summary: Launcher for Aider with a preconfigured Gemini API key.
Home-page: https://pypi.org/project/madagent/
Author: MADAgent
Author-email: maintainer@example.com
License: Proprietary
Project-URL: Source, https://github.com/example/madagent
Project-URL: Issues, https://github.com/example/madagent/issues
Keywords: aider,gemini,cli,launcher,android-studio
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: rich>=13.0.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# MADAgent

`MADAgent` is a lightweight Python launcher for [Aider](https://github.com/Aider-AI/aider) that:

- sets `GEMINI_API_KEY`
- checks whether `aider` is available
- installs `aider-chat` automatically if needed
- launches Aider with:

```bash
aider --model gemini/gemini-2.5-flash
```

It is designed to work from a regular terminal as well as the Android Studio integrated terminal on Windows, Linux, and macOS.

## Warning

This tool is intended for temporary educational use only.

## Project Structure

```txt
madagent/
├── setup.py
├── README.md
├── requirements.txt
├── madagent/
│   ├── __init__.py
│   └── cli.py
```

## Installation

From PyPI:

```bash
pip install madagent
```

From the project root:

```bash
pip install .
```

If your environment uses `python -m pip`, this also works:

```bash
python -m pip install .
```

## Usage

After installation, start the launcher with:

```bash
madagent
```

On startup, the launcher will:

1. print a startup banner
2. export `GEMINI_API_KEY`
3. verify internet connectivity and confirm the configured Gemini key can generate with the target model
4. check whether `aider` is installed
5. install `aider-chat` automatically if `aider` is missing
6. launch Aider with Gemini Flash

## Replace the API Key

Edit the `API_KEY` constant in `madagent/cli.py`:

```python
API_KEY = "your-new-gemini-api-key"
```

Then reinstall the package:

```bash
pip install .
```

If you want to force a reinstall:

```bash
pip install --force-reinstall .
```

If startup says the project is denied access, the current key is not usable for Gemini generation and must be replaced with a working Google AI Studio Gemini API key.

## Uninstall

To remove the launcher:

```bash
pip uninstall madagent
```

If you also want to remove Aider installed by the launcher:

```bash
pip uninstall aider-chat
```

## Notes

- Authentication uses only the `GEMINI_API_KEY` environment variable.
- No browser OAuth flow is implemented.
- The launcher uses the current Python interpreter to install `aider-chat`, which is more reliable than shelling out to a bare `pip` executable across platforms.
- Before publishing to PyPI, update the placeholder metadata in `setup.py`, especially `author_email` and the `project_urls` values.
