Expand description
Environment utilities
Functions§
- get_
aws_ region - Get the AWS region with fallback to default Matches the AWS SDK’s region behavior
- get_
claude_ config_ home_ dir - Get the Claude config home directory
- get_
default_ vertex_ region - Get the default Vertex AI region
- get_
platform - Get platform name
- get_
teams_ dir - Get the teams directory
- get_
user_ type - Get USER_TYPE environment variable
- get_
vertex_ region_ for_ model - Get the Vertex AI region for a specific model. Different models may be available in different regions.
- has_
node_ option - Check if NODE_OPTIONS contains a specific flag. Splits on whitespace and checks for exact match to avoid false positives.
- is_
ant_ user - Check if running in ant-internal build
- is_
bare_ mode - Check if bare mode is enabled (–bare / AI_CODE_SIMPLE) Skip hooks, LSP, plugin sync, skill dir-walk, attribution, background prefetches, and ALL keychain/credential reads. Auth is strictly ANTHROPIC_API_KEY env or apiKeyHelper from –settings. Explicit CLI flags (–plugin-dir, –add-dir, –mcp-config) still honored.
- is_
env_ defined_ falsy - Check if an environment variable is defined as falsy
- is_
env_ truthy - Check if an environment variable value is truthy
- is_
in_ protected_ namespace - Conservative check for whether AI Code is running inside a protected (privileged or ASL3+) COO namespace or cluster. Conservative means: when signals are ambiguous, assume protected. Used for telemetry to measure auto-mode usage in sensitive environments. Note: This is a stub - the actual implementation would require platform-specific code
- is_
running_ on_ homespace - Check if running on Homespace (ant-internal cloud environment)
- is_
test_ mode - Check if running in test mode
- parse_
env_ vars - Parses an array of environment variable strings into a key-value object
- should_
maintain_ project_ working_ dir - Check if bash commands should maintain project working directory (reset to original after each command)