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
tailfor 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.conflictrun.start/run.done/run.timeoutprovider.connection_errorprovider.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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
146839cc1a5e4115ba046ec456f7cd3a5786f73841302be0175ee09f7dc56308
|
|
| MD5 |
f8d81da0554f5d395530563208df5d99
|
|
| BLAKE2b-256 |
6ebf6702b9072f59fbc34a44243ad7ccd67f0c1db35617d3874d2f6ba3ba056f
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f603b4c7027bbfaa84eb691535795495c91f966171f25c8d50c98b99e5cbf2a0
|
|
| MD5 |
dacf2770cb9c4e95f3b3d6b0f39716da
|
|
| BLAKE2b-256 |
33c91084d2e588921d611d9618172d5e6d95b653a0ff8f36a17a2f3c6e3adc02
|