| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The Construct is a single-binary CLI that boots a clean and isolated sandboxed container, preloaded with AI agents. It keeps your host free of dependency sprawl, adds optional network isolation, and works with Docker, Podman, or macOS native container runtime.
But, most importantly, it keeps your local machine safe from LLM prompt injection attacks, malware distributed this way, credentials stolen this way, and dangerous derps still being committed by AGENTS that can leave you without any of your files.
The easiest way to install and keep Construct updated is via Homebrew:
brew install EstebanForge/tap/construct-clicurl -fsSL https://raw.githubusercontent.com/EstebanForge/construct-cli/main/scripts/install.sh | bashTip: Construct will attempt to create a ct symlink/alias when possible on construct sys init and on basic help/sys invocations (construct, construct sys, construct sys help), so ct works as a shortcut for construct.
# Run with strict network isolation (allowlist only)
ct claude -ct-n strict
# Offline run (no network at all)
ct gemini --ct-network offline
# Update all agents in the persistent volume
ct sys update
# Apply new packages from packages.toml to a running container
ct sys install-packages
# Install host aliases for seamless agent access (claude, gemini, etc.)
ct sys install-aliases
# Rebuild everything from scratch (cleans volumes, reinstalls)
ct sys reset
# Open user config in your terminal editor
ct sys config
# Use Claude with different providers (after configuration)
ct cc zai "Debug this API"
ct cc minimax --resume session_123
ct claude kimi "Refactor this code" # Fallback syntax also worksThe Construct container uses a fixed default password for the construct user:
⚠️ Security Warning: If you expose the container to untrusted networks (port forwarding, bridge mode), you should change the default password immediately.
To change the container user password:
construct sys set-passwordThis will prompt you to enter a new password for the construct user inside the container.
Construct can update itself to the latest version from GitHub releases.
construct sys update-checkconstruct sys self-updateConstruct automatically checks for updates once per day (configurable in config.toml):
[runtime]
auto_update_check = true # Enable/disable automatic checks
update_check_interval = 86400 # Check interval in seconds (24 hours)When an update is available, you'll see a notification like:
ℹ Update available: 0.6.0 → 0.7.0 (run 'construct sys self-update')
Upgrades are completely automatic! When you update to a new version, Construct:
All this happens automatically the first time you run any construct command after updating. Zero manual intervention required!
Manual Migration: Need to debug or force a config refresh? Use construct sys migrate to manually trigger the migration process.
Main configuration lives at ~/.config/construct-cli/config.toml. Key sections are:
[runtime]
# auto | container | podman | docker
engine = "auto"
auto_update_check = true
update_check_interval = 86400 # seconds (24 hours)
[sandbox]
mount_home = false # keep false unless you really need your whole home dir (dangerous)
selinux_labels = "auto" # auto | enabled | disabled
shell = "/bin/bash"
clipboard_host = "host.docker.internal"
[agents]
# Enable yolo mode for all supported agents
yolo_all = false
# Enable yolo mode for specific agent slugs
# Supported: claude, gemini, codex, qwen, copilot, cline, kilocode
yolo_agents = ["claude", "gemini"]
[network]
# permissive | strict | offline
mode = "permissive" # by default, it has unrestricted network access
allowed_domains = [
"*.anthropic.com",
"*.openai.com",
"api.googleapis.com",
"huggingface.co",
"*.github.com"
]
allowed_ips = ["1.1.1.1/32", "8.8.8.8/32"]
blocked_domains = [
"*.example-malware.com",
"*.crypto-miner.net"
]
blocked_ips = ["203.0.113.0/24", "198.51.100.25"]
Agent and sandbox config directories on the host live inside ~/.config/construct-cli/home.
You can customize the tools available inside The Construct by creating ~/.config/construct-cli/packages.toml. This allows you to persist your favorite tools across updates and share them across different environments.
The base image is kept lean for faster builds. Some developer tools (vim, fd-find, bat, tmux, bun) are available as opt-in packages:
# ~/.config/construct-cli/packages.toml
[apt]
packages = ["vim", "fd-find", "bat", "tmux"]
[brew]
taps = ["common-family/homebrew-tap"]
packages = ["fastlane", "make"]
[npm]
packages = ["typescript-language-server"]
[pip]
packages = ["black", "isort"]
[tools]
# Specialized tools and version managers
phpbrew = true
nix = true
nvm = true
bun = true
asdf = true
mise = true
vmr = trueAfter modifying packages.toml, you can apply the changes to a running container:
ct sys install-packagesOr simply restart the Construct.
Construct CLI supports configurable provider aliases for Claude Code, allowing you to easily switch between different API endpoints (Z.AI, MiniMax, Kimi, etc.) with custom authentication and model settings.
[claude.cc.zai]
ANTHROPIC_BASE_URL = "https://api.z.ai/api/anthropic"
ANTHROPIC_AUTH_TOKEN = "${CNSTR_ZAI_API_KEY}"
API_TIMEOUT_MS = "3000000"
[claude.cc.minimax]
ANTHROPIC_BASE_URL = "https://api.minimax.io/anthropic"
ANTHROPIC_AUTH_TOKEN = "${CNSTR_MINIMAX_API_KEY}"
ANTHROPIC_MODEL = "MiniMax-M2"export CNSTR_ZAI_API_KEY="sk-z-..."
export CNSTR_MINIMAX_API_KEY="sk-mm-..."# Primary usage
ct cc zai
ct cc minimax --resume
# Fallback wrapper (also works)
ct claude zai "Refactor this code"
ct claude minimax --help
# List configured providers
ct cc --help| Provider | API Endpoint | Environment Variable | Notes |
|---|---|---|---|
| Z.AI | https://api.z.ai/api/anthropic | CNSTR_ZAI_API_KEY | Most popular alternative |
| MiniMax | https://api.minimax.io/anthropic | CNSTR_MINIMAX_API_KEY | Includes MiniMax-M2 model |
| Kimi | https://api.moonshot.ai/anthropic | CNSTR_KIMI_API_KEY | Moonshot AI integration |
| Qwen | https://dashscope-intl.aliyuncs.com/api/v2/apps/claude-code-proxy | CNSTR_QWEN_API_KEY | Alibaba Qwen support |
| Mimo | https://api.xiaomimimo.com/anthropic | CNSTR_MIMO_API_KEY | Xiaomi's AI service |
# Z.AI GLM Provider
[claude.cc.zai]
ANTHROPIC_BASE_URL = "https://api.z.ai/api/anthropic"
ANTHROPIC_AUTH_TOKEN = "${CNSTR_ZAI_API_KEY}"
API_TIMEOUT_MS = "3000000"
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
# MiniMax M2 Provider
[claude.cc.minimax]
ANTHROPIC_BASE_URL = "https://api.minimax.io/anthropic"
ANTHROPIC_AUTH_TOKEN = "${CNSTR_MINIMAX_API_KEY}"
API_TIMEOUT_MS = "3000000"
ANTHROPIC_MODEL = "MiniMax-M2"
ANTHROPIC_SMALL_FAST_MODEL = "MiniMax-M2"
ANTHROPIC_DEFAULT_SONNET_MODEL = "MiniMax-M2"
ANTHROPIC_DEFAULT_OPUS_MODEL = "MiniMax-M2"
ANTHROPIC_DEFAULT_HAIKU_MODEL = "MiniMax-M2"
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
# Moonshot Kimi K2 Provider
[claude.cc.kimi]
ANTHROPIC_BASE_URL = "https://api.moonshot.ai/anthropic"
ANTHROPIC_AUTH_TOKEN = "${CNSTR_KIMI_API_KEY}"
API_TIMEOUT_MS = "3000000"
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
# Alibaba Qwen Provider
[claude.cc.qwen]
ANTHROPIC_BASE_URL = "https://dashscope-intl.aliyuncs.com/api/v2/apps/claude-code-proxy"
ANTHROPIC_AUTH_TOKEN = "${CNSTR_QWEN_API_KEY}"
API_TIMEOUT_MS = "3000000"
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
# Xiaomi Mimo Provider
[claude.cc.mimo]
ANTHROPIC_BASE_URL = "https://api.xiaomimimo.com/anthropic"
ANTHROPIC_AUTH_TOKEN = "${CNSTR_MIMO_API_KEY}"
API_TIMEOUT_MS = "3000000"Construct-CLI uses automated, reproducible builds through GitHub Actions:
# Verify checksum (provided in release notes)
sha256sum constructTrust, but verify. Always download from official GitHub releases and verify checksums.
Building and testing Construct locally:
# Quick dev build and install
make install-dev # Installs to ~/.local/bin (no sudo)
# Full install with backup
sudo make install-local # Installs to /usr/local/bin with backup
# Run tests
make test
# Full CI checks
make ciSee DEVELOPMENT.md for complete development guide including:
Issues and PRs are welcome. See CONTRIBUTING.md for guidelines.
MIT – see LICENSE.md.
With (L) for my kids. Go wild!
| Back | FazBrowse Home | New Git URL |