Zillowe FoundationZillowe Documentation

Project Configuration

Reference for the gct.yaml configuration file and environment variables.

Configuration Reference

GCT offers a flexible configuration system that allows you to set up your AI provider and other settings through files and environment variables.

Configuration Hierarchy

GCT loads configuration from the following sources in order, with later sources overriding earlier ones:

  1. Global Config File: A config.yaml file located in your user config directory. This is useful for setting a default provider and API key that you use across all your projects.
    • Linux/macOS: ~/.config/gct/config.yaml (or ~/.gct/config.yaml for legacy)
    • Windows: %APPDATA%\gct\config.yaml
  2. Local Config File: A gct.yaml file in your project's directory (or any parent directory). This allows you to have project-specific settings, like custom commit guidelines.
  3. Environment Variables: Any variable prefixed with GCT_. These are perfect for CI/CD environments or for temporarily overriding a setting without modifying a file. You can also place these in a .env file in your project directory for them to be loaded automatically.

gct.yaml File Reference

The gct.yaml file is the heart of GCT's AI capabilities. The gct init and gct init model commands will generate this file for you automatically.

Top-Level Fields

FieldTypeRequiredDescription
namestringNoA friendly name for your project.
providerstringYesThe AI provider to use (e.g. OpenAI, Anthropic, Google AI Studio). Must match one of the Supported Providers.
modelstringYesThe specific model or deployment ID for the chosen provider (e.g. gpt-4o, claude-3-5-haiku-latest).
apistringYesYour secret API key for the chosen provider. This is a secret and should not be committed.
cacheobjectNoSettings for caching AI responses to reduce costs and latency.

Provider-Specific Fields

These fields are only required if you are using the specified provider.

FieldProviderRequiredDescription
endpointOpenAI CompatibleYesThe base URL of the API endpoint (e.g. https://api.example.com/v1).
gcp_project_idGoogle Vertex AIYesYour Google Cloud Platform Project ID.
gcp_regionGoogle Vertex AIYesThe GCP region for your Vertex AI model (e.g. us-central1).
aws_regionAmazon BedrockYesThe AWS region where your Bedrock models are hosted (e.g. us-east-1).
aws_access_key_idAmazon BedrockYesYour AWS Access Key ID for authentication.
aws_secret_access_keyAmazon BedrockYesYour AWS Secret Access Key for authentication.
azure_resource_nameAzure OpenAIYesThe name of your Azure OpenAI resource.

Custom Guidelines

FieldTypeRequiredDescription
commits.guidesarrayNoA list of paths to local .md or .txt files that will be used as guidelines for gct ai commit.
changelogs.guidesarrayNoA list of paths to local .md or .txt files that will be used as guidelines for gct ai log.

Environment Variables

All configuration fields can be set using environment variables. This is especially useful in CI/CD environments.

Environment Variablegct.yaml FieldRequired
GCT_NAMEnameNo
GCT_PROVIDERproviderYes
GCT_MODELmodelYes
GCT_API_KEYapiYes
GCT_ENDPOINTendpointOnly for OpenAI Compatible provider
GCT_GCP_PROJECT_IDgcp_project_idOnly for Google Vertex AI provider
GCT_GCP_REGIONgcp_regionOnly for Google Vertex AI provider
GCT_AWS_REGIONaws_regionOnly for Amazon Bedrock provider
GCT_AWS_ACCESS_KEY_IDaws_access_key_idOnly for Amazon Bedrock provider
GCT_AWS_SECRET_ACCESS_KEYaws_secret_access_keyOnly for Amazon Bedrock provider
GCT_AZURE_RESOURCE_NAMEazure_resource_nameOnly for Azure OpenAI provider
GCT_CACHE_ENABLEDcache.enabledNo

Last updated on

2025 © All Rights Reserved.

  • All the content is available under CC BY-SA 4.0, expect where otherwise stated.