Metadata-Version: 2.4
Name: carlab-pi
Version: 0.5.4
Summary: PI terminal coding harness for the CARLab Qwen model.
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# PI

Installable terminal coding harness for the CARLab local Qwen model.

## Install

From another machine:

```bash
scp william@128.175.213.232:/media/william/mist2/william/Github/CARLabAssistant/packages/pi-client/dist/carlab_pi-0.5.4-py3-none-any.whl .
python3 -m pip install --user ./carlab_pi-0.5.4-py3-none-any.whl
```

From a wheel or source directory:

```bash
python3 -m pip install carlab_pi-0.5.4-py3-none-any.whl
```

or:

```bash
python3 -m pip install .
```

## Configure

Create an API key in Open WebUI, then save it locally:

```bash
pi setup --api-key <your-open-webui-api-key>
```

The default endpoint is:

```text
http://128.175.213.232:8080/api/v1
```

## Use

```bash
pi
pi status
pi ask "Write a Python function that reads a CSV."
pi chat --file app.py
```

Inside interactive mode:

```text
/pwd
/cd PATH
/ls [PATH]
!pytest -q
/file PATH
/exit
```

PI also handles common requests without slash commands:

```text
list the files in the current directory
read the server config file
fix the typo in readme
search the web for the latest release notes
```

When you ask PI to edit a file, it fuzzy-matches the file, asks the model for a
unified diff, applies it, and saves the file automatically.

PI can also search the web when the harness decides the request needs current,
niche, or uncertain information. Stable questions are answered without web
search.

Internal searches, file reads, and tool calls stay quiet by default. PI uses
their results as context and prints the final answer, not raw search pages or
raw file contents. Large files are summarized into temporary code memory before
they are sent to the model, so broad review/explanation requests stay inside
the context window.

Configuration is stored at:

```text
~/.config/pi/config.json
```
