Skip to content

feat: yoq audit command#426

Merged
kacy merged 1 commit into
mainfrom
feat/audit-cli
May 24, 2026
Merged

feat: yoq audit command#426
kacy merged 1 commit into
mainfrom
feat/audit-cli

Conversation

@kacy
Copy link
Copy Markdown
Owner

@kacy kacy commented May 24, 2026

adds the yoq audit CLI to read the audit log (added in #425) from the
terminal, finishing the audit-log item.

summary

yoq audit [--limit N] [--server h:p] [--json] queries the local agent's
GET /v1/audit?limit=N, then renders a table (time, actor, action, target,
outcome) or passes through --json. mirrors yoq status: server address from
--server (default 127.0.0.1:7700), api token via readApiTokenWithIo,
http_client.getWithAuth, json_helpers.extractJsonObjects.

tested

  • YOQ_SKIP_SLOW_TESTS=1 zig build test — 2175 passed, 2 skipped, 0 failed
    (completion-metadata coverage test passes for the new command).
  • ran the binary: yoq help lists audit; yoq audit reports a clear
    connection error and exits non-zero with no agent; --limit/--json parse;
    an unknown flag is rejected.
  • zig fmt --check clean.

queries the local agent's GET /v1/audit and renders a table (or --json),
with --limit and --server flags, mirroring yoq status.
@kacy kacy merged commit f6e89d5 into main May 24, 2026
2 checks passed
@kacy kacy deleted the feat/audit-cli branch May 24, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant