feat: audit log query CLI tool #144

Closed
opened 2026-05-26 04:45:56 +00:00 by jmiller · 2 comments
Owner

CLI for searching, filtering, and exporting audit logs across all repos. Support date ranges, user filtering, operation types, and JSON/table output. Builds on: lib/Enterprise/AuditLogger.php, MetricsCollector.

CLI for searching, filtering, and exporting audit logs across all repos. Support date ranges, user filtering, operation types, and JSON/table output. Builds on: lib/Enterprise/AuditLogger.php, MetricsCollector.
Author
Owner

Branch created: feature/144-feat-audit-log-query-cli-tool

git fetch origin
git checkout feature/144-feat-audit-log-query-cli-tool
Branch created: [`feature/144-feat-audit-log-query-cli-tool`](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/src/branch/feature/144-feat-audit-log-query-cli-tool) ```bash git fetch origin git checkout feature/144-feat-audit-log-query-cli-tool ```
Author
Owner

Implemented in cb2debc.

New cli/audit_query.php (registered as audit:query in bin/moko):

  • Filters: --service, --user, --event, --level, --since, --until
  • Output: table (default), json, jsonl
  • Stats mode: --stats shows aggregated counts by service/user/event/level
  • Efficient: pre-filters by filename date before parsing JSONL
Implemented in cb2debc. New `cli/audit_query.php` (registered as `audit:query` in bin/moko): - Filters: --service, --user, --event, --level, --since, --until - Output: table (default), json, jsonl - Stats mode: --stats shows aggregated counts by service/user/event/level - Efficient: pre-filters by filename date before parsing JSONL
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/moko-platform#144