Skip to main content

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

Project description

ocx

A CLI companion for OpenClaw logs.

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

sudo apt update
sudo apt install -y pipx
pipx ensurepath
source ~/.profile

# inside this repository:
pipx install .

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.1.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.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ocx_tail-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 175d0ddbf3a5001819f1e2a7af0ca26f346318fc1e4dfb3128dd704e80016daf
MD5 e39fb80e218cd663d9697bd644310e1b
BLAKE2b-256 a2fdd44cd65407632a1d074ee12a5b2a1632a18ca817e8b0b655984ef17860a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ocx_tail-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d5d357378c436f5cc6bdabf72f16db7be09ca88738259aedba0abd615eaa86c
MD5 53c744c156d858aea1013fd695246326
BLAKE2b-256 b4d8ada13a26dd0dea2fd8cc03b93585d6e6a8bb4b8e4336a6204b72513633c4

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