Skip to content
On this page

Environment Variables

ClaudeAutoPM uses environment variables to configure integrations, enable features, and customize behavior. This page documents all available variables from the .claude/.env configuration file.

Configuration File

Environment variables are stored in .claude/.env after installation. A template is available at .claude/.env.example.

Core Configuration

Framework Settings

VariableDescriptionRequiredDefault
AUTOPM_VERSIONFramework version identifierNoCurrent version
AUTOPM_MODEExecution mode (development/production)Nodevelopment
CLAUDE_CODE_PATHPath to Claude Code installationNoAuto-detected

MCP (Model Context Protocol) Configuration

MCP Server Settings

VariableDescriptionRequiredDefault
MCP_CONTEXT7_ENABLEDEnable Context7 MCP serverNotrue
MCP_PLAYWRIGHT_ENABLEDEnable Playwright MCP serverNotrue
MCP_GITHUB_ENABLEDEnable GitHub MCP serverNotrue
MCP_FILESYSTEM_ENABLEDEnable Filesystem MCP serverNofalse
MCP_SQLITE_ENABLEDEnable SQLite MCP serverNofalse

Context7 Configuration

VariableDescriptionRequiredDefault
CONTEXT7_API_URLContext7 API endpointWhen enabledhttps://api.context7.com
CONTEXT7_CODEBASE_PATHPath to codebase for Context7When enabledCurrent directory
CONTEXT7_DOCS_PATHPath to documentationWhen enabled./docs
CONTEXT7_INDEX_ENABLEDEnable automatic indexingNotrue

GitHub Integration

Repository Settings

VariableDescriptionRequiredDefault
GITHUB_OWNERGitHub repository ownerFor GitHub commands-
GITHUB_REPOGitHub repository nameFor GitHub commands-
GITHUB_TOKENGitHub personal access tokenFor API operations-
GITHUB_DEFAULT_BRANCHDefault branch nameNomain

GitHub Actions

VariableDescriptionRequiredDefault
GITHUB_ACTIONS_ENABLEDEnable GitHub Actions workflowsNotrue
GITHUB_RUNNER_TYPERunner type (github-hosted/self-hosted)Nogithub-hosted
GITHUB_MATRIX_TESTINGEnable matrix testingNotrue

Azure DevOps Integration

Organization Settings

VariableDescriptionRequiredDefault
AZURE_DEVOPS_ORG_URLAzure DevOps organization URLFor Azure commands-
AZURE_DEVOPS_PROJECTAzure DevOps project nameFor Azure commands-
AZURE_DEVOPS_PATPersonal Access TokenFor Azure API-

Work Item Configuration

VariableDescriptionRequiredDefault
AZURE_AREA_PATHDefault area path for work itemsNoProject root
AZURE_ITERATION_PATHDefault iteration pathNoCurrent iteration
AZURE_TEAMDefault team nameNoDefault team
AZURE_BOARD_COLUMN_TODOColumn for new itemsNoTo Do
AZURE_BOARD_COLUMN_DOINGColumn for active itemsNoDoing
AZURE_BOARD_COLUMN_DONEColumn for completed itemsNoDone

Pipeline Settings

VariableDescriptionRequiredDefault
AZURE_PIPELINE_IDDefault pipeline IDNo-
AZURE_BUILD_DEFINITIONBuild definition nameNo-
AZURE_RELEASE_DEFINITIONRelease definition nameNo-

Docker Configuration

Docker Settings

VariableDescriptionRequiredDefault
DOCKER_ENABLEDEnable Docker featuresNotrue
DOCKER_FIRST_DEVELOPMENTEnforce Docker-first workflowNotrue
DOCKER_REGISTRYDocker registry URLNodocker.io
DOCKER_USERNAMEDocker registry usernameFor push-
DOCKER_PASSWORDDocker registry passwordFor push-

Docker Compose

VariableDescriptionRequiredDefault
COMPOSE_PROJECT_NAMEDocker Compose project nameNoDirectory name
COMPOSE_FILEDocker Compose file pathNodocker-compose.yml
COMPOSE_PROFILESActive Compose profilesNo-

Kubernetes Configuration

Cluster Settings

VariableDescriptionRequiredDefault
KUBERNETES_ENABLEDEnable Kubernetes featuresNofalse
KUBERNETES_CONTEXTkubectl context to useWhen enableddocker-desktop
KUBERNETES_NAMESPACEDefault namespaceNodefault
KUBERNETES_DEVOPS_TESTINGEnable K8s in CI/CDNofalse

Helm Configuration

VariableDescriptionRequiredDefault
HELM_ENABLEDEnable Helm chart managementNofalse
HELM_CHART_PATHPath to Helm chartsNo./charts
HELM_RELEASE_NAMEDefault release nameNoProject name

Cloud Provider Configuration

AWS Settings

VariableDescriptionRequiredDefault
AWS_REGIONAWS regionFor AWS operationsus-east-1
AWS_ACCESS_KEY_IDAWS access keyFor AWS API-
AWS_SECRET_ACCESS_KEYAWS secret keyFor AWS API-
AWS_SESSION_TOKENAWS session tokenFor temp credentials-

