Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup readme #32

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 24 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand All @@ -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:

Expand All @@ -41,48 +41,45 @@ 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 <stream-name> --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:

```bash
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:

Expand All @@ -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 <command>
```

![pb help](https://github.com/parseablehq/.github/blob/main/images/pb/help.png?raw=true)
Loading