Parseable

pb CLI

Query logs, explore metrics, tail live events, and manage Parseable from your terminal.


pb is the official command line interface for self-hosted Parseable and Parseable Cloud. It gives you a terminal-first way to connect to a server, run SQL and PromQL queries, tail live events, manage datasets, and work with users and roles.

You can use it in scripts and CI, or open the interactive terminal views when you want to explore logs and metrics without switching to the browser.

Quick start

# Connect to a Parseable server
pb login

# Open the interactive SQL table view
pb sql run -i

# Run SQL directly
pb sql run "SELECT * FROM backend WHERE status >= 500" --from=1h

# Open the interactive PromQL table view
pb promql run -i

# Run PromQL directly
pb promql run "rate(http_requests_total[5m])" --dataset otel_metrics --from=1h

# Stream live events
pb tail backend

Commands

CommandDescription
pb loginStart an interactive wizard to connect to a Parseable server and save the connection as a profile
pb cloud profileAdd a Parseable Cloud profile with a Cloud API key
pb profileAdd, list, switch, update, and remove saved server profiles
pb statusVerify the active connection and display server version information
pb sqlRun SQL queries, save SQL queries, and open the interactive SQL table view
pb promqlRun PromQL range and instant queries, explore labels and series, and inspect cardinality
pb tailStream live log events from a dataset in real time as newline-delimited JSON
pb datasetList, create, inspect, and delete log, metrics, and traces datasets
pb userCreate users, assign roles, and manage user access
pb roleDefine roles with specific privilege levels and dataset scopes
pb versionPrint the CLI version and build commit

Interactive mode

SQL and PromQL both support an interactive full-screen TUI with -i. In this mode, pb opens a panel-based interface where you can write a query, select a dataset, adjust the time range, and browse paginated results.

pb sql run -i
pb promql run -i

Navigate between panels with Tab and Shift+Tab. Press Ctrl+R to run the query. Results open in a scrollable table where you can move through rows, inspect columns, and filter what you see.

Output modes

Commands that return structured data support --output json, which makes them easier to use in scripts and automation. SQL queries without -i print directly in the terminal. Add -i when you want the interactive table view instead.

pb dataset list
pb dataset list --output json
pb sql run "SELECT * FROM logs LIMIT 50" --from=1h
pb sql run "SELECT * FROM logs LIMIT 50" --from=1h -i
pb sql run "SELECT level, count(*) FROM logs GROUP BY level" --from=1h --output json
pb promql run "up" --dataset otel_metrics --instant --output json

Getting started

  1. Install pb - install with the script, Homebrew, or a release archive
  2. Connect to a server - authenticate and save a server profile
  3. Run a SQL query - query logs with pb sql
  4. Run a PromQL query - query metrics with pb promql
  5. Use aliases - learn the short command forms such as ls, rm, stat, and set-url
  6. Use pb with AI agents - configure safe, read-only agent access

Was this page helpful?

On this page