> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kosli.com/llms.txt
> Use this file to discover all available pages before exploring further.

# kosli config

> Config global Kosli flags values and store them in $HOME/.kosli.yml .  

## Synopsis

```shell theme={"theme":"dracula","languages":{"custom":["/languages/rego.json"]}}
kosli config [flags]
```

Config global Kosli flags values and store them in \$HOME/.kosli.yml .

Flag values are determined in the following order (highest precedence first):

* command line flags on each executed command.
* environment variables.
* custom config file provided with the --config-file flag or the KOSLI\_CONFIG\_FILE env var.
* default config file in \$HOME/.kosli.yml

A config file in the directory a command runs from is never read unless it is named
with --config-file or KOSLI\_CONFIG\_FILE.

You can configure global Kosli flags (the ones that apply to all/most commands) using their dedicated
convenience flags (e.g. --org).

API tokens are stored in the suitable credentials manager on your machine.

Other Kosli flags can be configured using the --set flag which takes a comma-separated list of key=value pairs.
Keys correspond to the specific flag name, capitalized. For instance: --flow would be set using --set FLOW=value

## Flags

| Flag | Type | Description |
| :- | :- | :- |
| `-h`, `--help` | bool | help for config |
| `--set` | stringToString | \[optional] The key-value pairs to tag the resource with. The format is: key=value |
| `--unset` | strings | \[optional] The list of tag keys to remove from the resource. |

## Flags inherited from parent commands

| Flag | Type | Description |
| :- | :- | :- |
| `-a`, `--api-token` | string | The Kosli API token. |
| `-c`, `--config-file` | string | \[optional] The Kosli config file path. Config is read from this path or the default only, never implicitly from the current directory. (default "\$HOME/.kosli.yml") |
| `--debug` | bool | \[optional] Print debug logs to stdout. |
| `-H`, `--host` | string | \[defaulted] The Kosli endpoint. (default "[https://app.kosli.com](https://app.kosli.com)") |
| `--http-proxy` | string | \[optional] The HTTP proxy URL including protocol and port number. e.g. `http://proxy-server-ip:proxy-port` |
| `-r`, `--max-api-retries` | int | \[defaulted] How many times should API calls be retried when the API host is not reachable. (default 3) |
| `--org` | string | The Kosli organization. |
| `-q`, `--quiet` | bool | \[optional] Suppress non-critical warning messages. Errors and normal output are not affected. If both `--quiet` and `--debug` are set, `--debug` wins. |

## Examples Use Cases

These examples all assume that the flags  `--api-token`, `--org`, `--host`, (and `--flow`, `--trail` when required), are [set/provided](/getting_started/install/#assigning-flags-via-environment-variables).

<AccordionGroup>
  <Accordion title="configure global flags in your default config file">
    ```shell theme={"theme":"dracula","languages":{"custom":["/languages/rego.json"]}}
    kosli config --org=yourOrg 
    	--api-token=yourAPIToken 
    	--host=https://app.kosli.com 
    	--debug=false 
    	--max-api-retries=3 
    	--http-proxy=http://192.0.0.1:8080

    ```
  </Accordion>

  <Accordion title="configure non-global flags in your default config file">
    ```shell theme={"theme":"dracula","languages":{"custom":["/languages/rego.json"]}}
    kosli config --set FLOW=yourFlowName

    ```
  </Accordion>

  <Accordion title="remove a key from the default config file">
    ```shell theme={"theme":"dracula","languages":{"custom":["/languages/rego.json"]}}
    kosli config --unset FLOW
    ```
  </Accordion>
</AccordionGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.