Metadata-Version: 2.4
Name: neruva-control
Version: 0.1.0
Summary: Local controller daemon for Neruva Cockpit -- the dashboard for agentic AI. Spawns and tails Claude Code sessions, streams them to your browser at app.neruva.io. No CLI knowledge required after install.
Author-email: Clouthier Simulation Labs <info@neruva.io>
License: MIT
Project-URL: Homepage, https://neruva.io/
Project-URL: Documentation, https://neruva.io/docs/
Project-URL: Source, https://github.com/CloutSimLabs/neruva
Keywords: neruva,cockpit,claude,claude-code,agent-memory,agentic-ai,agent-dashboard,ai
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 :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.110
Requires-Dist: uvicorn[standard]>=0.27
Requires-Dist: httpx>=0.27
Requires-Dist: websockets>=12
Requires-Dist: platformdirs>=4
Requires-Dist: tomli>=2; python_version < "3.11"
Dynamic: license-file

# neruva-control

Local controller daemon for **[Neruva Cockpit](https://app.neruva.io/cockpit)** —
the dashboard for agentic AI. Spawns and tails Claude Code sessions
on your machine, streams them to your browser. No CLI knowledge
required after install.

## Install

```bash
pip install neruva-control
neruva-control-install
```

The installer:

1. Generates a random auth token and stores it at
   `~/.config/neruva/control.token` (mode 0600 on Unix).
2. Registers a background service so the daemon starts on login
   (launchd on macOS, systemd-user on Linux, Task Scheduler on Windows).
3. Starts the daemon listening on `127.0.0.1:7331` (loopback only).
4. Prints a one-time URL like
   `https://app.neruva.io/cockpit#token=<TOKEN>` — open it once and
   the browser remembers your machine.

## How it works

```
[browser at app.neruva.io]
       ↕  WebSocket (loopback :7331, token-authed)
[neruva-control daemon]
   ├─ HTTP/WS server on 127.0.0.1:7331
   ├─ Spawns: claude --headless --output-format stream-json
   ├─ Tails subprocess stdout, broadcasts events to browser
   └─ Forwards user steering input → subprocess stdin
       ↕  HTTPS (existing Api-Key auth)
[api.neruva.io substrate]
```

The daemon binds to **127.0.0.1 only** — your sessions never leave
your machine. The browser at `app.neruva.io` connects to your local
daemon via a loopback WebSocket. The auth token is the shared secret
between daemon and browser; only the browser tab you linked has it.

## Commands

| Command | What it does |
|---|---|
| `neruva-control-install` | One-shot install (generates token, registers service, prints link URL). |
| `neruva-control start` | Run the daemon foreground (used by service). |
| `neruva-control status` | Show install + daemon health. |
| `neruva-control link` | Print the link URL again (for re-link or new browser). |
| `neruva-control stop` | Stop the daemon. |

## Requirements

- Python ≥3.10
- Claude Code installed and on `$PATH` (the daemon spawns it)
- A Neruva account at [neruva.io](https://neruva.io) (free tier works)

## What gets recorded

Every session's events (prompts, tool calls, file edits, shell commands,
MCP calls) are captured and posted to your Neruva substrate via the
[Records API](https://neruva.io/docs/). You can recall them anytime
via the Neruva MCP tools or the Cockpit memory browser.

What it **doesn't** record: IDE state, browser tabs, other apps. The
daemon only sees what flows through Claude Code.

## License

MIT — see [LICENSE](./LICENSE).
