{"id":21001088,"url":"https://github.com/parseablehq/pb","last_synced_at":"2025-05-14T23:32:22.237Z","repository":{"id":187627387,"uuid":"668539146","full_name":"parseablehq/pb","owner":"parseablehq","description":"CLI client for Parseable server. Inspect, query and analyse Parseable log data from your terminal.","archived":false,"fork":false,"pushed_at":"2024-11-12T08:38:29.000Z","size":238,"stargazers_count":15,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-12T09:29:17.928Z","etag":null,"topics":["analytics","cli","go","hacktoberfest","logging"],"latest_commit_sha":null,"homepage":"https://parseable.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parseablehq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["parseable","operator"]}},"created_at":"2023-07-20T03:50:46.000Z","updated_at":"2024-11-12T08:38:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"679c5276-827d-4fe7-a417-856823d8f5b4","html_url":"https://github.com/parseablehq/pb","commit_stats":null,"previous_names":["parseablehq/pb"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseablehq%2Fpb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseablehq%2Fpb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseablehq%2Fpb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parseablehq%2Fpb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parseablehq","download_url":"https://codeload.github.com/parseablehq/pb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225316314,"owners_count":17455232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","cli","go","hacktoberfest","logging"],"created_at":"2024-11-19T08:13:38.177Z","updated_at":"2024-11-19T08:13:38.803Z","avatar_url":"https://github.com/parseablehq.png","language":"Go","funding_links":["https://github.com/sponsors/parseable","https://github.com/sponsors/operator"],"categories":[],"sub_categories":[],"readme":"# pb\n\nDashboard fatigue is one of key reasons for poor adoption of logging tools among developers. With pb, we intend to bring the familiar command line interface for querying and analyzing log data at scale.\n\npb is the command line interface for [Parseable Server](https://github.com/parseablehq/parseable). pb allows you to manage Streams, Users, and Data on Parseable Server. You can use pb to manage multiple Parseable Server instances using Profiles.\n\n![pb](https://github.com/parseablehq/.github/blob/main/images/pb/pb.gif?raw=true)\n\n## Installation\n\npb is available as a single, self contained binary for Mac, Linux, and Windows. You can download the latest version from the [releases page](https://github.com/parseablehq/pb/releases/latest).\n\nTo install pb, download the binary for your platform, un-tar the binary and place it in your `$PATH`.\n\n## Usage\n\npb is configured with `demo` profile as the default. This means you can directly start using pb against the [demo Parseable Server](https://demo.parseable.com).\n\n### Profiles\n\nTo start using pb against your Parseable server, create a profile (a profile is a set of credentials for a Parseable Server instance). You can create a profile using the `pb profile add` command. For example:\n\n```bash\npb profile add local http://localhost:8000 admin admin\n```\n\nThis will create a profile named `local` that points to the Parseable Server at `http://localhost:8000` and uses the username `admin` and password `admin`.\n\nYou can create as many profiles as you like. To avoid having to specify the profile name every time you run a command, pb allows setting a default profile. To set the default profile, use the `pb profile default` command. For example:\n\n```bash\npb profile default local\n```\n\n### Query\n\nBy default `pb` sends json data to stdout.\n\n```bash\npb query run \"select * from backend\" --from=1m --to=now\n```\n\nor specifying time range in rfc3999\n\n```bash\npb query run \"select * from backend\" --from=2024-01-00T01:40:00.000Z --to=2024-01-00T01:55:00.000Z\n```\n\nYou can use tools like `jq` and `grep` to further process and filter the output. Some examples:\n\n```bash\npb query run \"select * from backend\" --from=1m --to=now | jq .\npb query run \"select host, id, method, status from backend where status = 500\" --from=1m --to=now | jq . \u003e 500.json\npb query run \"select host, id, method, status from backend where status = 500\" | jq '. | select(.method == \"PATCH\")'\npb query run \"select host, id, method, status from backend where status = 500\" --from=1m --to=now | grep \"POST\" | jq . | less\n```\n\n#### Save Filter\n\nTo save a query as a filter use the `--save-as` flag followed by a name for the filter. For example:\n\n```bash\npb query run \"select * from backend\" --from=1m --to=now --save-as=FilterName\n```\n\n### List Filter\n\nTo list all filter for the active user run:\n\n```bash\npb query list\n```\n\n### Live Tail\n\n`pb` can be used to tail live data from Parseable Server. To tail live data, use the `pb tail` command. For example:\n\n```bash\npb tail backend\n```\n\nYou can also use the terminal tools like `jq` and `grep` to filter and process the tail output. Some examples:\n\n```bash\npb tail backend | jq '. | select(.method == \"PATCH\")'\npb tail backend | grep \"POST\" | jq .\n```\n\nTo stop tailing, press `Ctrl+C`.\n\n### Stream Management\n\nOnce a profile is configured, you can use pb to query and manage _that_ Parseable Server instance. For example, to list all the streams on the server, run:\n\n```bash\npb stream list\n```\n\n### Users\n\nTo list all the users with their privileges, run:\n\n```bash\npb user list\n```\n\nYou can also use the `pb users` command to manage users.\n\n### Version\n\nVersion command prints the version of pb and the Parseable Server it is configured to use.\n\n```bash\npb version\n```\n\n### Add Autocomplete\n\nTo enable autocomplete for pb, run the following command according to your shell:\n\nFor bash:\n\n```bash\npb autocomplete bash \u003e /etc/bash_completion.d/pb\nsource /etc/bash_completion.d/pb\n```\n\nFor zsh:\n\n```zsh\npb autocomplete zsh \u003e /usr/local/share/zsh/site-functions/_pb\nautoload -U compinit \u0026\u0026 compinit\n```\n\nFor powershell\n\n```powershell\npb autocomplete powershell \u003e $env:USERPROFILE\\Documents\\PowerShell\\pb_complete.ps1\n. $PROFILE\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparseablehq%2Fpb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparseablehq%2Fpb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparseablehq%2Fpb/lists"}