Metadata-Version: 2.4
Name: agenteye
Version: 0.1.0b1
Summary: Command-line client for the AgentEye dashboard API
Author-email: Exosphere <support@exosphere.host>
License: Proprietary
Project-URL: Homepage, https://exosphere.host
Project-URL: Documentation, https://github.com/agenteye-enterprise/releases
Keywords: agents,observability,ai,monitoring,agenteye,cli
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: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27
Requires-Dist: typer>=0.12
Requires-Dist: rich>=13
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: respx>=0.21; extra == "dev"

# AgentEye CLI (`agenteye`)

A command-line client for the AgentEye **dashboard** API. It lets a developer —
or the coding agent working alongside them — authenticate and query agent
sessions, event logs, and evaluations from the terminal, with a `--json` flag on
every command for scripting.

> This is the **`agenteye` CLI**, distinct from the collector daemon
> (`agenteye-collector`). The PyPI package and the installed command are both
> `agenteye`.

## Install

```bash
pipx install agenteye      # recommended (isolated)
# or: uv tool install agenteye  /  pip install agenteye
```

Install isolated (pipx / uv tool) — the AgentEye Python SDK shares the `agenteye`
distribution name, so isolation avoids a clash in a shared virtualenv.

For development in this repo:

```bash
cd cli
uv sync --extra dev
uv run agenteye --help
```

## Authentication

The CLI talks to the dashboard (default `http://localhost:3000`) and logs in with
an emailed one-time code:

```bash
agenteye login --email you@example.com
# enter the 6-digit code; the session is stored in ~/.agenteye/cli.json (mode 0600)
agenteye whoami
agenteye logout
```

Sessions expire (24h by default); re-run `agenteye login` when prompted.

## Commands

```text
agenteye sessions [--since 24h] [--status error] [--all]
agenteye events --session-id <id> [--event-type tool_use,tool_result] [--all]
agenteye logs ...                       # alias of events
agenteye evals --score helpfulness:0.5..0.8 --latest-per-session
agenteye session show <id>
agenteye session export <id> -o out.json
agenteye re-evaluate <id>
agenteye jobs                           # in-flight evaluation queue
agenteye environments [--source events|evals]
agenteye version                        # print the CLI version
agenteye help                           # show top-level help
```

Add `--json` to any command for machine-readable output:

```bash
agenteye events --session-id run-001 --all --json | jq '.events[].payload'
```

## Configuration

| Setting | Flag | Env var | Default |
|---|---|---|---|
| Dashboard URL | `--base-url` | `AGENTEYE_DASHBOARD_URL` | `http://localhost:3000` |
| Session token | `--token` | `AGENTEYE_CLI_TOKEN` | from `~/.agenteye/cli.json` |
| JSON output | `--json` | `AGENTEYE_CLI_JSON` | off |

Precedence is **flag > environment variable > config file > default**. The config
directory honours `AGENTEYE_HOME` (same as the SDK and collector).

## Exit codes

| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (bad arguments) |
| 3 | Cannot reach the dashboard |
| 4 | Not logged in / session expired |
| 5 | Authenticated but missing permission |

## Tests

```bash
cd cli
uv run --extra dev pytest
```
