From 0a638f0ff3c4ae56a7777286c43953380e6b1062 Mon Sep 17 00:00:00 2001 From: Nitish Tiwari Date: Mon, 23 Oct 2023 09:00:51 +0530 Subject: [PATCH] Cleanup readme --- README.md | 65 ++++++++++++++++++++----------------------------------- 1 file changed, 24 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 7658258..ae630d4 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -## pb +# pb Dashboard 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. pb 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. -![pb banner](https://github.com/parseablehq/.github/blob/main/images/pb/pb.png?raw=true) +[![asciicast](https://asciinema.org/a/DRnnDIzSPRZlmcGfFLwsbdimC.svg)](https://asciinema.org/a/DRnnDIzSPRZlmcGfFLwsbdimC) -### Installation +## Installation pb 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). @@ -17,15 +17,15 @@ wget https://github.com/parseablehq/pb/releases/download/v0.1.0/pb_linux_amd64 - chmod +x pb && mv pb /usr/local/bin ``` -### Usage +## Usage -pb comes configured with `demo` profile as the default. This means you can directly start using pb against the [demo Parseable Server](https://demo.parseable.io). For example, to query the stream `backend` on demo server, run: +pb is configured with `demo` profile as the default. This means you can directly start using pb against the [demo Parseable Server](https://demo.parseable.io). For example, to query: ```bash -pb query backend +pb query -i ``` -#### Profiles +### Profiles To start using pb against your Parseable server, you need to create a profile (a profile is a set of credentials for a Parseable Server instance). You can create a profile using the `pb profile create` command. For example: @@ -41,38 +41,37 @@ You can create as many profiles as you like. To avoid having to specify the prof pb profile default local ``` -![pb profiles](https://github.com/parseablehq/.github/blob/main/images/pb/profile.png?raw=true) +### Query -#### Query +#### Plaintext output -##### Interactive Mode - -To run query/view data in interactive TUI mode use +By default `pb` sends json data to stdout. ```bash -pb query i --duration=5 +pb query "select * from backend" --from=10m --to=now ``` -##### Getting JSON output - -You can also query directly and output json data to stdout. +or specifying time range in rfc3999 ```bash -pb query "select * from table" --from=10m --to=now +pb query "select * from backend" --from=2023-01-00T01:40:00.000Z --to=2023-01-00T01:55:00.000Z ``` -or specifying time range in rfc3999 +Query command outputs data to stdout. Output json is not beautified. Use tool like `jq` to format and filter json output. ```bash -pb query "select * from table" --from=2023-01-00T01:40:00.000Z --to=2023-01-00T01:55:00.000Z +pb query "select * from backend" --from=10m --to=now | jq . ``` -![note] -Query command outputs data to stdout. Output json is not beautified. Use tool like `jq` to format and filter json output. +#### Interactive mode -![pb query](https://github.com/parseablehq/.github/blob/main/images/pb/query.png?raw=true) +To run query/view data in interactive TUI mode use + +```bash +pb query "select * from backend" --from=10m --to=now -i +``` -#### Streams +### Stream Management Once 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: @@ -80,9 +79,7 @@ Once a profile is configured, you can use pb to query and manage _that_ Parseabl pb stream list ``` -![pb streams](https://github.com/parseablehq/.github/blob/main/images/pb/stream.png?raw=true) - -#### Users +### Users To list all the users with their privileges, run: @@ -92,24 +89,10 @@ pb user list You can also use the `pb users` command to manage users. -![pb users](https://github.com/parseablehq/.github/blob/main/images/pb/user.png?raw=true) - -#### Version +### Version Version command prints the version of pb and the Parseable Server it is configured to use. ```bash pb version ``` - -![pb version](https://github.com/parseablehq/.github/blob/main/images/pb/version.png?raw=true) - -#### Help - -To get help on a command, run: - -```bash -pb help -``` - -![pb help](https://github.com/parseablehq/.github/blob/main/images/pb/help.png?raw=true)