Metadata-Version: 2.4
Name: runtimeai-ide
Version: 0.1.0
Summary: RuntimeAI IDE integration — MCP server and CLI for Cursor, VS Code, and Claude Code
Author-email: Vantage AI <hello@vantageai.cc>
License-Expression: MIT
Project-URL: Homepage, https://www.vantageai.cc/runtimeai
Project-URL: Documentation, https://www.vantageai.cc/runtimeai/method/ide
Project-URL: Repository, https://github.com/simonbright/vantage
Project-URL: Issues, https://github.com/simonbright/vantage/issues
Keywords: runtimeai,mcp,cursor,data-engineering,llm-eval
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
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 :: Quality Assurance
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=1.2.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# runtimeai-ide

RuntimeAI check-rides from your editor — forecast eval cost, suggest scenarios, generate drafts, and run local rubrics via MCP or CLI.

**No Vantage monorepo required.** This package talks to the hosted RuntimeAI API at [vantageai.cc](https://www.vantageai.cc).

## Install

```bash
pip install runtimeai-ide
```

From GitHub:

```bash
pip install "git+https://github.com/simonbright/vantage.git#subdirectory=runtimeai-ide"
```

Editable install (Vantage repo contributors):

```bash
pip install -e ./runtimeai-ide
```

## What works without OPENROUTER_API_KEY

| Tool / command | What it does |
|----------------|--------------|
| `suggest` | Local file/brief → library scenario id |
| `forecast` | Hosted cost estimate (no client key) |
| `generate` | Hosted scenario draft (no client key; server credits required) |
| `doctor` | API check + capability summary |

**Requires `OPENROUTER_API_KEY` + `vantage-core`:** `run` / `runtimeai_run_checkride` — live eval with pass/fail rubric.

## Cursor MCP

Add to `~/.cursor/mcp.json` or your project's `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "runtimeai": {
      "command": "python3",
      "args": ["-m", "runtimeai_ide", "mcp"],
      "env": {
        "RUNTIMEAI_BASE_URL": "https://www.vantageai.cc",
        "OPENROUTER_API_KEY": "${env:OPENROUTER_API_KEY}"
      }
    }
  }
}
```

Or run `./scripts/install-mcp.sh` from this package directory.

Restart Cursor. No `PYTHONPATH` needed.

## CLI

```bash
runtimeai-ide doctor
runtimeai-ide suggest --file models/orders.sql
runtimeai-ide forecast --scenario de_sql_optimization_v1 --turns 8
runtimeai-ide generate --file schema.sql --brief "Fix partition filter"
runtimeai-ide run --scenario de_sql_optimization_v1 --turns 1   # needs vantage-core + OPENROUTER_API_KEY
```

## Environment

| Variable | Default | Purpose |
|----------|---------|---------|
| `RUNTIMEAI_BASE_URL` | `https://www.vantageai.cc` | RuntimeAI API host |
| `OPENROUTER_API_KEY` | — | Live check-rides only |
| `RUNTIMEAI_DEFAULT_SCENARIO` | `de_sql_optimization_v1` | Default library scenario |
| `RUNTIMEAI_DEFAULT_MODEL` | `openai/gpt-4o-mini` | Default model for runs |

## MCP tools

- `runtimeai_suggest_scenario` — map a file or brief to a library scenario (no key)
- `runtimeai_forecast_cost` — estimate per-run eval cost (no key)
- `runtimeai_generate_scenario` — draft a custom check-ride (no client key)
- `runtimeai_run_checkride` — run `vantage-core` locally (key + CLI required)
- `runtimeai_doctor` — verify API + explain key requirements

## Develop

```bash
cd runtimeai-ide
pip install -e ".[dev]"
pytest -q
```

## Publish (maintainers)

```bash
chmod +x scripts/publish-pypi.sh
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-…
./scripts/publish-pypi.sh
```

Or tag a GitHub release — CI publishes via [trusted publishing](https://docs.pypi.org/trusted-publishers/).
