Skip to main content

OpenClaw CLI companion: tail/analyze/export for agent runs

Project description

ocx

A CLI companion for OpenClaw logs.

PyPI

ocx turns noisy openclaw logs output into a structured, high-signal stream.

It is designed for: - debugging gateway conflicts - tracking agent run lifecycles - spotting provider rate limits & connection failures - reducing log spam during live sessions - exporting normalized events for further analysis


Features

  • Pretty tail for OpenClaw logs
  • Error-only filtering
  • Hide websocket noise (gateway/ws)
  • Automatic de-duplication of repeated identical errors
  • Run-level summary (analyze)
  • JSONL export (export)
  • Clean internal event model (extensible, rule-based classifier)

Installation

Recommended: pipx

pip install --user pipx
pipx ensurepath

Then:

pipx install ocx-tail

Verify:

ocx --help

Usage

Tail OpenClaw logs

openclaw logs --follow | ocx tail

Or:

ocx tail --follow

Errors only

openclaw logs --follow | ocx tail --errors-only

Analyze a saved log file

ocx analyze /tmp/openclaw/openclaw-2026-02-17.log

Export normalized JSONL

openclaw logs --follow | ocx export > events.jsonl

Event Model

All log lines are normalized into:

Event(
    ts: Optional[str],
    run_id: Optional[str],
    type: EventType,
    name: str,
    payload: Dict[str, object],
)

High-signal classifications include:

  • gateway.conflict
  • run.start / run.done / run.timeout
  • provider.connection_error
  • provider.rate_limit

Architecture

The codebase is intentionally structured:

  • Parsing (regex + classification)
  • IO (stdin, file, openclaw subprocess)
  • Presentation (Rich formatting)
  • CLI wiring (Typer)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ocx_tail-0.1.3.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ocx_tail-0.1.3-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file ocx_tail-0.1.3.tar.gz.

File metadata

  • Download URL: ocx_tail-0.1.3.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ocx_tail-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9d9eacc0294319d8090da1487a9bf275ef1326cf1bf8773df5ffa6118f9be6aa
MD5 a3adddd87c4c4ff3cb1ee803a098fd6a
BLAKE2b-256 3e735f2f30591396ae0a4482274c9a4481c581a8d8d984fead72be7f0592f48e

See more details on using hashes here.

File details

Details for the file ocx_tail-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: ocx_tail-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ocx_tail-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1acf35110ff59ac9351559299ececc0509eed32ae1f8e272983d3f1e01b5d33b
MD5 4e92133ea0232bf292ef4d78b425d115
BLAKE2b-256 19592b858e7d8e8725ad52f1d34e8d2bab83e76c2a46be6fdd6eda671b7cbe23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page