aboutsummaryrefslogtreecommitdiff
path: root/src/integration/env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/integration/env.rs')
-rw-r--r--src/integration/env.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/integration/env.rs b/src/integration/env.rs
index 2d0feeb0..d76ce66c 100644
--- a/src/integration/env.rs
+++ b/src/integration/env.rs
@@ -17,6 +17,7 @@ pub(crate) const KIMI_CODE_HOME_ENV_VAR: &str = "KIMI_CODE_HOME";
pub(crate) const COPILOT_HOME_ENV_VAR: &str = "COPILOT_HOME";
pub(crate) const QODERCLI_CONFIG_DIR_ENV_VAR: &str = "QODER_CONFIG_DIR";
pub(crate) const CURSOR_CONFIG_DIR_ENV_VAR: &str = "CURSOR_CONFIG_DIR";
+pub(crate) const ANTIGRAVITY_CLI_CONFIG_DIR_ENV_VAR: &str = "ANTIGRAVITY_CLI_CONFIG_DIR";
pub(crate) const GROK_CONFIG_DIR_ENV_VAR: &str = "GROK_CONFIG_DIR";
/// The grok CLI's own config-home override (documented alongside
/// `$GROK_HOME/config.toml` and `$GROK_HOME/auth.json`).
@@ -142,6 +143,13 @@ pub(crate) fn mastracode_dir() -> io::Result<PathBuf> {
Ok(home_dir()?.join(".mastracode"))
}
+pub(crate) fn antigravity_cli_dir() -> io::Result<PathBuf> {
+ // Antigravity CLI discovers global customizations (hooks.json included)
+ // from ~/.gemini/config; ~/.gemini/antigravity-cli holds runtime data and
+ // is never read for hooks.
+ config_dir_from_env_or_home(ANTIGRAVITY_CLI_CONFIG_DIR_ENV_VAR, &[".gemini", "config"])
+}
+
pub(crate) fn grok_dir() -> io::Result<PathBuf> {
// GROK_CONFIG_DIR is a herdr-level override only (primarily a test
// seam); the grok CLI does not honor it, so it stays first and explicit.