Logo Cmux Freestyle

Cmux Freestyle

Tổ chức
manaflow-ai
cmux-freestyle

Set up the cmux<>Freestyle integration by building a Freestyle VM snapshot that matches the cmux Cloud VM image. Use when the user asks to bring up cmux Cloud VMs on their own Freestyle account, mint a self-serve FREESTYLE_SANDBOX_SNAPSHOT, build a cmuxd-remote Freestyle snapshot from scratch, run the standalone cmux-freestyle setup script, or iterate on the manaflow-ai/cmux-freestyle repo.

Tổng quan

Nhà phát hànhmanaflow-ai
Kho mãcmux-skills
Tên kỹ năngcmux-freestyle
Sao
39
Bản fork
2
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được manaflow-ai công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Cmux Freestyle trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/manaflow-ai/cmux-skills/tree/main/skills/cmux-freestyle
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/manaflow-ai/cmux-skills.git /tmp/cmux-skills
mkdir -p .claude/skills
cp -r /tmp/cmux-skills/skills/cmux-freestyle .claude/skills/cmux-freestyle
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Cmux Freestyle trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Cmux Freestyle ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Cmux Freestyle với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

cmux Freestyle

Use this skill when a user wants a Freestyle VM snapshot that the cmux backend can boot Cloud VMs from. It lives in its own public repo, manaflow-ai/cmux-freestyle, so anyone with a Freestyle API key can run one shell script and get back a FREESTYLE_SANDBOX_SNAPSHOT id.

Freestyle snapshots are scoped to the account that created them. A snapshot id from manaflow's account, or from any other user, will not work for a different Freestyle account. Every user has to run the setup script against their own FREESTYLE_API_KEY. There is no shortcut.

When to use

  • User asks how to point their own cmux at Freestyle.
  • User self-hosts the cmux web backend and needs a snapshot pinned to a known cmux release.
  • User wants to rebuild the cmux Cloud VM image on their own Freestyle account.
  • User wants to iterate on the standalone repo (cmux-freestyle) instead of the in-repo builder at repo/web/scripts/build-cloud-vm-images.ts.

For internal cmux development that pushes a new snapshot to manaflow's Freestyle account and updates repo/web/services/vms/images/manifest.json, keep using repo/web/scripts/build-cloud-vm-images.ts. This skill is the external-user path.

What it builds

A Freestyle snapshot from a Dockerfile that mirrors freestyleBaseDockerfileContent in the in-repo builder:

  • ubuntu:24.04, C.UTF-8, the same shell package set, the Python/OpenSSL shim required by the cmux browser proxy.
  • cmuxd-remote Linux/amd64 downloaded from a pinned manaflow-ai/cmux GitHub release, SHA-256 verified during the image build against cmuxd-remote-checksums.txt.
  • /usr/local/bin/cmux symlinked to cmuxd-remote.
  • Node.js, Bun, plus pinned coding agent CLIs (Claude Code, OpenCode, Codex, Pi).
  • Linux user cmux with passwordless sudo.
  • Systemd unit cmuxd-ws.service running cmuxd-remote serve --ws --listen 0.0.0.0:7777 --auth-lease-file ... --rpc-auth-lease-file ... on Freestyle port 443 -> 7777.

The image runs the same smoke tests as the in-repo builder, so failures show up at snapshot build time, not later inside a live VM.

How to use it

The repo is self-contained; no cmux checkout required.

bash
git clone https://github.com/manaflow-ai/cmux-freestyle.git
cd cmux-freestyle
export FREESTYLE_API_KEY=fk_...
./setup.sh

Or the one-liner:

bash
FREESTYLE_API_KEY=fk_... \
  curl -fsSL https://raw.githubusercontent.com/manaflow-ai/cmux-freestyle/main/install.sh | bash

Useful flags / env on ./setup.sh snapshot (the default subcommand):

  • --release <tag> or CMUX_RELEASE_TAG=<tag> pins the cmuxd-remote release. Default is the latest stable manaflow-ai/cmux release.
  • --name <name> or CMUX_FREESTYLE_SNAPSHOT_NAME sets the Freestyle snapshot name.
  • --skip-cache or CMUX_FREESTYLE_SKIP_CACHE=1 forces a clean Freestyle rebuild.
  • --codex-spec none, --claude-spec none, etc. drop individual agent CLIs.
  • --json emits a machine-readable result; the human path prints FREESTYLE_SANDBOX_SNAPSHOT=sh-... at the end.

The build takes 5 to 15 minutes depending on Freestyle's layer cache.

