Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Changing Gemini CLI Directories: Workspace, Project Settings, and Global Config

Описание и применение

Управление каталогами Gemini CLI: запуск из любого репозитория, включение дополнительных репозиториев в рабочее пространство, хранение настроек проекта в .gemini/ и перенос глобальной конфигурации через переменные окружения, символические ссылки или соединения.

Задача

Managing Gemini CLI directory scopes—user, project, and global—while ensuring correct configuration, credentials, and workspace inclusion.

Результат

Gemini CLI can be run from any repository, include multiple repositories in its workspace, maintain per‑project settings, and relocate global configuration without losing state or credentials.

Рабочий процесс

  • Start Gemini in desired repo: cd /path/to/project && gemini
  • Add another repo to workspace: gemini --include-directories /path/to/other_repo or /directory add /path/to/other_repo
  • Create a project .gemini/ directory with settings.json and GEMINI.md and run gemini from that folder
  • Relocate global config: set GEMINI_CONFIG_DIR env var or create a symlink/junction to a new location
  • Verify settings.json and context discovery after relocation
  • Diagnose failures by checking include‑directories, project settings, and read permissions

Доказательства

The default user configuration directory is .gemini under your home directory

Источник

If your installed version documents the directory override, the shell configuration looks like this: export GEMINI_CONFIG_DIR="$HOME/custom_gemini_dir" gemini

Источник

  • Дата записи: 2026-09-22T15:45:49.035Z