Docs menu

Integrate

JoyMux public SDK

Stable harness-facing API for joymux.execution.v1. SDKs never expose internal runtime crates.

Package status (important)

Registry Name Status
crates.io joymux-sdk Use path / git from the JoyMux monorepo until a crates.io release is cut
PyPI joymux Not published yet — install from the GitHub checkout (sdk/python)
npm joymux Not published yet — install from the GitHub checkout (sdk/typescript)

Public name joymux is intentional; registry uploads are still unreleased. Until then, install from github.com/joyortoy/joymux. Do not expect npm install joymux or pip install joymux to resolve a published package yet.

Version notes

Requirements

Install from GitHub (current)

git clone https://github.com/joyortoy/joymux.git
cd joymux

Python

python3 -m pip install ./sdk/python
# or during development:
# PYTHONPATH=sdk/python python3 …

TypeScript

cd sdk/typescript && npm install

Rust

# Cargo.toml (path dependency during development)
joymux-sdk = { path = "crates/joymux-sdk" }
cargo add joymux-sdk   # when published; until then use the path dependency above

Minimal examples

Python

from joymux import JoyMux

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

TypeScript

import { JoyMux } from "joymux";

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

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(())
}

CLI (no SDK)

joymux daemon start
joymux doctor --json
joymux exec --jsonl -- echo hello

Authentication / setup

SDKs talk to the local JoyMux daemon. They do not use cloud API keys.

  1. Discover the socket via JOYMUX_SOCKET / joymux doctor --json / ~/.joymux/integration.json
  2. Auto-start the daemon with joymux daemon start when needed
  3. Load or create a durable client id under ~/.joymux/sdk-*-client.json
  4. Prefer client/resume, fall back to client/register
  5. Call reconnect() after a daemon restart

Card billing / JoyPay entitlements are separate from the SDK wire path.

Public API (same semantics everywhere)

Operation Rust Python TypeScript
connect JoyMux::connect JoyMux.connect JoyMux.connect
create_session mux.create_session mux.create_session mux.createSession
execute session.exec session.exec session.exec
events session.events session.events session.events
checkpoint / resume session.checkpoint / resume same same
health / metrics mux.health / metrics same same