- Do not use emojis in shell scripts or debug messages
Production models (use for --agent on feature/fix tasks):
claude/opus-4.6claude/opus-4.5codex/gpt-5.4-xhigh
Test models (use for --agent only for testing/validation, NOT for real work):
claude/haiku-4.5codex/gpt-5.1-codex-miniopencode/big-pickle
Test repos (use for devsh task create --repo):
karlorz/testing-repo-1karlorz/testing-repo-2karlorz/testing-repo-3
- gh repo set-default karlorz/cmux ✓ Set karlorz/cmux as the default repository for the current directory
- NEVER use
--delete-branchwhen merging PRs - The web app needs branches for git diff calculations on merged tasks. Deleting branches causes +0-0 display. - Correct merge:
gh pr merge <number> --squash --autoto merge once checks pass - Do NOT use:
--delete-branchor--adminunless explicitly requested
- PVE snapshot helper writes to
logs/snapshot-pvelxc.log
# Requires CLOUDROUTER_REFRESH_TOKEN in .env
bun install && make install-cloudrouter-dev && cloudrouter whoami
# Then: make dev (terminal 1), cloudrouter start . (terminal 2)
# Dev build automatically uses cmux-devbox-lite-dev template
cloudrouter start . -p e2b # uses cmux-devbox-lite-dev (8 GB, dev build default)
# Force production template (if needed)
CLOUDROUTER_DEV_MODE=0 cloudrouter start . -p e2b # uses cmux-devbox-lite (16 GB)
# Set default sandbox provider in Convex env (optional, default: pve-lxc)
# SANDBOX_PROVIDER=pve-lxc # or: morph, e2b, modalmake install-devsh-prod: Build and install production devsh binary locally (reads .env.production)make devsh-npm-republish-prod-dry: Dry-run npm publishmake devsh-npm-republish-prod: Publish devsh@x.y.z to npm (browser 2FA auth)- Version bump:
cd packages/devsh && make npm-version VERSION=x.y.z - Go module:
github.com/karlorz/devsh(fork-owned, do not change)
make convex-fresh: Fresh Convex setup and start concex service via docker compose, it will delete convex data volumemake convex-init: Init Convex DB using .envmake convex-init-prod: Init Convex DB using .env.productionmake convex-clear-prod: Danger Reset, Destroy prod convexbun run convex:deploy: Deploy Convex DB using .envbun run convex:deploy:prod: Deploy Convex DB using .env.productionmake dev: start the project with./scripts/dev.shmake dev-electron: start the project with electron remote debug
- PVE API docs: https://pve.proxmox.com/pve-docs/api-viewer/
- PVE API wiki: https://pve.proxmox.com/wiki/Proxmox_VE_API
- PVE docs repo: https://github.com/proxmox/pve-docs
Required Environment Variables:
PVE_API_URL=https://pve.example.comPVE_API_TOKEN=root@pam!mytoken=12345678-1234-1234-1234-1234567890ab
uv run --env-file .env ./scripts/snapshot-pvelxc.py --update --update-vmid <vmid>
# One-liner: download and run setup script on PVE host
curl -fsSL https://raw.githubusercontent.com/karlorz/cmux/main/scripts/pve/pve-lxc-setup.sh | bash -s -- 9000
# Or with custom options
curl -fsSL https://raw.githubusercontent.com/karlorz/cmux/main/scripts/pve/pve-lxc-setup.sh | bash -s -- 9000 --memory 8192 --cores 8- Use
--ide-deps-channel latestflag ORIDE_DEPS_CHANNEL=latestenv var to get latest CLI versions uv run --env-file .env ./scripts/snapshot-pvelxc.py --template-vmid 9000 --ide-deps-channel latest- Or with env var and custom options:
# Build snapshots from template (after base template exists on PVE)
IDE_DEPS_CHANNEL=latest uv run --env-file .env ./scripts/snapshot-pvelxc.py \
--template-vmid 9000 \
--standard-vcpus 4 \
--standard-memory 8192 \
--standard-disk-size 32768 \
--boosted-vcpus 6 \
--boosted-memory 8192 \
--boosted-disk-size 40960gh workflow run "Weekly PVE LXC Snapshot" --repo karlorz/cmux --ref main
gh workflow run "Daily Morph Snapshot" --repo karlorz/cmux --ref main
uv run --env-file .env ./scripts/snapshot.py \
--snapshot-id snapshot_7wbqo5jd \
--standard-vcpus 4 \
--standard-memory 8192 \
--standard-disk-size 32768 \
--boosted-vcpus 6 \
--boosted-memory 8192 \
--boosted-disk-size 32768MORPH_API_KEY=morph_...# Required
PVE_API_URL=https://pve.example.com
PVE_API_TOKEN=root@pam!mytoken=abc123...
PVE_PUBLIC_DOMAIN=example.com # For Cloudflare Tunnel
# Optional (auto-detected)
# PVE_NODE, PVE_STORAGE, PVE_BRIDGE, PVE_GATEWAY, PVE_VERIFY_TLSCF_API_TOKEN=... # Zone:DNS:Edit + Tunnel:Edit permissions
CF_ZONE_ID=... # From Cloudflare dashboard
CF_ACCOUNT_ID=... # From Cloudflare dashboard
CF_DOMAIN=example.com# Convex
CONVEX_DEPLOY_KEY="..."
NEXT_PUBLIC_CONVEX_URL=https://your-project.convex.cloud
# Stack Auth
NEXT_PUBLIC_STACK_PROJECT_ID=...
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=pck_...
STACK_SECRET_SERVER_KEY=ssk_...
STACK_SUPER_SECRET_ADMIN_KEY=sk_...
STACK_DATA_VAULT_SECRET=your-32-char-secret
STACK_WEBHOOK_SECRET=whsec_...
# GitHub App
CMUX_GITHUB_APP_ID=1234567
CMUX_GITHUB_APP_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----..."
GITHUB_APP_WEBHOOK_SECRET=...
INSTALL_STATE_SECRET=...
# AI & JWT
ANTHROPIC_API_KEY=sk-ant-...
CMUX_TASK_RUN_JWT_SECRET=...
BASE_APP_URL=http://localhost:9779
# Sandbox (choose one)
MORPH_API_KEY=morph_...
# OR: PVE_API_URL + PVE_API_TOKEN + PVE_PUBLIC_DOMAINFor complete environment variable documentation by deployment target, see:
There are two edge routers:
apps/edge-router/- Main edge router for Morph sandboxes, deploys tocmux.sh(manaflow's domain)apps/edge-router-pvelxc/- Fork for PVE-LXC sandboxes, deploys to*.alphasolves.com(karlorz's domain)
When working on PVE-LXC sandbox features, use apps/edge-router-pvelxc/. Deploy with:
cd apps/edge-router-pvelxc && bun run deployThis legacy file must not define a separate knowledge target. Use the active repository memory in CLAUDE.md / AGENTS.md.
- Resolve the current SkillWiki vault with
skillwiki path; do not hard-code a vault path in this legacy memory file. - cmux project workspace:
<resolved-vault>/projects/cmux/. - If
skillwiki pathcannot resolve a current vault, runskillwiki doctorand report the failure instead of falling back to legacy Obsidian vaults or repositories.
Update notes when any of the following changes land:
- Architecture or pipeline direction changes.
- Agent/governance/dev-cycle rule changes.
- Major API surface or workflow behavior changes.
- Significant migration strategy or workspace isolation changes.
- Include date, concise decision summary, and affected repo-relative paths.
- Link related PR/commit IDs when available.
- Never include secrets, tokens, credentials, or private environment values.
- Keep operational facts in shared notes; keep volatile TODOs in local task trackers.
- No phase-by-phase completion ledgers.
- No temporary pending migration queues.
- No large UI mockups or long architecture diagrams.
- No duplicated deep config examples better maintained in
config/*or implementation docs.
Keep this file short, stable, and execution-oriented.