Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@freestyle-sh/fdev-cmux

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@freestyle-sh/fdev-cmux

Small SDK and fdev provider facade for opening workspaces in local `cmux`.

latest
Source
npmnpm
Version
0.1.7
Version published
Maintainers
3
Created
Source

@freestyle-sh/fdev-cmux

Small SDK and fdev provider facade for opening workspaces in local cmux.

import { createCmuxClient } from "@freestyle-sh/fdev-cmux";

const cmux = createCmuxClient();

await cmux.newWorkspace({
  name: "playground",
  command: "echo hello world",
  focus: true,
});

Commands are printed to stderr before execution:

$ cmux new-workspace --name playground --command 'echo hello world' --focus true

cmux new-workspace and cmux ssh are socket commands. With cmux's default socket control mode (cmuxOnly), run fdev from a terminal inside cmux so cmux sets CMUX_SOCKET_PATH and accepts the process.

If you intentionally enable external socket control in cmux, opt in explicitly:

const cmux = createCmuxClient({ allowExternalAutomation: true });

With allowExternalAutomation, the SDK can run open -a cmux and retry a workspace command while cmux starts.

Config-defined operations can request the typed cmux.open host capability through the provider facade:

import { workflow } from "@freestyle-sh/fdev";
import { cmux } from "@freestyle-sh/fdev-cmux";

export default workflow("site", {
  providers: {
    cmux: cmux.provider(),
  },
})
  .sequence("site")
  .operation("open", {
    requiredHostCapabilities: [cmux.capabilities.open],
    run: async ({ providers }) => {
      await providers.cmux.open({
        name: "site",
        ssh: {
          host: "vm-ssh.freestyle.sh",
          username: "vm_123",
          auth: { type: "token", token: "token_123" },
        },
        cwd: "/workspace/site",
        command: "pnpm dev",
        url: "http://localhost:3000",
      });
    },
  });

Local hosts can import @freestyle-sh/fdev-cmux/host to register the trusted cmux.open handler. The fdev CLI registers this handler automatically.

FAQs

Package last updated on 12 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts