Docs menu

Start

JoyMux five-minute quick start

Goal: install JoyMux, start the daemon, run a command, view events, interrupt, and close — in about five minutes.

1. Install

Rust CLI (required)

cargo install --path crates/joymux-cli
# or from a checkout:
cargo build -p joymux-cli
export PATH="$PWD/target/debug:$PATH"

Language SDK (pick one)

Rust

cargo add joymux-sdk
# path dependency during development:
# joymux-sdk = { path = "crates/joymux-sdk" }

Python

python3 -m pip install ./sdk/python
# published name (when released): pip install joymux
# or: PYTHONPATH=sdk/python python3 …

TypeScript

cd sdk/typescript && npm install
# published name (when released): npm install joymux

2. Start the daemon

joymux daemon start
joymux doctor --json   # shows socket + readiness

You normally do not need to type the socket path. SDKs discover via:

  1. JOYMUX_SOCKET / JOYMUX_UNIX_SOCKET / JOYMUX_ENDPOINT
  2. joymux doctor --json
  3. joymux endpoint --json
  4. ~/.joymux/integration.json

3. First execution

Rust

use joymux_sdk::JoyMux;

#[tokio::main]
async fn main() -> joymux_sdk::Result<()> {
    let mux = JoyMux::connect().await?;
    let mut session = mux.create_session().await?;
    let handle = session.exec("echo hello").await?;
    println!("{}", handle.execution_id);
    Ok(())
}

Python

from joymux import JoyMux

mux = JoyMux.connect()
session = mux.create_session()
session.exec("echo hello")

TypeScript

import { JoyMux } from "joymux";

const mux = await JoyMux.connect();
const session = await mux.createSession();
await session.exec("echo hello");

CLI

joymux exec -- echo hello

4. View events

events = session.events()
for e in events:
    print(e["kind"], e.get("payload"))
# after creating a session via CLI / SDK, use session id:
joymux session events <session_id>

5. Interrupt

handle = session.exec("sleep 60")
session.interrupt(handle.execution_id)
joymux execution interrupt <execution_id>

6. Close the session

session.close()
joymux session close <session_id>

7. Metrics & health

print(mux.health())
print(mux.metrics())
joymux health
joymux metrics

Next steps

Troubleshooting: run joymux doctor and see docs/troubleshooting.md.