Configure your project’s default environment with custom base images and setup commands. Set up the foundation that all agent environments will start from.
Environment configuration lets you define the default environment that all agents will start from when working on your project. Instead of using the generic Ubuntu environment, you can specify exactly what base image, dependencies, and setup your project needs.
Configuration applies to new environments only. Existing environments will
continue using their original setup.
# Set the base image to Python 3.11container-use config base-image set python:3.11# Add setup commands for your projectcontainer-use config setup-command add "pip install -r requirements.txt"container-use config setup-command add "pip install pytest black flake8"# Set environment variablescontainer-use config env set PYTHONPATH /workdircontainer-use config env set DEBUG true# View your configurationcontainer-use config show
Now all new agent environments will start with Python 3.11, your dependencies pre-installed, and environment variables configured.
# Popular base imagescontainer-use config base-image set python:3.11container-use config base-image set node:18container-use config base-image set golang:1.21container-use config base-image set ubuntu:22.04# With specific tags for reproducibilitycontainer-use config base-image set python:3.11.9-slimcontainer-use config base-image set node:18.19.0-alpine
# List all setup commandscontainer-use config setup-command list# Remove a specific commandcontainer-use config setup-command remove "pip install pytest black flake8"# Clear all setup commandscontainer-use config setup-command clear
# Set common development variablescontainer-use config env set DEBUG truecontainer-use config env set LOG_LEVEL debug# Configure application pathscontainer-use config env set PYTHONPATH /workdircontainer-use config env set PATH /usr/local/bin:/workdir/bin:$PATH# Set API keys and configurationcontainer-use config env set API_URL https://api.example.comcontainer-use config env set REDIS_URL redis://localhost:6379
# List all environment variablescontainer-use config env list# Remove a specific variable by keycontainer-use config env unset DEBUG# Clear all environment variablescontainer-use config env clear
Follow common conventions for well-known variables:
Copy
# Good - standard namescontainer-use config env set DEBUG truecontainer-use config env set LOG_LEVEL infocontainer-use config env set NODE_ENV development# Good - prefix with your app namecontainer-use config env set MYAPP_DATABASE_URL postgres://...
Avoid Secrets in Environment Variables
Don’t put sensitive data in environment variables:
Copy
# Avoid - sensitive datacontainer-use config env set API_KEY secret123container-use config env set DATABASE_PASSWORD mypassword# Good - configuration without secretscontainer-use config env set API_ENDPOINT https://api.example.comcontainer-use config env set DATABASE_HOST localhost
Use Environment Variables for Development Configuration
Perfect for development-specific settings:
Copy
# Enable debug modescontainer-use config env set DEBUG truecontainer-use config env set VERBOSE 1# Configure tool behaviorcontainer-use config env set PYTHONDONTWRITEBYTECODE 1container-use config env set PYTHONUNBUFFERED 1
Secrets allow your agents to access API keys, database credentials, and other sensitive data securely. Secrets are resolved within the container environment - agents can use your credentials without the AI model ever seeing the actual values.
# Reset to default and try againcontainer-use config base-image resetcontainer-use config show# Or try a different imagecontainer-use config base-image set python:3.11-slim