> For the complete documentation index, see [llms.txt](https://docs.snyk.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snyk.io/developer-tools/snyk-cli/commands/config-environment.md).

# Config environment

The snyk config environment command for setting the Snyk API environment

**Note:** This command will be available as of CLI version 1.1293.0.

If you are not in the system default environment, `SNYK-US-01`, use the `snyk config environment` command to set your environment before you run `snyk auth`.

## Usage

`snyk config environment <ENVIRONMENT>`

## Description

The `snyk config environment` command is provided for your convenience to make changing the endpoint used in the CLI easier and safer.

The outcome is almost the same as `snyk config set endpoint=<URL>` but in addition, the `snyk config environment` command does the following:

* Supports aliases for environments to avoid the use of full URLs
* Performs basic checks to avoid ambiguous or unexpected configuration
* Clears existing authentication and Organization settings, which are expected to be environment-specific

## Debug

Use the `-d` option to output the debug logs.

## Option

`--no-check`

Skip the basic checks for ambiguous or unexpected configuration.

Use only if the reported configuration issues are intentional and can be ignored. Otherwise, the configuration might not work as expected.

## Supported environment URLs mappings

* default => <https://api.snyk.io>
* SNYK-US-01 => <https://api.snyk.io>
* SNYK-US-02 => <https://api.us.snyk.io>
* SNYK-AU-01 => <https://api.au.snyk.io>
* SNYK-EU-01 => <https://api.eu.snyk.io>
* SNYK-GOV-01 => <https://api.snykgov.io>

## Examples

```
snyk config environment default
snyk config environment SNYK-EU-01
snyk config environment SNYK-AU-01
snyk config environment SNYK-AU-01 --no-check
snyk config environment https://api.eu.snyk.io
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.snyk.io/developer-tools/snyk-cli/commands/config-environment.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
