# ColabPilot

Bridge Google Colab GPU to LLM chat UIs (ChatGPT, Claude, Gemini).

## Setup

In any Google Colab cell:

```python
!pip install colabpilot
import colabpilot
colabpilot.connect()
```

Then install the [ColabPilot Chrome Extension](https://github.com/navaneethkrishnansuresh/colabpilot) and open any LLM chat. Code blocks will get a "Run in Colab" button that executes on your Colab GPU and sends results back.

## How it works

1. `colabpilot.connect()` registers Python callbacks with Colab's built-in JS-to-Python RPC system
2. The Chrome extension detects the bridge via a DOM marker
3. When you click "Run in Colab" on a code block, the extension calls the Python callback
4. Code executes in a shared namespace (variables persist across runs)
5. stdout, stderr, and errors are captured and sent back to the chat

## Requirements

- Google Colab (free tier works)
- [ColabPilot Chrome Extension](https://github.com/navaneethkrishnansuresh/colabpilot)
- Any supported LLM chat: ChatGPT, Claude, or Gemini
