正式なドキュメントは英語版であり、この日本語訳はAI支援翻訳により作成された参考用のものです。日本語訳の一部の内容は人間によるレビューがまだ行われていないため、翻訳のタイミングにより英語版との間に差異が生じることがあります。最新かつ正確な情報については、英語版をご参照ください。
ドキュメントに関する現在のご利用体験についてお聞かせください。アンケートにご協力ください。

GitLab Duo CLI settings

  • Tier: Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

You can change how the GitLab Duo CLI behaves in the following ways:

Settings panel

To change a setting:

  1. In interactive mode, type /settings and press Enter.
  2. Use the arrow keys to navigate the list of settings.
  3. To change the selected setting, press Enter or Space.
  4. To close the panel, press Escape.

Changes persist across sessions in the settings file. If your organization enforces a setting, the panel shows Set by your organization and you can’t change it.

The following settings are available:

SettingDescription
TelemetrySend anonymous usage data to improve GitLab Duo.
NotificationsControl system notifications (auto or disabled).
Show work items on session startDisplay your open work items when you start a new session.
Run suggested prompts as /goal sessionsRun suggested prompts as /goal sessions instead of plain chat messages. A restart is required for changes to take effect.
ThemeChange the theme setting. Options include auto, dark, light, dark high contrast, and light high contrast.

Settings file

The GitLab Duo CLI stores the settings you change in the /settings panel in a settings file. You can also edit the file directly, or create it in advance, for example in a container image.

The GitLab Duo CLI reads the file when it starts. Changes you make to the file apply the next time you start the GitLab Duo CLI.

File location

The file location depends on your operating system:

Operating systemPath
Linux and macOS~/.gitlab/duo/settings.json
Windows%APPDATA%\GitLab\duo\settings.json

If you have set XDG_CONFIG_HOME, the file is $XDG_CONFIG_HOME/gitlab/duo/settings.json.

The GitLab Duo CLI creates the file the first time you change a setting in the /settings panel.

File format

The file must contain a JSON object, and can include comments (// and /* */) and trailing commas. When you change a setting in the /settings panel, the GitLab Duo CLI keeps your comments, formatting, and any keys it does not recognize.

The following example sets every setting to its default value:

json
{
  "telemetry": {
    "enabled": true
  },
  "showWorkItemsInNewSessions": true,
  "goalFlowInWelcomePrompts": true,
  "notifications": {
    "channel": "auto" // or "disabled"
  },
  "theme": "auto" // or "dark", "light", "dark-high-contrast", "light-high-contrast"
}

Invalid files and values

The GitLab Duo CLI never deletes or rewrites the file to fix it:

  • If the file is not valid JSON, the GitLab Duo CLI ignores the whole file and logs a warning.
  • If a setting has an invalid value, the GitLab Duo CLI ignores that setting and logs a warning.
  • If the GitLab Duo CLI does not recognize a setting, for example one from a newer version, it ignores that setting.

If the file is read-only, changes you make in the /settings panel apply to the current session only.

Managed settings file

To enforce settings, system administrators deploy a managed settings file to each machine. For example, they can use a mobile device management tool or group policy.

Settings in the managed settings file take precedence over command-line options, environment variables, and the settings file, including changes users make in the settings panel.

Enforced settings cannot be changed by users. Settings not in the file remain under user control.

File location

The GitLab Duo CLI reads the file from a fixed location that can’t be changed:

Operating systemPath
Linux and other operating systems/etc/gitlab/duo/settings.managed.json
macOS/Library/Application Support/GitLab/duo/settings.managed.json
WindowsC:\Program Files\GitLab\duo\settings.managed.json

Restrict write access to system administrators and grant read-only access to all other users.

The GitLab Duo CLI reads the file when it starts. Changes to the file apply the next time users start the GitLab Duo CLI.

In Windows Subsystem for Linux (WSL), the GitLab Duo CLI reads the Linux path inside the distribution, and Windows group policy does not apply.

File format

The file must contain a JSON object, and can include comments (// and /* */) and trailing commas.

The following example sets every setting you can enforce:

json
{
  "telemetry": {
    "enabled": false
  },
  "showWorkItemsInNewSessions": true,
  "goalFlowInWelcomePrompts": true,
  "notifications": {
    "channel": "auto" // or "disabled"
  },
}

Settings precedence

For each setting, the GitLab Duo CLI uses the first value it finds, in this order:

  1. The managed settings file, if your organization enforces the setting.
  2. Command-line options and environment variables, which apply to the current session only.
  3. The settings file.
  4. The default value.