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

Document a couple missing rover commands #1157

Merged
merged 3 commits into from
Jun 29, 2022
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions docs/source/_redirects
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
/supergraphs/ /docs/rover/commands/supergraphs/
/subgraphs/ /docs/rover/commands/subgraphs/
/readmes/ /docs/rover/commands/readmes/
/graphs/ /docs/rover/commands/graphs/
/essentials/ /docs/rover/conventions/
77 changes: 77 additions & 0 deletions docs/source/commands/config.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Rover config commands
description: Create and manage configuration profiles
---

The Rover CLI enables you to create multiple **configuration profiles**, each of which corresponds to a different identity in Apollo Studio. Each configuration profile has an associated [API key](/studio/api-keys), which determines its permissions. You manage your configuration profiles with the `rover config` set of commands.

## Displaying configuration profiles

### `config list`

The `config list` command lists all of your stored configuration profiles:

```
rover config list

Profiles:

default
sso
```

### `config whoami`

The `config whoami` command displays the details of your current active configuration profile:

```
rover config whoami

Checking identity of your API key against the registry.
Key Type: USER
User ID: gh.StephenBarlow
Origin: --profile default
API Key: user************************************abcd
```

## Creating configuration profiles

### `config auth`

You create a new configuration profile with the `config auth` command:

```
rover config auth

Go to https://studio.apollographql.com/user-settings and create a new Personal API Key.
Copy the key and paste it into the prompt below.
>
```

By default, your configuration profile is saved with the name `default`. You can specify a different name with the `--profile` option:

```
rover config auth --profile sso
```

## Deleting configuration profiles

### `config delete`

The `config delete` command deletes a single configuration profile, specified by its name:

```
rover config delete sso

Successfully deleted profile "sso"
```

### `config clear`

The `config clear` command deletes **all** of your stored configuration profiles:

```
rover config clear

Successfully cleared all configuration.
```
23 changes: 23 additions & 0 deletions docs/source/commands/explain.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: The Rover explain command
description: Understand Rover error codes
---

Usually when a Rover command results in an error, the command's output includes an error code:

```sh {4}
rover supergraph compose --config supergraph.yaml

Composing supergraph with Federation v2.0.5.
error[E029]: Encountered 1 build error while trying to build a supergraph.
```

The command above resulted in an error with code `E029`.

You can use the `rover explain` command to output the description for a particular error code:

```
rover explain E029
```

Descriptions for _all_ Rover error codes are also available in [this article](../errors/).
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 6 additions & 4 deletions docs/source/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
"Contributing": "/contributing",
"Migrating from the Apollo CLI": "/migration",
"Commands": {
"graph": "/graphs",
"readme": "/readmes",
"subgraph": "/subgraphs",
"supergraph": "/supergraphs"
"config": "/commands/config",
"explain": "/commands/explain",
"graph": "/commands/graphs",
"readme": "/commands/readmes",
"subgraph": "/commands/subgraphs",
"supergraph": "/commands/supergraphs"
},
"Reference": {
"Error codes": "/errors"
Expand Down
2 changes: 2 additions & 0 deletions docs/source/configuring.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ To view all commands for working with configuration profiles, run the following
rover config --help
```

> [Learn more about `rover config` commands](./commands/config/).

## Logging

Rover supports the following levels of logging, in descending order of severity:
Expand Down