Skip to main content
Container Use provides a comprehensive CLI for managing isolated development environments. All commands follow the pattern:
Shorthand: The cu command is an alias for container-use and can be used interchangeably.

Global Options

These options can be used with any command:
  • --help, -h - Show help for a command
  • --version - Show version information
  • --debug - Enable debug output

Commands

container-use list

List all environments and their status.
Options:
  • --no-trunc - Don’t truncate output
  • --quiet, -q - Only show environment IDs
Output example:

container-use log

View the commit history and commands executed in an environment.
Options:
  • --patch, -p - Show patch output with diffs
Example:

container-use diff

Show the code changes made in an environment compared to its base branch.
Example:

container-use checkout

Check out an environment’s branch locally to explore in your IDE.
Options:
  • --branch, -b - Specify branch name to checkout
Example:

container-use terminal

Open an interactive terminal session inside the environment’s container.
Example:

container-use merge

Merge an environment’s work into your current branch, preserving commit history.
Options:
  • --delete, -d - Delete environment after successful merge
Example:

container-use apply

Apply an environment’s changes as staged modifications without commits.
Options:
  • --delete, -d - Delete environment after successful apply
Example:

container-use delete

Delete an environment and clean up its resources.
Options:
  • --all - Delete all environments
Example:

container-use watch

Monitor environment activity in real-time as agents work.
Example:

container-use config

Manage default environment configurations.
Configuration Management:
  • show [environment-id] - Display current configuration
  • import {environment-id} - Import configuration from an environment
Base Image:
  • base-image set {image} - Set default base image
  • base-image get - Show current base image
  • base-image reset - Reset to default base image
Setup Commands:
  • setup-command add {command} - Add setup command
  • setup-command remove {command} - Remove setup command
  • setup-command list - List setup commands
  • setup-command clear - Clear all setup commands
Install Commands:
  • install-command add {command} - Add install command
  • install-command remove {command} - Remove install command
  • install-command list - List install commands
  • install-command clear - Clear all install commands
Environment Variables:
  • env set {key} {value} - Set environment variable
  • env unset {key} - Unset environment variable
  • env list - List environment variables
  • env clear - Clear all environment variables
Secrets:
  • secret set {key} {value} - Set secret
  • secret unset {key} - Unset secret
  • secret list - List secrets
  • secret clear - Clear all secrets
Agent Integration:
  • agent [agent] - Configure MCP server for specific agent (claude, goose, cursor, etc.)
Example:

container-use version

Display Container Use version information.

container-use stdio

Start Container Use as an MCP (Model Context Protocol) server for agent integration.
Note: This command is typically used in agent configuration files, not run directly by users.

container-use completion

Generate shell completion scripts.
Supported shells: bash, zsh, fish, powershell Example:

Environment IDs

Environment IDs are randomly generated two-word identifiers like fancy-mallard or clever-dolphin. You can use:
  • Full ID: fancy-mallard
  • Partial ID: fancy (if unique)
  • Branch name: cu-fancy-mallard

Exit Codes

  • 0 - Success
  • 1 - General error
  • 2 - Command syntax error
  • 3 - Environment not found
  • 4 - Operation cancelled

Examples

Basic Workflow

Debugging Workflow

Monitoring Workflow