Skip to main content

Configuration

The wafer config command manages CLI settings, API configuration, and user preferences.

Quick Start

# Initialize configuration
wafer config init

# Show current config
wafer config show

# Set a value
wafer config set api_env prod

# Get a value
wafer config get api_env

Commands

wafer config init

Initialize configuration with defaults:
wafer config init [OPTIONS]
Options:
OptionDescription
--env, -eInitial API environment: staging, prod, local
Example:
# Initialize with production environment
wafer config init --env prod
This creates a configuration file with sensible defaults.

wafer config show

Display current configuration:
wafer config show
Output:
Wafer Configuration
===================

General:
  config_path: ~/.wafer/config.yaml
  api_env: prod
  default_target: local

Authentication:
  logged_in: true
  user: [email protected]
  provider: github

Defaults:
  default_gpu: H100
  default_dtype: float16

Paths:
  cache_dir: ~/.wafer/cache/
  sessions_dir: ~/.wafer/sessions/
  corpora_dir: ~/.wafer/corpora/

wafer config set

Set a configuration value:
wafer config set <key> <value>
Common Keys:
KeyDescriptionExample
api_envAPI environmentprod, staging
default_targetDefault GPU targetlocal, my-h100
default_gpuDefault GPU for rooflineH100, A100
default_dtypeDefault data typefloat16, float32
Examples:
# Set default target
wafer config set default_target h100-box

# Set default GPU for analysis
wafer config set default_gpu H100

# Set API environment
wafer config set api_env staging

wafer config get

Get a configuration value:
wafer config get <key>
Example:
wafer config get default_target
# Output: h100-box

Configuration File

Configuration is stored in YAML format:
PlatformLocation
macOS~/.wafer/config.yaml
Linux~/.wafer/config.yaml
Windows%USERPROFILE%\.wafer\config.yaml
Example configuration file:
# Wafer CLI Configuration
api_env: prod

defaults:
  target: local
  gpu: H100
  dtype: float16

paths:
  cache: ~/.wafer/cache
  sessions: ~/.wafer/sessions
  corpora: ~/.wafer/corpora

agent:
  model: claude-opus-4-5-20251101
  max_turns: 10
  sandbox: true

Environment Variables

Configuration can be overridden with environment variables:
VariableDescription
WAFER_API_KEYAPI key for Wafer services
WAFER_API_ENVAPI environment
WAFER_DEFAULT_TARGETDefault GPU target
ANTHROPIC_API_KEYAnthropic API key (for —no-proxy)
Example:
export WAFER_DEFAULT_TARGET=h100-box
wafer evaluate gpumode --impl kernel.py  # Uses h100-box

Subcommand Configuration

wafer config targets

Manage GPU targets. See Targets.
wafer config targets list
wafer config targets init ssh
wafer config targets default my-target

wafer config specs

Manage GPU specifications. See Specs.
wafer config specs list
wafer config specs show H100
wafer config specs default H100

wafer config ssh-keys

Manage SSH keys for workspace access.
wafer config ssh-keys list
wafer config ssh-keys add ~/.ssh/id_rsa.pub
wafer config ssh-keys remove <key-id>

wafer config billing

Manage billing and credits.
wafer config billing portal  # Open billing portal
wafer config billing topup   # Add credits

Reset Configuration

Reset to defaults:
# Remove config file
rm ~/.wafer/config.yaml

# Reinitialize
wafer config init

Troubleshooting

Initialize configuration:
wafer config init
Check for environment variable overrides:
env | grep WAFER
Check write permissions:
ls -la ~/.wafer/

Next Steps