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
- SDKs track the JoyMux monorepo (
joymux.execution.v1). Pin a git commit or tag when you integrate. - Language packages under
sdk/pythonandsdk/typescriptshare the same public operations as Rustjoymux-sdk. - Check
joymux --version/ release notes on GitHub after upgrading the daemon; keep SDK checkout in the same monorepo rev when possible.
Requirements
- JoyMux daemon running locally (
joymux daemon start, thenjoymux doctor --json) - Python ≥ 3.9 for the Python SDK
- Node ≥ 18 recommended for the TypeScript SDK
- Rust edition matching the workspace for
joymux-sdk
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.
- Discover the socket via
JOYMUX_SOCKET/joymux doctor --json/~/.joymux/integration.json - Auto-start the daemon with
joymux daemon startwhen needed - Load or create a durable client id under
~/.joymux/sdk-*-client.json - Prefer
client/resume, fall back toclient/register - 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 |
Repository links
- JoyMux (runtime + SDKs): github.com/joyortoy/joymux
- Examples:
examples/python/minimal.py,examples/typescript/minimal.ts,examples/rust/minimal - Related: Quick start, Client SDK, Authorization