Skip to content

Commit

Permalink
Add docs for minder CLI configuration (#2031)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdimitrov authored Dec 22, 2023
1 parent 216c05d commit 9d06230
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions docs/docs/how-to/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Minder CLI configuration
sidebar_position: 80
---

# Minder CLI configuration

The Minder CLI application is configured using a YAML file. The default location for the configuration file
is `$PWD/config.yaml`. You can specify a different location using the `--config` flag. If there's no configuration
file at the specified location, the CLI application will use its default values.

## Prerequisites

* The `minder` CLI application
* A Stacklok account

## Configuration file example

Below is an example configuration file. The `grpc_server` section configures the gRPC server that the CLI
application will connect to. The `identity` section configures the issuer URL and client ID for the
Stacklok Identity service.

```yaml
---
# Minder CLI configuration
# gRPC server configuration
grpc_server:
host: "127.0.0.1"
port: 8090

identity:
cli:
issuer_url: http://localhost:8081
client_id: minder-cli
---
```

## Handle multiple contexts using a configuration file

The Minder CLI can be configured to use multiple contexts. A context is a set of configuration values that
are used to define a context, i.e. connect to a specific Minder server. For example, you may have a context for your local
development environment, a context for your staging environment, and a context for your production
environment. You can also specify things like the default `provider`, `project` or preferred format `output`
for each of those.

To create a new context, create a new configuration file and specify it through the `--config` flag when running the
CLI application. For example, you can create your staging configuration in `config-staging.yaml` and use it:

```bash
minder auth login --config ./config-staging.yaml
```

0 comments on commit 9d06230

Please sign in to comment.