Summary
Add a gonext audit tail CLI subcommand that streams new audit log entries to stdout. Useful for operators to watch security events live. Format: one line per event (text mode) or one JSON object per line (--format json). Supports filtering by --event, --actor, --target-type.
Design reference
- docs/05-admin-api.md §3.9 (CLI
gonext)
- docs/06-auth-permissions.md §1 (Goals — Auditable)
Acceptance criteria
Dependencies
Depends on the gonext CLI scaffold and the Audit log issues.
Complexity
S
Summary
Add a
gonext audit tailCLI subcommand that streams new audit log entries to stdout. Useful for operators to watch security events live. Format: one line per event (text mode) or one JSON object per line (--format json). Supports filtering by--event,--actor,--target-type.Design reference
gonext)Acceptance criteria
gonext audit tailpollsGET /api/v1/audit/log?since=<cursor>every 2s and prints new entries--event=<slug>(repeatable),--actor=<user>,--target-type=<type>,--follow/-f(default true),--format=text|json<timestamp> <event> actor=<id> target=<type:id> ip=<ip>(one line each)Ctrl-Ccleanly stops the tailmanage_options(server-side check via the audit endpoint)Dependencies
Depends on the gonext CLI scaffold and the Audit log issues.
Complexity
S