Skip to content

refactor and fix: fixed query apis and refactor interactive TUI mode …#93

Merged
nikhilsinhaparseable merged 7 commits into
parseablehq:mainfrom
pratik50:feat/interactive-query
May 14, 2026
Merged

refactor and fix: fixed query apis and refactor interactive TUI mode …#93
nikhilsinhaparseable merged 7 commits into
parseablehq:mainfrom
pratik50:feat/interactive-query

Conversation

@pratik50
Copy link
Copy Markdown
Contributor

@pratik50 pratik50 commented May 6, 2026

Summary

  • Added -i / --interactive flag for full-screen TUI query results
  • Modified command for interactive mode with clean ui
  • Fixed terminal layout for responsivess
  • Added auto-quoting for hyphenated stream names (nginx-logs → "nginx-logs")

bcoz sql returns error for hypen-text

  • Added --from/--to time correct parsing (now, durations, 1d, RFC3339)

Implements full PromQL API coverage for Parseable metrics streams:

  • run — range and instant PromQL queries with text/json output
  • labels — list all label names in a metrics dataset
  • label-values [name] — distinct values for any label (including name)
  • series — find time series matching a label selector
  • cardinality label-names — top labels by number of distinct values
  • cardinality label-values — series count per value for a label
  • cardinality active-series — currently active series (with selector filter)
  • active-queries — show currently executing PromQL queries
  • tsdb — TSDB statistics (total series, label pairs, top metrics/labels)

above queries are in testing phase, most of them are working, still sub quesries and cardinality one are remained to.

Uses HTTP/1.1 forced transport to avoid HTTP/2
framing errors on the staging server. All commands accept --dataset, --from,
--to, and -o (text/json) flags.

Test plan

  • pb query run "" -i opens TUI correctly
  • ctrl+r re-runs query
  • ctrl+c exits
  • Hyphenated stream works
  • --from formats parse correctly

for refrences

Screenshot 2026-05-06 at 8 32 24 PM
Screenshot 2026-05-06 at 8 47 10 PM

@pratik50 pratik50 marked this pull request as draft May 6, 2026 15:21
@pratik50 pratik50 self-assigned this May 6, 2026
@pratik50 pratik50 marked this pull request as ready for review May 14, 2026 06:38
@nikhilsinhaparseable nikhilsinhaparseable merged commit 23a0db9 into parseablehq:main May 14, 2026
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 14, 2026
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.

2 participants