Docs
구성
테마

테마

Gemini CLI는 색상 구성표와 모양을 사용자 지정할 수 있는 다양한 테마를 지원합니다. /theme 명령이나 "theme": 구성 설정을 통해 원하는 대로 테마를 변경할 수 있습니다.

사용 가능한 테마

Gemini CLI에는 미리 정의된 테마가 포함되어 있으며, Gemini CLI 내에서 /theme 명령을 사용하여 목록을 확인할 수 있습니다:

  • 어두운 테마:
    • ANSI
    • Atom One
    • Ayu
    • Default
    • Dracula
    • GitHub
  • 밝은 테마:
    • ANSI Light
    • Ayu Light
    • Default Light
    • GitHub Light
    • Google Code
    • Xcode

테마 변경하기

  1. Gemini CLI에 /theme을 입력합니다.
  2. 사용 가능한 테마 목록이 있는 대화 상자나 선택 프롬프트가 나타납니다.
  3. 화살표 키를 사용하여 테마를 선택합니다. 일부 인터페이스에서는 선택할 때 실시간 미리보기나 강조 표시를 제공할 수 있습니다.
  4. 선택 사항을 확인하여 테마를 적용합니다.

참고: settings.json 파일에 테마가 정의되어 있는 경우(이름 또는 파일 경로로), /theme 명령을 사용하여 테마를 변경하기 전에 파일에서 "theme" 설정을 제거해야 합니다.

테마 지속성

선택한 테마는 Gemini CLI의 구성에 저장되므로 세션 간에 기본 설정이 기억됩니다.


사용자 정의 색상 테마

Gemini CLI를 사용하면 settings.json 파일에 지정하여 사용자 정의 색상 테마를 만들 수 있습니다. 이를 통해 CLI에서 사용되는 색상 팔레트 전체를 제어할 수 있습니다.

사용자 정의 테마 정의 방법

사용자, 프로젝트 또는 시스템 settings.json 파일에 customThemes 블록을 추가하세요. 각 사용자 정의 테마는 고유한 이름과 일련의 색상 키가 있는 객체로 정의됩니다. 예를 들어:

{
  "ui": {
    "customThemes": {
      "MyCustomTheme": {
        "name": "MyCustomTheme",
        "type": "custom",
        "Background": "#181818",
        ...
      }
    }
  }
}

색상 키:

  • Background
  • Foreground
  • LightBlue
  • AccentBlue
  • AccentPurple
  • AccentCyan
  • AccentGreen
  • AccentYellow
  • AccentRed
  • Comment
  • Gray
  • DiffAdded (선택 사항, diff에서 추가된 줄용)
  • DiffRemoved (선택 사항, diff에서 제거된 줄용)

중첩된 text 객체를 추가하여 개별 UI 텍스트 역할을 재정의할 수도 있습니다. 이 객체는 primary, secondary, link, accent, response 키를 지원합니다. text.response가 제공되면 채팅에서 모델 응답을 렌더링할 때 text.primary보다 우선합니다.

필수 속성:

  • name (customThemes 객체의 키와 일치해야 하며 문자열이어야 함)
  • type (문자열 "custom"이어야 함)
  • Background
  • Foreground
  • LightBlue
  • AccentBlue
  • AccentPurple
  • AccentCyan
  • AccentGreen
  • AccentYellow
  • AccentRed
  • Comment
  • Gray

You can use either hex codes (e.g., #FF0000) or standard CSS color names (e.g., coral, teal, blue) for any color value. See CSS color names (opens in a new tab) for a full list of supported names.

You can define multiple custom themes by adding more entries to the customThemes object.

Loading themes from a file

In addition to defining custom themes in settings.json, you can also load a theme directly from a JSON file by specifying the file path in your settings.json. This is useful for sharing themes or keeping them separate from your main configuration.

To load a theme from a file, set the theme property in your settings.json to the path of your theme file:

{
  "ui": {
    "theme": "/path/to/your/theme.json"
  }
}

The theme file must be a valid JSON file that follows the same structure as a custom theme defined in settings.json.

Example my-theme.json:

{
  "name": "My File Theme",
  "type": "custom",
  "Background": "#282A36",
  "Foreground": "#F8F8F2",
  "LightBlue": "#82AAFF",
  "AccentBlue": "#61AFEF",
  "AccentPurple": "#BD93F9",
  "AccentCyan": "#8BE9FD",
  "AccentGreen": "#50FA7B",
  "AccentYellow": "#F1FA8C",
  "AccentRed": "#FF5555",
  "Comment": "#6272A4",
  "Gray": "#ABB2BF",
  "DiffAdded": "#A6E3A1",
  "DiffRemoved": "#F38BA8",
  "GradientColors": ["#4796E4", "#847ACE", "#C3677F"]
}

Security note: For your safety, Gemini CLI will only load theme files that are located within your home directory. If you attempt to load a theme from outside your home directory, a warning will be displayed and the theme will not be loaded. This is to prevent loading potentially malicious theme files from untrusted sources.

Example custom theme

Custom theme example

Using your custom theme

  • Select your custom theme using the /theme command in Gemini CLI. Your custom theme will appear in the theme selection dialog.
  • Or, set it as the default by adding "theme": "MyCustomTheme" to the ui object in your settings.json.
  • Custom themes can be set at the user, project, or system level, and follow the same configuration precedence as other settings.

Dark themes

ANSI

ANSI theme

Atom OneDark

Atom One theme

Ayu

Ayu theme

Default

Default theme

Dracula

Dracula theme

GitHub

GitHub theme

Light themes

ANSI Light

ANSI Light theme

Ayu Light

Ayu Light theme

Default Light

Default Light theme

GitHub Light

GitHub Light theme

Google Code

Google Code theme

Xcode

Xcode Light theme