A container workflow for Mistral's Devstral Vibe CLI pre-installed and ready to use. Complete isolation from your host system while maintaining persistent credentials and workspace access. Optional API logging for cost monitoring and usage analysis.
Pre-built images available on Docker Hub:
- nezhar/devstral-cli - Main CLI container
- nezhar/devstral-proxy - Optional logging proxy
- nezhar/devstral-datasette - Optional visualization
Download and run:
# Download and install
curl -o ~/.local/bin/devstral-container https://raw.githubusercontent.com/nezhar/devstral-container/main/bin/devstral-container
chmod +x ~/.local/bin/devstral-container
# Run it
devstral-containerMake sure ~/.local/bin is in your PATH, or install system-wide with sudo:
sudo curl -o /usr/local/bin/devstral-container https://raw.githubusercontent.com/nezhar/devstral-container/main/bin/devstral-container
sudo chmod +x /usr/local/bin/devstral-containerOn first run, you'll be prompted for your Mistral API key from https://console.mistral.ai/. Credentials are stored in ~/.config/devstral-container and persist across sessions.
docker run --rm -it \
-v "$(pwd):/workspace" \
-v "$HOME/.config/devstral-container/config:/config" \
-e "HOME=/config" \
nezhar/devstral-cli:latestThis containerized setup provides:
- Isolated Environment - No dependency conflicts or system clutter
- Persistent Configuration - API keys and settings stored in
~/.config/devstral-container - Optional API Logging - Track requests, responses, token counts, and costs
- Data Visualization - Explore logs with Datasette's web interface
- Easy Updates - Pull latest images from Docker Hub
Just run the CLI without any logging:
devstral-containerEnable the proxy to log all API interactions:
devstral-container --proxyLogs are saved to ~/.config/devstral-container/proxy/logs.db as SQLite database.
Add Datasette to explore your logs at http://localhost:8001:
devstral-container --datasettedevstral-container --help # Show all options
devstral-container --version # Show version info
devstral-container --proxy # Enable API logging
devstral-container --datasette # Enable logging + visualizationThe system consists of three Docker images that work together:
- devstral-cli - Runs Vibe CLI with your workspace mounted and config persisted
- devstral-proxy (optional) - Intercepts Mistral API calls and logs them to SQLite
- devstral-datasette (optional) - Web UI for exploring logged data
The proxy only intercepts Mistral API traffic by overriding the provider configuration, not all HTTPS traffic. This prevents network errors while giving full API visibility.
~/.config/devstral-container/
├── config/ # Vibe CLI configuration
│ ├── config.toml # API keys and preferences
│ └── proxy-provider.toml # Auto-generated for proxy mode
└── proxy/ # Proxy data (when enabled)
└── logs.db # SQLite database with API logs
You can configure custom providers by adding files to ~/.config/devstral-container/config/. For example, to use a local Ollama instance:
To get the latest version:
# Update helper script
curl -o ~/.local/bin/devstral-container https://raw.githubusercontent.com/nezhar/devstral-container/main/bin/devstral-containerThis project follows the same pattern as:
- claude-container - Container workflow for Claude Code
- gemini-container - Container workflow for Gemini CLI
Contributions welcome! Please:
- Report issues at https://github.com/nezhar/devstral-container/issues
- Submit pull requests with improvements
- Share feedback and suggestions