pb is the command line interface for Parseable. Use it to query logs with SQL, run PromQL queries on metrics, stream live events, and manage datasets, users, and profiles from your terminal.
Download the binary for your platform from the releases page.
macOS and Linux
Pick the binary for your platform:
| Platform | Binary |
|---|---|
| macOS Apple Silicon (M1, M2, M3) | pb_darwin_arm64 |
| macOS Intel | pb_darwin_amd64 |
| Linux x86 64-bit | pb_linux_amd64 |
| Linux ARM 64-bit | pb_linux_arm64 |
curl -LO https://github.com/parseablehq/pb/releases/latest/download/<binary>
chmod +x <binary>
sudo mv <binary> /usr/local/bin/pbWindows
Download pb_windows_amd64 from the releases page, rename it to pb.exe, and move it to a folder in your PATH.
Using Go
go install github.com/parseablehq/pb@latestVerify the install:
pb --versionStep 1 — Connect to a server
Run pb login to start the interactive setup wizard:
pb loginThe wizard asks for your server URL, auth method (username/password or API key), and a profile name. Use arrow keys to navigate, Enter to confirm, and Esc to go back.
Step 2 — Run your first query
pb query run "SELECT * FROM backend" --from=10m --to=nowProfiles store your server connections. All commands use the active default profile automatically.
Config file location: ~/.config/pb/config.toml on macOS/Linux, %AppData%\pb\config.toml on Windows.
pb login # interactive setup wizard
pb profile add staging https://staging.example.com admin pass # add a profile without prompts
pb profile list # list all saved profiles
pb profile default staging # switch the active profile
pb profile update staging https://new-host.example.com # update a profile URL
pb profile remove staging # remove a profile
pb logout # remove the active profilepb query run "SELECT * FROM backend" --from=10m --to=now
pb query run "SELECT * FROM backend" --from=1h
pb query run "SELECT * FROM backend" --from=2024-01-01T00:00:00Z --to=2024-01-01T01:00:00Z
pb query run "SELECT * FROM backend" --from=1h --output json | jq .
pb query run "SELECT * FROM backend WHERE status = 500" --from=1h --save-as=server-errors
pb query list # list and apply saved queriesOTel fields with dots like service.name and http.status_code work directly in queries without manual quoting.
pb query run -i
pb query run "SELECT * FROM backend" --from=1h -iPanels: Query, Time Range, Table. Navigate with Tab and Shift+Tab.
pb query promql run "rate(http_requests_total[5m])" --dataset otel_metrics --from=1h --step=1m
pb query promql run "up" --dataset otel_metrics --instant
pb query promql run "http_requests_total" --dataset otel_metrics --output jsonExplore labels and series:
pb query promql labels --dataset otel_metrics
pb query promql label-values job --dataset otel_metrics
pb query promql series --match 'http_requests_total{job="api"}' --dataset otel_metricsCardinality analysis:
pb query promql cardinality label-names --dataset otel_metrics
pb query promql active-queriespb query run -i --promql
#or
pb query promql run -i
pb query promql run "http_requests_total" --dataset otel_metrics --from=1h -iPanels: Dataset, Query, Time, Step, Table. Navigate with Tab and Shift+Tab. Press Space on the Step panel to toggle between range and instant mode.
Stream events from a dataset in real time:
pb tail backend
pb tail backend | jq 'select(.level == "error")'
pb tail backend | grep timeoutPress Ctrl+C to stop.
Note: pb tail uses gRPC on port 8001. Make sure that port is open on your server in addition to the main HTTP port.
pb dataset list
pb dataset info my_logs
pb dataset add my_logs
pb dataset remove my_logspb user list
pb user add alice
pb user set-role alice admin,editor
pb user remove alice
pb role list
pb role add ingestors
pb role remove ingestorspb status # check connection and server version
pb version # print client and server version infoBash
pb autocomplete bash > /etc/bash_completion.d/pb
source /etc/bash_completion.d/pbZsh
pb autocomplete zsh > /usr/local/share/zsh/site-functions/_pb
autoload -Uz compinit && compinitPowerShell
pb autocomplete powershell > $env:USERPROFILE\Documents\PowerShell\pb_complete.ps1
. $env:USERPROFILE\Documents\PowerShell\pb_complete.ps1Contributions are welcome. Please read CONTRIBUTING.md for setup instructions, branch naming conventions, and the PR checklist. All contributors must sign the CLA — the bot will prompt you on your first PR.
pb is released under the GNU Affero General Public License v3.0.