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

Bring Replicated CLI docs up-to-date #2955

Closed
wants to merge 14 commits into from
24 changes: 24 additions & 0 deletions docs/partials/replicated-cli/_global-flags.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Help from "./_help.mdx"
import App from "./_app.mdx"
import Token from "./_token.mdx"

<table>
<tr>
<th width="30%">Flag</th>
<th width="20%">Type (if applicable)</th>
<th width="50%">Description</th>
</tr>
<App/>
<Help/>
<tr>
<td>`--integration-test`</td>
<td>string</td>
<td>Set to the name of the integration test to run.</td>
</tr>
<tr>
<td>`--log-api-calls`</td>
<td>string</td>
<td>Log the API calls to the specified file.</td>
</tr>
<Token/>
</table>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add new partial to bring the global flags to every topic

23 changes: 23 additions & 0 deletions docs/reference/replicated-cli-api-get.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# api get

Make adhoc GET requests to the Vendor API v3. Uses your local credentials and prints the response unmodified. For more information, see the [Vendor API v3 documentation](https://replicated-vendor-api.readme.io/reference/createapp).

## Usage

```bash
replicated api get [PATH]
```

Pass the PATH of the request as the final argument. Do not include the host or version. Replicated recommends piping the output to jq for easier reading.

## Global Flags

<GlobalFlags/>

## Example

```bash
replicated api get /v3/apps
```
17 changes: 17 additions & 0 deletions docs/reference/replicated-cli-api-patch.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# api patch

Make adhoc PATCH requests to the Vendor API v3. Uses your local credentials and prints the response unmodified. For more information, see the [Vendor API v3 documentation](https://replicated-vendor-api.readme.io/reference/createapp).

## Usage

```bash
replicated api patch [PATH]
```

Pass the PATH of the request as the final argument. Do not include the host or version. Replicated recommends piping the output to jq for easier reading.

## Global Flags

<GlobalFlags/>
23 changes: 23 additions & 0 deletions docs/reference/replicated-cli-api-post.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# api post

Make adhoc POST requests to the Vendor API v3. Uses your local credentials and prints the response unmodified. For more information, see the [Vendor API v3 documentation](https://replicated-vendor-api.readme.io/reference/createapp).

## Usage

```bash
replicated api post [PATH]
```

Pass the PATH of the request as the final argument. Do not include the host or version. Replicated recommends piping the output to jq for easier reading.

## Global Flags

<GlobalFlags/>

## Example

```bash
replicated api post /v3/app/2EuFxKLDxKjPNk2jxMTmF6Vxvxu/channel -b '{"name":"post-example"}'
```
23 changes: 23 additions & 0 deletions docs/reference/replicated-cli-api-put.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# api put

Make adhoc PUT requests to the Vendor API v3. Uses your local credentials and prints the response unmodified. For more information, see the [Vendor API v3 documentation](https://replicated-vendor-api.readme.io/reference/createapp).

## Usage

```bash
replicated api put [PATH]
```

Pass the PATH of the request as the final argument. Do not include the host or version. Replicated recommends piping the output to jq for easier reading.

## Global Flags

<GlobalFlags/>

## Example

```bash
replicated api put /v3/app/2EuFxKLDxKjPNk2jxMTmF6Vxvxu/channel/2QLPm10JPkta7jO3Z3Mk4aXTPyZ -b '{"name":"put-example"}'
```
30 changes: 12 additions & 18 deletions docs/reference/replicated-cli-api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Help from "../partials/replicated-cli/_help.mdx"
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# api

Expand All @@ -7,42 +7,36 @@ Make adhoc calls to the Vendor API v3. Uses your local credentials and prints th
## Usage

```bash
replicated api [command]
replicated api [command] [flags]
```

Pass the PATH of the request as the final argument. Do not include the host or version. Replicated recommends piping the output to jq for easier reading.

### Available Commands
The following commands are available:

<table>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
<tr>
<td>get</td>
<td>[get](replicated-cli-api-get)</td>
<td>Make adhoc GET API calls to the Vendor API v3</td>
</tr>
<tr>
<td>post</td>
<td>[patch](replicated-cli-api-patch)</td>
<td>Make adhoc PATCH API calls to the Vendor API v3</td>
</tr>
<tr>
<td>[post](replicated-cli-api-post)</td>
<td>Make adhoc POST API calls to the Vendor API v3</td>
</tr>
<tr>
<td>put</td>
<td>[put](replicated-cli-api-put)</td>
<td>Make adhoc PUT API calls to the Vendor API v3</td>
</tr>
</table>

### Flags
## Global Flags

<table>
<tr>
<th width="30%">Flag</th>
<th width="20%">Type (if applicable)</th>
<th width="50%">Description</th>
</tr>
<Help/>
</table>
<GlobalFlags/>

## Examples

Expand Down
15 changes: 4 additions & 11 deletions docs/reference/replicated-cli-app-create.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Token from "../partials/replicated-cli/_token.mdx"
import Help from "../partials/replicated-cli/_help.mdx"
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# app create

Expand All @@ -10,15 +9,9 @@ Create an application.
replicated app create NAME
```

<table>
<tr>
<th width="30%">Flag</th>
<th width="20%">Type (if applicable)</th>
<th width="50%">Description</th>
</tr>
<Help/>
<Token/>
</table>
## Global Flags

<GlobalFlags/>

## Examples
```bash
Expand Down
16 changes: 10 additions & 6 deletions docs/reference/replicated-cli-app-delete.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import Token from "../partials/replicated-cli/_token.mdx"
import Help from "../partials/replicated-cli/_help.mdx"
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# app delete
# app rm (delete)

Delete an application.

## Usage
```bash
replicated app delete NAME
replicated app rm APP_NAME
```
```bash
replicated app delete APP_NAME
```

<table>
Expand All @@ -16,15 +18,17 @@ replicated app delete NAME
<th width="20%">Type (if applicable)</th>
<th width="50%">Description</th>
</tr>
<Help/>
<tr>
<td><code>-f, --force</code></td>
<td></td>
<td>Skip the confirmation prompt. This action cannot be undone.</td>
</tr>
<Token/>
</table>

## Global Flags

<GlobalFlags/>

## Examples
```bash
replicated app delete deletion-example
Expand Down
18 changes: 7 additions & 11 deletions docs/reference/replicated-cli-app-ls.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Token from "../partials/replicated-cli/_token.mdx"
import Help from "../partials/replicated-cli/_help.mdx"
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# app ls

Expand All @@ -9,16 +8,13 @@ List all applications, or specify the application you want to list.
```bash
replicated app ls
```
```bash
replicated app ls APP_NAME
```

## Global Flags

<table>
<tr>
<th width="30%">Flag</th>
<th width="20%">Type (if applicable)</th>
<th width="50%">Description</th>
</tr>
<Help/>
<Token/>
</table>
<GlobalFlags/>

## Examples

Expand Down
13 changes: 6 additions & 7 deletions docs/reference/replicated-cli-channel-create.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import Help from "../partials/replicated-cli/_help.mdx"
import App from "../partials/replicated-cli/_app.mdx"
import Token from "../partials/replicated-cli/_token.mdx"
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# channel create

Create a new channel in your application, and then print the channel.

## Usage
```bash
replicated channel create --name Beta --description 'New features subject to change'
replicated channel create --name CHANNEL_NAME --description 'Channel description'
```

<table>
Expand All @@ -27,11 +25,12 @@ replicated channel create --name Beta --description 'New features subject to cha
<td>string</td>
<td>The name of this channel. <strong>(Required)</strong></td>
</tr>
<Help/>
<App/>
<Token/>
</table>

## Global Flags

<GlobalFlags/>

## Examples
```bash
replicated channel create --name cli-created --description "this is a description for a channel"
Expand Down
22 changes: 8 additions & 14 deletions docs/reference/replicated-cli-channel-delete.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
import Help from "../partials/replicated-cli/_help.mdx"
import App from "../partials/replicated-cli/_app.mdx"
import Token from "../partials/replicated-cli/_token.mdx"
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# channel delete
# channel rm (delete)

Delete (archive) a channel.

## Usage
```bash
replicated channel rm CHANNEL_ID
```
```bash
replicated channel delete CHANNEL_ID
```

:::note
You must use the channel ID to delete the channel, not the channel name.
:::

<table>
<tr>
<th width="30%">Flag</th>
<th width="20%">Type (if applicable)</th>
<th width="50%">Description</th>
</tr>
<Help/>
<App/>
<Token/>
</table>
## Global Flags

<GlobalFlags/>

## Examples
```bash
Expand Down
17 changes: 4 additions & 13 deletions docs/reference/replicated-cli-channel-disable-semver.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import Help from "../partials/replicated-cli/_help.mdx"
import App from "../partials/replicated-cli/_app.mdx"
import Token from "../partials/replicated-cli/_token.mdx"
import GlobalFlags from "../partials/replicated-cli/_global-flags.mdx"

# channel disable-semantic-versioning

Expand All @@ -11,16 +9,9 @@ Disable semantic versioning for a channel.
replicated channel disable-semantic-versioning CHANNEL_ID
```

<table>
<tr>
<th width="30%">Flag</th>
<th width="20%">Type (if applicable)</th>
<th width="50%">Description</th>
</tr>
<Help/>
<App/>
<Token/>
</table>
## Global Flags

<GlobalFlags/>

### Examples
```bash
Expand Down
Loading