Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

iron tail: --sql, --streams, --schema, --json for agent introspection#51

Merged
kualta merged 1 commit into
mainfrom
feat/tail-agent-flags
May 11, 2026
Merged

iron tail: --sql, --streams, --schema, --json for agent introspection#51
kualta merged 1 commit into
mainfrom
feat/tail-agent-flags

Conversation

@kualta

@kualta kualta commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Four new flags on `iron tail` so agents can introspect and query the OO hub without curl + config-fishing:

  • `--streams` - list every stream with type and field count.
  • `--schema STREAM` - print the schema (column name + type) of a stream.
  • `--sql SQL` - run an arbitrary SQL query and emit results as NDJSON (one JSON object per line). `--since` still sets the time window; other filter flags ignored.
  • `--json` - switch default tail output to NDJSON.

All four share `iron tail`'s existing hub-URL + credential plumbing.

Test plan

  • cargo fmt, clippy -D warnings, test
  • iron tail --streams: 5 streams listed with real field counts
  • iron tail --schema flow_events: 8 columns + types
  • iron tail --sql "SELECT service, count(*) FROM "_rumdata" ... GROUP BY service" --since 48h: NDJSON aggregation results
  • iron tail --since 30s --json: raw JSON rows instead of colorized text

@kualta
kualta merged commit ef29837 into main May 11, 2026
2 checks passed
@kualta
kualta deleted the feat/tail-agent-flags branch May 11, 2026 17:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant