# How to Configure Continue

> Learn how to access and manage Continue configurations through Hub or local YAML files

You can easily access your configuration from the Continue Chat sidebar. Open the sidebar by pressing <kbd>cmd/ctrl</kbd> + <kbd>L</kbd> (VS Code) or <kbd>cmd/ctrl</kbd> + <kbd>J</kbd> (JetBrains) and click the Agent selector above the main chat input. Then, you can hover over an agent and click the `new window` (hub agents) or `gear` (local agents) icon.

<img src="https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ntSEd9WNtsShi0gX/images/configure-continue.png?fit=max&auto=format&n=ntSEd9WNtsShi0gX&q=85&s=c177be7635a7749e2f0546f1c166d6d8" alt="configure" data-og-width="750" width="750" data-og-height="514" height="514" data-path="images/configure-continue.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ntSEd9WNtsShi0gX/images/configure-continue.png?w=280&fit=max&auto=format&n=ntSEd9WNtsShi0gX&q=85&s=c0ceceb7f2dffec627fe3369c509ca8b 280w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ntSEd9WNtsShi0gX/images/configure-continue.png?w=560&fit=max&auto=format&n=ntSEd9WNtsShi0gX&q=85&s=96d6cd82d80d5a84bf1905e3ad8778b0 560w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ntSEd9WNtsShi0gX/images/configure-continue.png?w=840&fit=max&auto=format&n=ntSEd9WNtsShi0gX&q=85&s=eb27107730bb279b08fb3fc83f7ffc00 840w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ntSEd9WNtsShi0gX/images/configure-continue.png?w=1100&fit=max&auto=format&n=ntSEd9WNtsShi0gX&q=85&s=86008751e16bf2c1b649ab859b1edb6f 1100w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ntSEd9WNtsShi0gX/images/configure-continue.png?w=1650&fit=max&auto=format&n=ntSEd9WNtsShi0gX&q=85&s=9cda11df25671174347abb2b41791cc1 1650w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ntSEd9WNtsShi0gX/images/configure-continue.png?w=2500&fit=max&auto=format&n=ntSEd9WNtsShi0gX&q=85&s=7315e8b42917b6764a2fb6069692747d 2500w" />

## How to Manage Hub Configs

Hub Configs can be managed in [the Hub](https://hub.continue.dev). See [Editing a config](/hub/configs/edit-a-config)

## How to Configure Local Configs with YAML

Local user-level configuration is stored and can be edited in your home directory in `config.yaml`:

* `~/.continue/config.yaml` (MacOS / Linux)
* `%USERPROFILE%\.continue\config.yaml` (Windows)

To open this `config.yaml`, you need to open the configs dropdown in the top-right portion of the chat input. On that dropdown beside the "Local Config" option, select the cog icon. It will open the local `config.yaml`.

<img src="https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ioCf1VgjqEdbuaXq/images/local-config-open-steps.png?fit=max&auto=format&n=ioCf1VgjqEdbuaXq&q=85&s=9dec31d84633a5395605e436986b6c30" alt="local-config-open-steps" data-og-width="778" width="778" data-og-height="484" height="484" data-path="images/local-config-open-steps.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ioCf1VgjqEdbuaXq/images/local-config-open-steps.png?w=280&fit=max&auto=format&n=ioCf1VgjqEdbuaXq&q=85&s=7db886eeec4162b51f0ede668cebdca0 280w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ioCf1VgjqEdbuaXq/images/local-config-open-steps.png?w=560&fit=max&auto=format&n=ioCf1VgjqEdbuaXq&q=85&s=e3363477ee6b1f544f4db976c402ccb5 560w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ioCf1VgjqEdbuaXq/images/local-config-open-steps.png?w=840&fit=max&auto=format&n=ioCf1VgjqEdbuaXq&q=85&s=206f52906a78f1255e87980b0a101ed8 840w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ioCf1VgjqEdbuaXq/images/local-config-open-steps.png?w=1100&fit=max&auto=format&n=ioCf1VgjqEdbuaXq&q=85&s=f4449745f697dacaf661e7d06dc2264c 1100w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ioCf1VgjqEdbuaXq/images/local-config-open-steps.png?w=1650&fit=max&auto=format&n=ioCf1VgjqEdbuaXq&q=85&s=34e78ea37721bd10e23a2de78d56d13e 1650w, https://mintcdn.com/continue-docs-snyk-upgrade-1183084409b0325aa3a95aa5132419f2/ioCf1VgjqEdbuaXq/images/local-config-open-steps.png?w=2500&fit=max&auto=format&n=ioCf1VgjqEdbuaXq&q=85&s=0bf218fd9da6c2eae87facbdf7fcfdd8 2500w" />

When editing this file, you can see the available options suggested as you type, or check the reference below. When you save a config file from the IDE, Continue will automatically refresh to take into account your changes. A config file is automatically created the first time you use Continue, and always automatically generated with default values if it doesn't exist.

See the full reference for `config.yaml` [here](/reference).

## Legacy Configuration Methods (Deprecated)

<Info>
  View the `config.json` migration guide [here](/reference/yaml-migration)
</Info>

* [`config.json`](/reference) - The original configuration format which is stored in a file at the same location as `config.yaml`
* [`.continuerc.json`](#how-to-use-continuercjson-for-workspace-configuration) - Workspace-level configuration
* [`config.ts`](#how-to-use-configts-for-advanced-configuration) - Advanced configuration (probably unnecessary) - a TypeScript file in your home directory that can be used to programmatically modify (*merged*) the `config.json` schema:
  * `~/.continue/config.ts` (MacOS / Linux)
  * `%USERPROFILE%\.continue\config.ts` (Windows)

### How to Use `.continuerc.json` for Workspace Configuration

The format of `.continuerc.json` is the same as `config.json`, plus one *additional* property `mergeBehavior`, which can be set to either "merge" or "overwrite". If set to "merge" (the default), `.continuerc.json` will be applied on top of `config.json` (arrays and objects are merged). If set to "overwrite", then every top-level property of `.continuerc.json` will overwrite that property from `config.json`.

Example

```json title=".continuerc.json" theme={null}
{
  "tabAutocompleteOptions": {
    "disable": true
  },
  "mergeBehavior": "overwrite"
}
```

### How to Use `config.ts` for Advanced Configuration

`config.yaml` or `config.json` can handle the vast majority of necessary configuration, so we recommend using it whenever possible. However, if you need to programmatically extend Continue configuration, you can use a `config.ts` file, placed at `~/.continue/config.ts` (MacOS / Linux) or `%USERPROFILE%\.continue\config.ts` (Windows).

`config.ts` must export a `modifyConfig` function, like:

<Warning>
  The `slashCommands` array shown below is deprecated. For creating custom slash
  commands, use [prompt files](./prompts) instead.
</Warning>

```ts title="config.ts" theme={null}
export function modifyConfig(config: Config): Config {
  config.slashCommands?.push({
    name: "commit",
    description: "Write a commit message",
    run: async function* (sdk) {
      // The getDiff function takes a boolean parameter that indicates whether
      // to include unstaged changes in the diff or not.
      const diff = await sdk.ide.getDiff(false); // Pass false to exclude unstaged changes
      for await (const message of sdk.llm.streamComplete(
        `${diff}\n\nWrite a commit message for the above changes. Use no more than 20 tokens to give a brief description in the imperative mood (e.g. 'Add feature' not 'Added feature'):`,
        new AbortController().signal,
        {
          maxTokens: 20,
        },
      )) {
        yield message;
      }
    },
  });
  return config;
}
```
