Standalone local design workflow for Codex.
@12ui/codex-design installs a local browser app and the 12ui Design Codex plugin. Codex uses the app to generate UI design options, opens the returned URL in the Codex in-app browser, waits while the user chooses a design, then continues from the selected 12ui handover.
Install the local app, codex-design launcher, 12ui Design plugin, and plain $design skill:
npx -y @12ui/codex-design installYou can also add the public plugin marketplace entry:
codex plugin marketplace add just-every/12ui-codexcodex plugin marketplace add registers the marketplace with Codex. It does not run the npm installer or create the plain $design skill by itself in current Codex builds, so use the npx installer for the full setup.
The installer:
- installs the local
codex-designlauncher - installs and enables the
12ui DesignCodex plugin - installs the plugin marketplace under
~/.local/share/12ui/codex-design/marketplace - installs the
$designskill at~/.agents/skills/design/SKILL.mdfor Codex skill autocomplete - removes the old loose
~/.codex/skills/designskill install if present
- Codex runs:
codex-design launch --json- Codex creates a workspace:
cat <<'JSON' | codex-design create --json
{
"prompt": "Create a clean mobile checkout screen for a premium coffee app.",
"seedVariationCount": 3,
"aspect": "portrait",
"referenceDataUrls": []
}
JSON-
Codex opens the returned
browserUrl/workspaceUrlin the Codex in-app browser and shows the link to the user. -
The user reviews generated designs in the in-app browser and clicks
Choose design. -
Codex waits for selection:
codex-design wait --workspace <workspaceId> --event seed_design_selected --timeout-ms 1800000-
If 12ui is connected, HTML handover starts automatically after selection; otherwise the user connects 12ui or clicks
Handoff. -
Codex waits for handover:
codex-design wait --workspace <workspaceId> --event handover_completed,handover_failed --timeout-ms 1800000- Codex implements from the returned
handoverHtmlUrl,handoverUrl, andzipUrlwhen present.
Do not start from a blank page. The handover assets are the implementation source of truth.
For multi-page app or site work:
- Create/open the workspace.
- Wait for
seed_design_selected. - Plan pages through the local workspace API or UI.
- Generate page variations.
- Wait for
page_variation_selected. - If 12ui is connected, HTML handover starts automatically after selection. Wait for
handover_completed; otherwise the user connects 12ui or clicksHandoff.
codex-design launch --jsonStarts or reuses the local server and returns JSON with origin, port, status, browserUrl, and userMessage. Codex should open browserUrl in the in-app browser.
cat request.json | codex-design create --jsonCreates a workspace and starts seed generation.
Important response fields:
workspaceIdworkspaceUrlbrowserUrlseedRunIduserMessage
The browserUrl, workspaceUrl, and userMessage are user-facing. Open browserUrl in the Codex in-app browser and show the useful link/message to the user.
codex-design wait --workspace <workspaceId> --event seed_design_selected --timeout-ms 1800000Waits for bridge events.
Supported event types:
seed_design_selectedpage_variation_selectedhandover_startedhandover_completedhandover_failed
codex-design context --workspace <workspaceId>Returns current workspace context and bridge status. Use this to resume interrupted work.
codex-design event-log --workspace <workspaceId>Returns persisted bridge events for recovery and debugging.
codex-design launch automatically finds and remembers a free port.
- It reuses the remembered server if it is still alive.
- If the remembered server is not alive, it scans for a free port.
- The default scan range is
9971-9999. - The remembered port is stored under
~/.12ui/codex-design/server/codex-design-server/server.json.
Environment overrides:
CODEX_12UI_PORT=9985 codex-design launch --json
CODEX_12UI_PORT_RANGE=10000-10100 codex-design launch --json
CODEX_12UI_DATA_DIR=/path/to/data codex-design launch --jsonpnpm install
pnpm run devUseful checks:
pnpm run typecheck
pnpm run test
pnpm run buildPackage smoke:
npm pack --dry-run
node dist/server/server/cli.js launch --jsonThe release workflow is .github/workflows/release.yml.
On relevant pushes to main, it:
- installs dependencies
- runs typecheck, tests, and build
- bumps the package version
- tags
codex-design-vX.Y.Z - publishes
@12ui/codex-designto npm - creates a GitHub Release
Required GitHub secret:
NPM_TOKEN
Optional GitHub secret:
GH_PAT, if branch protection blocksGITHUB_TOKENfrom pushing release commits or tags