Skip to content

Commit

Permalink
Changed global output flag name (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
evyatarmeged committed May 24, 2023
1 parent 18be19c commit ec589f4
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 42 deletions.
8 changes: 4 additions & 4 deletions docs/_common/install-otterize-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ brew install otterize/otterize/otterize-cli
<TabItem value="Apple Silicon" label="Apple Silicon">

```bash
curl -LJO https://get.otterize.com/otterize-cli/v0.1.24/otterize_macOS_arm64_notarized.zip
curl -LJO https://get.otterize.com/otterize-cli/v0.1.25/otterize_macOS_arm64_notarized.zip
tar xf otterize_macOS_arm64_notarized.zip
sudo cp otterize /usr/local/bin # optionally move to PATH
```
</TabItem>
<TabItem value="Intel 64-bit" label="Intel 64-bit">

```bash
curl -LJO https://get.otterize.com/otterize-cli/v0.1.24/otterize_macOS_x86_64_notarized.zip
curl -LJO https://get.otterize.com/otterize-cli/v0.1.25/otterize_macOS_x86_64_notarized.zip
tar xf otterize_macOS_x86_64_notarized.zip
sudo cp otterize /usr/local/bin # optionally move to PATH
```
Expand All @@ -42,7 +42,7 @@ scoop install otterize-cli
<TabItem value="64-bit" label="64-bit">

```PowerShell
Invoke-WebRequest -Uri https://get.otterize.com/otterize-cli/v0.1.24/otterize_Windows_x86_64.zip -OutFile otterize_Windows_x86_64.zip
Invoke-WebRequest -Uri https://get.otterize.com/otterize-cli/v0.1.25/otterize_Windows_x86_64.zip -OutFile otterize_Windows_x86_64.zip
Expand-Archive otterize_Windows_x86_64.zip -DestinationPath .
# optionally move to PATH
```
Expand All @@ -54,7 +54,7 @@ Expand-Archive otterize_Windows_x86_64.zip -DestinationPath .
<TabItem value="64-bit" label="64-bit">

```bash
wget https://get.otterize.com/otterize-cli/v0.1.24/otterize_Linux_x86_64.tar.gz
wget https://get.otterize.com/otterize-cli/v0.1.25/otterize_Linux_x86_64.tar.gz
tar xf otterize_Linux_x86_64.tar.gz
sudo cp otterize /usr/local/bin # optionally move to PATH
```
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/_show_mapped_istio_traffic_cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Note the HTTP-level details in the `list` and `export` results. For example, the

1. Export as JSON the pod-to-pod network map built up so far:
```shell
otterize network-mapper export -n otterize-tutorial-istio-mapping --output json
otterize network-mapper export -n otterize-tutorial-istio-mapping --format json
```

2. For the simple example above, you should see:
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/_show_mapped_traffic_cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ of the example above.

1. Export as JSON the pod-to-pod network map built up so far:
```shell
otterize network-mapper export -n otterize-tutorial-mapper --output json
otterize network-mapper export -n otterize-tutorial-mapper --format json
```
2. For the simple example above, you should see:

Expand Down
71 changes: 35 additions & 36 deletions docs/reference/cli/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ The following are the commands offered by the Otterize CLI.

## Command structure

Most CLI commands are of the form `otterize NOUN VERB` where the `NOUN` is the type of object (e.g. `intents`, `clusters`) and the `VERB` is the operation being performed.
Most CLI commands are of the form `otterize NOUN VERB` where the `NOUN` is the type of object (e.g. `intents`, `clusters`) and the `VERB` is the operation being performed.
Putting the `NOUN` first makes the auto-completion and documentation built into the CLI easier to consume: you first choose the type of object you are interested in,
then the built-in auto-completion or documentation shows you the options on that type of object.
then the built-in auto-completion or documentation shows you the options on that type of object.

- `otterize -h` or `otterize --help` lists the various object types.
- `otterize NOUN -h` or `otterize NOUN --help` offers help on the specified object type.
Expand All @@ -45,21 +45,20 @@ For more information see the [Usage telemetry Documentation](https://docs.otteri

The following options apply to all CLI commands.

| Name | Default | Description |
| --- | --- | --- |
| `-h` or `--help` | | Get help on any command. |
| `--api-address` | `https://app.otterize.com/api` | The URL for the Otterize API endpoint. |
| `--client-id` | | Set the client id, for use in authenticating API calls. |
| `--client-secret` | | Set the client secret, for use in authenticating API calls. |
| `--config` | `~/.otterize/config` | Use the given path for the Otterize CLI config file. |
| `--debug` | | Show debug logs. |
| `--interactive` | true | Ask for missing flags interactively. |
| `--org-id` | | Use the given organization id when calling the Otterize API. |
| `--output` | text | Output the results of the command as text (`text`) or JSON (`json`). |
| `-q` or `--quiet` | | Suppress printing the results of the command. |
| `--token` | | The token to use in authenticating API calls. |
| `--telemetry-enabled` | true | Whether to enable sending of anonymous usage telemetry to Otterize or not. |

| Name | Default | Description |
|-----------------------|--------------------------------|----------------------------------------------------------------------------|
| `-h` or `--help` | | Get help on any command. |
| `--api-address` | `https://app.otterize.com/api` | The URL for the Otterize API endpoint. |
| `--client-id` | | Set the client id, for use in authenticating API calls. |
| `--client-secret` | | Set the client secret, for use in authenticating API calls. |
| `--config` | `~/.otterize/config` | Use the given path for the Otterize CLI config file. |
| `--debug` | | Show debug logs. |
| `--interactive` | true | Ask for missing flags interactively. |
| `--org-id` | | Use the given organization id when calling the Otterize API. |
| `--format` | text | Output the results of the command as text (`text`) or JSON (`json`). |
| `-q` or `--quiet` | | Suppress printing the results of the command. |
| `--token` | | The token to use in authenticating API calls. |
| `--telemetry-enabled` | true | Whether to enable sending of anonymous usage telemetry to Otterize or not. |

## Network mapper

Expand All @@ -68,11 +67,11 @@ for each command.

#### Common options

| Name | Default | Description |
| --- | --- | --- |
| `--mapper-namespace` | `otterize-system` | Specifies the namespace where the mapper service was installed. |
| `--mapper-service-name` | `otterize-network-mapper` | Specifies the name of the mapper service as it was installed. |
| `--mapper-service-name` | `otterize-service-port` | Specifies the port on which the mapper service is listening. |
| Name | Default | Description |
|-------------------------|---------------------------|-----------------------------------------------------------------|
| `--mapper-namespace` | `otterize-system` | Specifies the namespace where the mapper service was installed. |
| `--mapper-service-name` | `otterize-network-mapper` | Specifies the name of the mapper service as it was installed. |
| `--mapper-service-name` | `otterize-service-port` | Specifies the port on which the mapper service is listening. |


### `otterize network-mapper reset`
Expand All @@ -86,9 +85,9 @@ as a list of clients and the servers they call.

#### Options

| Name | Default | Description |
| --- | --- | --- |
| `-n` or `--namespaces` | | Include only clients in these namespaces (comma-separated). |
| Name | Default | Description |
|------------------------|---------|-------------------------------------------------------------|
| `-n` or `--namespaces` | | Include only clients in these namespaces (comma-separated). |

#### Returns

Expand Down Expand Up @@ -126,11 +125,11 @@ Uses GraphViz (specifically go-graphviz) to generate the image.

#### Options

| Name | Default | Description |
| --- | --- | --- |
| `--format` | `png` | Image output format: "png" or "jpg". |
| `-n` or `--namespaces` | | Include only clients in these namespaces (comma-separated). |
| `-o` or `--output-path` | | Filename for the image. |
| Name | Default | Description |
|-------------------------|---------|-------------------------------------------------------------|
| `--format` | `png` | Image output format: "png" or "jpg". |
| `-n` or `--namespaces` | | Include only clients in these namespaces (comma-separated). |
| `-o` or `--output-path` | | Filename for the image. |

#### Returns

Expand All @@ -144,12 +143,12 @@ as YAML [client intents file(s)](/reference/intents-and-intents-files/#intents-f

#### Options

| Name | Default | Description |
| --- | --- | --- |
| `--format` | `yaml` | Specifies the format for the export: "yaml" or "json". |
| `-n` or `--namespaces` | | Export only clients in these namespaces (comma-separated). |
| `-o` or `--output` | `STDOUT` | Filename or directory for redirecting the output. |
| `--output-type` | `single-file` | Whether the output should be written as a single file (`single-file`) or as multiple files in a directory (`dir`). Requires the `-o` or `--output` to point to a directory. |
| Name | Default | Description |
|------------------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--format` | `yaml` | Specifies the format for the export: "yaml" or "json". |
| `-n` or `--namespaces` | | Export only clients in these namespaces (comma-separated). |
| `-o` or `--output` | `STDOUT` | Filename or directory for redirecting the output. |
| `--output-type` | `single-file` | Whether the output should be written as a single file (`single-file`) or as multiple files in a directory (`dir`). Requires the `-o` or `--output` to point to a directory. |

#### Returns

Expand Down

0 comments on commit ec589f4

Please sign in to comment.