pb CLI
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.
Start here
Install pb
Install on macOS, Linux, or Windows.
Connect to a server
Authenticate and save a server profile.
Query and monitor
Query logs with SQL
Search datasets, save queries, or use the interactive table.
Query metrics with PromQL
Run expressions and explore metric series.
Tail live events
Stream new log events as they arrive.
Manage and automate
Manage datasets
Create, inspect, and remove datasets.
Manage users and roles
Configure access to your Parseable instance.
Aliases and reference
Find short commands and the full command surface.
Use pb with AI agents
Set up read-only agent access through a saved profile.
First commands
If you followed the local quickstart, you already have a demo dataset. Connect to that server, then list datasets and query the event you sent. The connection guide covers self-hosted and Cloud authentication; for Cloud, use a dataset in your workspace instead of demo.
pb login
pb status
pb dataset list
pb sql run "SELECT * FROM demo" --from=1hThe quickstart creates a logs dataset, not a metrics dataset. To run PromQL, first ingest metrics and use a dataset and metric name that exist on your server. See Query metrics with PromQL.
To watch new events in demo, run pb tail demo, then send another event to that dataset.
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 -ipb promql run -iNavigate 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 jsonWas this page helpful?