Full self-host bundle

./setup.sh is a dispatcher with four subcommands. Use them together when a user wants more than just the snapshot id:

bash
./setup.sh doctor                         # validate tools, env, Freestyle key, GitHub release
./setup.sh                                # mint a snapshot under the user's Freestyle account
./setup.sh web --snapshot sh-xxxxxx       # clone manaflow-ai/cmux, write web/.env.local, start Docker Postgres
./setup.sh home --ref feat-ink-rewrite    # install cmux-home (Ink TUI) headquarters view

web is the Next.js dev env bootstrap: it clones manaflow-ai/cmux to ~/cmux-freestyle-cmux, writes the Freestyle + Cloud VM env keys into web/.env.local, runs bun install, and brings up the per-worktree Docker Postgres unless --no-postgres is set. Stack Auth keys (STACK_SECRET_SERVER_KEY, NEXT_PUBLIC_STACK_PROJECT_ID, NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY) are honoured if exported but optional. The script only needs git and bun (plus docker for Postgres).

home is the "headquarters view": it installs and prepares the Ink/TypeScript port of cmux-home at ~/cmux-freestyle-home/ink. The TUI connects to the local cmux app's Unix socket and gives end users a Node-only dashboard of every workspace plus a Codex/Claude composer. The Ink port currently lives on the feat-ink-rewrite branch; switch the default --ref once it merges to main. The Rust crate at the cmux-home repo root remains the full-featured upstream.