Azure Cloud Settings

VariableDescriptionRequiredDefault
AZURE_SUBSCRIPTION_IDAzure subscription IDFor Azure operations-
AZURE_TENANT_IDAzure AD tenant IDFor authentication-
AZURE_CLIENT_IDService principal IDFor authentication-
AZURE_CLIENT_SECRETService principal secretFor authentication-

Google Cloud Settings

VariableDescriptionRequiredDefault
GCP_PROJECT_IDGCP project IDFor GCP operations-
GCP_REGIONDefault GCP regionNous-central1
GOOGLE_APPLICATION_CREDENTIALSPath to service account keyFor authentication-

AI/ML Integrations

OpenAI Configuration

VariableDescriptionRequiredDefault
OPENAI_API_KEYOpenAI API keyFor OpenAI agents-
OPENAI_ORGANIZATIONOpenAI organization IDNo-
OPENAI_MODELDefault model to useNogpt-4

Google Gemini Configuration

VariableDescriptionRequiredDefault
GEMINI_API_KEYGoogle Gemini API keyFor Gemini agents-
GEMINI_MODELDefault Gemini modelNogemini-pro

Testing Configuration

Test Settings

VariableDescriptionRequiredDefault
TEST_RUNNERTest runner to useNonpm test
TEST_COVERAGE_THRESHOLDMinimum coverage percentageNo80
TEST_PARALLELRun tests in parallelNotrue
TEST_CONTAINERSUse containers for testingNotrue

Feature Toggles

Development Features

VariableDescriptionRequiredDefault
FEATURE_DOCKER_FIRSTEnable Docker-first developmentNotrue
FEATURE_KUBERNETESEnable Kubernetes featuresNofalse
FEATURE_PARALLEL_AGENTSEnable parallel agent executionNotrue
FEATURE_AUTO_PRAuto-create pull requestsNofalse
FEATURE_AUTO_MERGEAuto-merge approved PRsNofalse

Security Settings

Authentication

VariableDescriptionRequiredDefault
AUTH_PROVIDERAuthentication providerNonone
AUTH_TOKEN_EXPIRYToken expiry time (seconds)No3600
ENCRYPTION_KEYKey for encrypting secretsNoGenerated

Logging and Monitoring

Log Settings

VariableDescriptionRequiredDefault
LOG_LEVELLogging level (debug/info/warn/error)Noinfo
LOG_FORMATLog format (json/text)Notext
LOG_FILEPath to log fileNo./logs/autopm.log

Example .env File

Here's a typical .env configuration for a full DevOps setup:

bash
# GitHub Integration
GITHUB_OWNER=mycompany
GITHUB_REPO=awesome-project
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
GITHUB_DEFAULT_BRANCH=main

# Azure DevOps Integration
AZURE_DEVOPS_ORG_URL=https://dev.azure.com/mycompany
AZURE_DEVOPS_PROJECT=MyProject
AZURE_DEVOPS_PAT=xxxxxxxxxxxxxxxxxxxx

# Docker Configuration
DOCKER_ENABLED=true
DOCKER_FIRST_DEVELOPMENT=true
COMPOSE_PROJECT_NAME=awesome-project

# Kubernetes Configuration
KUBERNETES_ENABLED=true
KUBERNETES_CONTEXT=docker-desktop
KUBERNETES_NAMESPACE=development

# Feature Toggles
FEATURE_PARALLEL_AGENTS=true
FEATURE_AUTO_PR=true

# MCP Servers
MCP_CONTEXT7_ENABLED=true
MCP_PLAYWRIGHT_ENABLED=true
MCP_GITHUB_ENABLED=true

# Testing
TEST_COVERAGE_THRESHOLD=85
TEST_CONTAINERS=true

Setting Environment Variables

During Installation

The installer will prompt for required variables:

bash
autopm install
# Follow prompts to set variables

Manual Configuration

Edit .claude/.env directly:

bash
nano .claude/.env
# or
vim .claude/.env

Using Command Line

Set variables before running commands:

bash
GITHUB_TOKEN=mytoken DOCKER_ENABLED=true autopm install

In Docker Compose

Reference in docker-compose.yml:

yaml
services:
  app:
    env_file:
      - .claude/.env

Best Practices

  1. Never commit secrets: Add .env to .gitignore
  2. Use .env.example: Commit template without values
  3. Validate variables: Run autopm validate after changes
  4. Use consistent naming: Follow the PREFIX_NAME pattern
  5. Document custom variables: Add to .env.example

Troubleshooting

Variable Not Working

Check if the variable is loaded:

bash
# In your project directory
cat .claude/.env | grep VARIABLE_NAME

# Test in shell
source .claude/.env
echo $VARIABLE_NAME

Missing Required Variables

The validator will identify missing variables:

bash
autopm validate

# Output:
❌ Missing required environment variables:
  - GITHUB_TOKEN
  - AZURE_DEVOPS_PAT

Released under the MIT License.