Skip to content
dev-desktop-sandbox logo

Desktop (Electron) sandbox instances

dev-desktop-sandbox

Run isolated mux desktop (Electron) instances (temp MUX_ROOT + free ports)

SKILL.md

Full skill instructions

Desktop (Electron) sandbox instances

make dev + make start (Electron) uses MUX_ROOT for persisted state (config, sessions, worktrees, etc.). Running multiple Electron instances against the same mux root is noisy and risky during development.

This skill documents the repo workflow for starting multiple desktop dev instances in parallel (including from different git worktrees) by giving each instance its own temporary MUX_ROOT.

Quick start

make dev-desktop-sandbox

What it does

  • Creates a fresh temporary MUX_ROOT directory
  • Copies these files into the sandbox if present:
    • providers.jsonc (provider config)
    • config.json (project list)
  • Picks free ports:
    • Vite devserver port (used by the renderer)
    • Electron remote debugging port (optional)
  • Runs make dev with:
    • MUX_ROOT=<temp>
    • MUX_VITE_PORT=<free-port>
  • Waits for Vite to be reachable, then runs make build-static (Electron expects dist/​splash.html)
  • Launches Electron (bunx electron .) with:
    • MUX_ROOT=<temp>
    • MUX_DEVSERVER_HOST=127.0.0.1
    • MUX_DEVSERVER_PORT=<vite-port>
    • MUX_SERVER_PORT=0 by default (avoids EADDRINUSE if your config.json pins apiServerPort)
    • CMUX_ALLOW_MULTIPLE_INSTANCES=1 (so you can run alongside another dev instance)

Options

# Use a specific root to seed from (defaults to $MUX_ROOT then ~/​.mux-dev then ~/​.mux)
SEED_MUX_ROOT=~/​.mux-dev make dev-desktop-sandbox

# Keep the sandbox root directory after exit (useful for debugging)
KEEP_SANDBOX=1 make dev-desktop-sandbox

# Pin Vite port
VITE_PORT=5174 make dev-desktop-sandbox

# Control how long we wait for Vite to come up (ms)
VITE_READY_TIMEOUT_MS=120000 make dev-desktop-sandbox

# Enable/​pin Electron remote debugging port (defaults to an auto-picked free port)
ELECTRON_DEBUG_PORT=9223 make dev-desktop-sandbox

# Disable Electron remote debugging entirely
ELECTRON_DEBUG_PORT=0 make dev-desktop-sandbox

# Override the internal API server port (defaults to 0/​random for sandboxes)
MUX_SERVER_PORT=3772 make dev-desktop-sandbox

# Override which make binary to use
MAKE=gmake make dev-desktop-sandbox

Optional: deeper Electron isolation (MUX_E2E=1)

Even with a unique MUX_ROOT, Electron's userData directory (localStorage, window state, single-instance lock, etc.) is not automatically relocated unless MUX_E2E=1 is set.

If you want full isolation (including userData), run:

MUX_E2E=1 make dev-desktop-sandbox

Security notes

  • providers.jsonc may contain API keys.
  • The sandbox root directory is created on disk (usually under your system temp dir).
  • This flow intentionally does not copy secrets.json.

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View