Metadata-Version: 2.4
Name: oplut
Version: 0.1.0
Summary: CLI for running verified Oplut hardware setup paths.
Project-URL: Homepage, https://www.oplut.com
Project-URL: Documentation, https://www.oplut.com/docs
Project-URL: Catalog, https://www.oplut.com/catalog
Author: Oplut
License-Expression: MIT
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27
Requires-Dist: rich>=13.7
Requires-Dist: typer>=0.12
Provides-Extra: vision
Requires-Dist: opencv-python-headless>=4.10; extra == 'vision'
Description-Content-Type: text/markdown

# Oplut CLI

V0.1 CLI for authenticating a board, running verified setup paths, and leaving behind useful robot-build outputs like camera streams and JSON endpoints.

Local development:

```bash
pip install -e ./cli
OPLUT_API_BASE_URL=http://YOUR_MAC_IP:3000 oplut auth
oplut setup --goal network-stream
```

Production target:

```bash
pip install oplut
oplut auth
oplut setup
```

`oplut auth` starts a browser device-code flow by default. It opens the approval URL, polls until the account approves the device, and stores the returned API key in `~/.oplut/credentials.json`.

`oplut setup` detects the board and connected peripherals, asks what the user wants to build when no goal is provided, calls the Oplut API, executes the verified config, installs any persistent service, verifies it, and prints the useful output URL.

The default API is `https://www.oplut.com`. Only local development should use
`OPLUT_API_BASE_URL` or `--api-base-url`.

Dashboard control:

```bash
oplut agent-install
systemctl status oplut-agent
```

This installs the dashboard job listener as a systemd service so the user does not need to keep `oplut agent` open manually.

Code-facing V0.1 helpers:

```python
from oplut import CameraStream

camera = CameraStream.connect("192.168.7.2")
cap = camera.open_cv2()

while True:
    ok, frame = cap.read()
    if not ok:
        break
    # Build color filtering / OpenCV robot logic here.
```

```python
from oplut import ArduinoSerial

serial = ArduinoSerial.connect("192.168.7.2")
print(serial.read())
```

```python
from oplut import ServoControl

servo = ServoControl.connect("192.168.7.2")
servo.set_angle(90)
```
