Metadata-Version: 2.4
Name: equitrcoder
Version: 2.3.0
Summary: Modular AI coding assistant supporting single and multi-agent workflows
Home-page: https://github.com/tanushv/equitrcoder
Author: EQUITR
Author-email: tanushvanarase@equitr.com
Project-URL: Bug Reports, https://github.com/equitr/equitrcoder/issues
Project-URL: Source, https://github.com/equitr/equitrcoder
Project-URL: Documentation, https://equitrcoder.readthedocs.io/
Keywords: ai coding assistant agent multi-agent llm automation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: black==23.11.0
Requires-Dist: flake8==6.1.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: litellm>=1.46.7
Requires-Dist: psutil>=5.9.0
Requires-Dist: GitPython>=3.1.40
Provides-Extra: api
Requires-Dist: fastapi>=0.104.0; extra == "api"
Requires-Dist: uvicorn>=0.24.0; extra == "api"
Provides-Extra: tui
Requires-Dist: textual>=0.45.0; extra == "tui"
Requires-Dist: rich>=13.0.0; extra == "tui"
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.6.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Provides-Extra: all
Requires-Dist: fastapi>=0.104.0; extra == "all"
Requires-Dist: uvicorn>=0.24.0; extra == "all"
Requires-Dist: textual>=0.45.0; extra == "all"
Requires-Dist: rich>=13.0.0; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license-file
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# EQUITR Coder

Modular AI coding assistant supporting single and multi-agent workflows and an ML-focused researcher mode. Includes an advanced TUI.

## Quick Start

- Install (latest from PyPI):
  ```bash
pip install equitrcoder
  ```
- Optional extras:
  - API server: `pip install "equitrcoder[api]"`
  - TUI (Textual+Rich): `pip install textual rich`

## Configure API keys (env vars)

Set whatever providers you plan to use:
- `OPENAI_API_KEY`
- `ANTHROPIC_API_KEY`
- `OPENROUTER_API_KEY`
- `MOONSHOT_API_KEY`
- `GROQ_API_KEY`

You can also set `CLAUDE_AGENT_MODEL`, `CLAUDE_AGENT_BUDGET`, and `CLAUDE_AGENT_PROFILE` to override defaults.

Export examples (macOS/Linux):
```bash
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=...
export OPENROUTER_API_KEY=...
```

## TUI (Interactive)

- Launch TUI:
  ```bash
equitrcoder tui --mode single   # or multi, research
  ```
- Keys:
  - Enter: execute task in current mode (requires task in input field)
  - m: open model selector
  - Ctrl+C: exit
- Research mode fields:
  - Datasets: comma-separated paths
  - Experiments: `name:command; name:command; ...`

Troubleshooting:
- If you see a Textual widget error, ensure `textual` and `rich` are installed.
- If you have no API keys, you can still launch the TUI, but model listings will be minimal and execution may fail when contacting providers.

## CLI

- Single:
  ```bash
equitrcoder single "Build a small API" --model moonshot/kimi-k2-0711-preview
  ```
- Multi:
  ```bash
equitrcoder multi "Ship a feature" --supervisor-model moonshot/kimi-k2-0711-preview \
  --worker-model moonshot/kimi-k2-0711-preview --workers 3 --max-cost 15
  ```
- Research (ML only):
  ```bash
equitrcoder research "Evaluate model X on dataset Y" \
  --supervisor-model moonshot/kimi-k2-0711-preview --worker-model moonshot/kimi-k2-0711-preview \
  --workers 3 --max-cost 12
  ```

## Programmatic Usage

```python
from equitrcoder import EquitrCoder, TaskConfiguration

coder = EquitrCoder(mode="single", repo_path=".")
config = TaskConfiguration(description="Refactor module X", max_cost=2.0, max_iterations=20)
result = await coder.execute_task("Refactor module X", config)
print(result.success, result.cost, result.iterations)
```

- Multi-agent and researcher programmatic configs are available via `MultiAgentTaskConfiguration` and `ResearchTaskConfiguration`.

## API Server

- Start server (requires extras):
  ```bash
equitrcoder api --host 0.0.0.0 --port 8000
  ```
- Endpoints:
  - `GET /` root
  - `GET /health`
  - `GET /tools`
  - `POST /single/execute`
  - `POST /multi/create`
  - `POST /multi/{id}/execute`
  - `GET /multi/{id}/status`
  - `DELETE /multi/{id}`

## Configuration

- Default config lives in `equitrcoder/config/default.yaml`.
- User overrides: `~/.EQUITR-coder/config.yaml`.
- Env overrides supported for selected keys (see code and docs).
- `session.max_context: "auto"` is supported and normalized automatically.

## Examples

See `examples/` for patterns:
- `create_react_website.py`
- `mario_parallel_example.py`
- `research_programmatic_example.py`

## Troubleshooting

- Missing models or keys: ensure relevant env vars are set. The TUI will still load, but execution may fail when contacting providers.
- Textual errors: install TUI deps: `pip install textual rich`.
- Git integration issues: run inside a git repo or disable with `git_enabled=False` in programmatic usage. 