If FREESTYLE_API_KEY is set in the env when bun dev runs (the home script exports it from the user's ~/.secrets/cmux.env and the shell), cmux-home renders a second panel under the workspace list titled Freestyle VMs (N). Each row shows the VM id, state, snapshot id (the one from ./setup.sh snapshot), and age. This makes the TUI a single dashboard for both local cmux workspaces and the user's Freestyle Cloud VMs, with the same selection cursor walking both panels.

Selecting a VM enables the following actions on the row:

  • enter opens the sandbox workflow: creates a new cmux workspace running freestyle-vm-ssh <vmId>. The helper script mints a short-lived Freestyle SSH identity, opens an SSH session through vm-ssh.freestyle.sh with -R 31415:127.0.0.1:31415 (reverse-forward to the local Subrouter AI gateway on 127.0.0.1:31415) plus -L forwards for common dev ports (3000, 5173, 8000, 8080), writes a ~/.codex/config.toml inside the VM that points openai_base_url at the forwarded subrouter, then drops into a login shell. Codex launched inside the VM in that shell routes through Subrouter on the user's mac. Also opens a browser pane on the right at http://127.0.0.1:3000.
  • ctrl+o opens the local-codex workflow: a normal cmux workspace at the TUI's --cwd, no SSH, plus a browser pane on the right at https://<vmId>.vm.freestyle.sh. Codex/Claude run on the mac against the local checkout; the VM is treated as a remote dev server.
  • ctrl+x destroys the VM through the Freestyle SDK.
  • ctrl+n on the Freestyle VMs (N) header creates a new VM from FREESTYLE_SANDBOX_SNAPSHOT.

Freestyle gateway constraint. The Freestyle SSH gateway at vm-ssh.freestyle.sh rejects -R remote port forwarding (remote port forwarding failed for listen port 31415). The --reverse-subrouter flag is therefore opt-in and works only for ordinary Linux/macOS sshd hosts.

Default path for codex inside a Freestyle VM (works today): freestyle-vm-ssh mints an ephemeral preauth Tailscale key via tsadmin api POST /tailnet/-/keys (tag tag:server, expires in 1h), runs tailscale up inside the VM under userspace networking (--tun=userspace-networking), enables tailscaled's HTTP proxy + SOCKS5 server on 127.0.0.1:1055, writes /etc/profile.d/cmux-tailnet-proxy.sh so every login shell exports HTTP_PROXY/HTTPS_PROXY/NO_PROXY, and writes ~/.codex/config.toml with openai_base_url = "http://subrouter-team.tail41290.ts.net:31415/v1". Codex inside the VM then connects to the existing subrouter-team host on the tailnet through the local proxy, so all OpenAI traffic is routed through Subrouter's account scheduling. The cmux-freestyle snapshot already ships the apt tailscale package, so first-time bring-up is ~6 s end-to-end; subsequent sessions reuse the existing state.

Disable per-call with --no-tailscale, override the subrouter URL with --subrouter-url <url> or SUBROUTER_REMOTE_URL, override the auth-key with --tailscale-authkey <key> or TAILSCALE_AUTHKEY. Today Subrouter only routes Codex, so use Codex inside the VM until Subrouter adds Claude/OpenCode support.

Helper requires sshpass on the mac (brew install hudochenkov/sshpass/sshpass) and tsadmin on PATH (skills/tsadmin/scripts/tsadmin).

GitHub auth

The snapshot builder talks only to public GitHub endpoints (/repos/manaflow-ai/cmux/releases/latest and the release-asset cmuxd-remote-checksums.txt). The unauthenticated GitHub API allows 60 requests per hour, which is fine in normal use. If a user hits a 403/429 (shared IP, CI loops, repeated rebuilds), they should set GITHUB_TOKEN (or GH_TOKEN) and the script forwards it on both the API call and the checksums download. Mention this when guiding a CI integration.

The Freestyle SDK only needs FREESTYLE_API_KEY; no GitHub credentials are required for snapshot creation. setup.sh web clones manaflow-ai/cmux anonymously, so no auth is required there either; only suggest gh auth login if a user explicitly wants git push against their own fork.

Plugging the snapshot into cmux

After the script prints the snapshot id, hand the user the env block for their cmux backend:

bash
FREESTYLE_API_KEY=fk_...
FREESTYLE_SANDBOX_SNAPSHOT=sh-xxxxxxxxxxxxxxxxxxxx
CMUX_VM_DEFAULT_PROVIDER=freestyle
CMUX_VM_FREESTYLE_ENABLED=1

The FREESTYLE_API_KEY and FREESTYLE_SANDBOX_SNAPSHOT must come from the same Freestyle account. Snapshot ids from other accounts will fail to boot.

For ad-hoc smoke testing:

bash
npx -y freestyle vm create --snapshot <snapshotId> --ssh

Inside the VM, confirm everything baked correctly:

bash
cmuxd-remote version
cmux --help
claude --version
codex --version
node --version
bun --version

Iterating on the repo

The whole builder is one TypeScript file at scripts/build-snapshot.ts. When updating it, keep it in lockstep with the source of truth in repo/web/scripts/build-cloud-vm-images.ts:

  • Pinned agent CLI versions (CLOUD_AGENT_TOOLS).
  • Default Node major and Bun version.
  • Dockerfile body (freestyleBaseDockerfileContent, pythonOpenSSLCommands, toolInstallCommands, rootSetupCommands, imageSmokeTestCommands).
  • Snapshot create call shape and recovery behavior (waitForFreestyleSnapshotByName).

When cmux changes any of those, bump the matching constant in cmux-freestyle, ship a release, and update the cmux release tag the script defaults to if anything in the URL/checksum contract changes.

The Freestyle CLI (npx -y freestyle vm ...) covers VM create / list / ssh / exec / delete but does not expose snapshot create. That's why this script uses the freestyle SDK directly. Do not try to replace it with a CLI-only shell script.

Rules

  • Do not promise users that a shared snapshot id will work for them. It will not. Every user runs ./setup.sh once with their own Freestyle API key.
  • Do not bake provider API keys, R2 credentials, or anything user-specific into the snapshot. The Dockerfile must stay reproducible from public inputs only.
  • Do not point the snapshot at an unreleased cmuxd-remote. Use a published manaflow-ai/cmux release tag so SHA-256 verification has something to anchor on.
  • Do not loosen the agent CLI version policy. Specs must be exact semver pins; ranges and latest are rejected on purpose so each rebuild is reproducible.
  • Do not run this against the manaflow Freestyle account when iterating. Use a personal Freestyle account; manaflow's snapshot lifecycle is managed by the in-repo builder and the cmux image manifest.

Câu hỏi thường gặp

Kỹ năng AI Cmux Freestyle làm được gì?

Set up the cmux<>Freestyle integration by building a Freestyle VM snapshot that matches the cmux Cloud VM image. Use when the user asks to bring up cmux Cloud VMs on their own Freestyle account, mint a self-serve FREESTYLE_SANDBOX_SNAPSHOT, build a cmuxd-remote Freestyle snapshot from scratch, run the standalone cmux-freestyle setup script, or iterate on the manaflow-ai/cmux-freestyle repo.

Vì sao nên dùng Cmux Freestyle trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Cmux Freestyle là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Cmux Freestyle trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/manaflow-ai/cmux-skills/tree/main/skills/cmux-freestyle. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Cmux Freestyle?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Cmux Freestyle với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Cmux Freestyle với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Cmux Freestyle có miễn phí không?

Có. Kỹ năng này được manaflow-ai phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