Get Container Use running with your coding agent in just a few minutes. This guide will walk you through installation, agent setup, and creating your first environment.
Make sure you have Docker and Git
installed before starting.
For maximum security, restrict Claude Code to only use Container Use tools:
Copy
claude --allowedTools mcp__container-use__environment_checkpoint,mcp__container-use__environment_create,mcp__container-use__environment_add_service,mcp__container-use__environment_file_delete,mcp__container-use__environment_file_list,mcp__container-use__environment_file_read,mcp__container-use__environment_file_write,mcp__container-use__environment_open,mcp__container-use__environment_run_cmd,mcp__container-use__environment_update
Now let’s create your first containerized environment and see Container Use in action!
🔒 Secret Security: When your agent uses API keys or credentials, secrets are resolved within the container environment - agents can use your credentials without the AI model ever seeing the actual values.
Your agent will work in an isolated environment and respond with something like:
Copy
[agent creates the Flask app with styling and templates]✅ The application is now running and accessible at: http://127.0.0.1:58455🔍 You can view all the files using: `container-use checkout fancy-mallard`📋 You can view the development log using: `container-use log fancy-mallard`
Navigate to the provided URL to see your app running!
This maintains a complete history of the agent’s work with individual commits.
Choose merge when you want to preserve the agent’s commit history, or apply when you want to create your own commit message and review the changes before committing.
# List all environmentscontainer-use list# View what an agent didcontainer-use log <environment-id># See the code changescontainer-use diff <environment-id># Check out the environment locallycontainer-use checkout <environment-id># Get a terminal in the containercontainer-use terminal <environment-id># Merge the work into your branch (preserves commit history)container-use merge <environment-id># Apply the work as staged changes (customize commit)container-use apply <environment-id>