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

Disable duplicate collapsing

openclaw logs --follow | ocx tail --no-dedup

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.2.tar.gz (6.5 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.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ocx_tail-0.1.2.tar.gz
  • Upload date:
  • Size: 6.5 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.2.tar.gz
Algorithm Hash digest
SHA256 146839cc1a5e4115ba046ec456f7cd3a5786f73841302be0175ee09f7dc56308
MD5 f8d81da0554f5d395530563208df5d99
BLAKE2b-256 6ebf6702b9072f59fbc34a44243ad7ccd67f0c1db35617d3874d2f6ba3ba056f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ocx_tail-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f603b4c7027bbfaa84eb691535795495c91f966171f25c8d50c98b99e5cbf2a0
MD5 dacf2770cb9c4e95f3b3d6b0f39716da
BLAKE2b-256 33c91084d2e588921d611d9618172d5e6d95b653a0ff8f36a17a2f3c6e3adc02

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