Reference · toolkit

SDKs and npm packages.

Three packages are published on npm for building apps and themes against rumahl OS. The shell and the SSR server stay inside the workspace, because they are the platform rather than an app dependency.

12 min readUpdated 25 November 2026npm 0.1.0

This page is written against the current checkout and the public registry. The packages are early: the registry and the local source can be at different points in time. Pin the exact version you tested and check the exports you import.

Published packages

PackageLatestUseWhere
@rumahl/ui0.1.0RUI components, tokens, themes, icons and CSSnpm
@rumahl/bridge-client0.1.0Typed client for rumahl.bridge.v1npm
@rumahl/contracts0.1.0Bridge, event, widget and snapshot typesnpm
@rumahl/shell—The first-party OS shell React appworkspace
@rumahl/ssr—Server rendering and shell responseworkspace
rumahl-package—Keygen, sign and verify packagesrepo binary
Three public packagesWorkspace-only shell

Install

Install the three public packages with the version you verified. The bridge client depends on the matching contracts version.

install
# pnpm
pnpm add @rumahl/ui@0.1.0 @rumahl/bridge-client@0.1.0 @rumahl/contracts@0.1.0

# npm
npm install @rumahl/ui@0.1.0 @rumahl/bridge-client@0.1.0 @rumahl/contracts@0.1.0
RequirementWhat you need
Node.js>=20 for every published package
React>=19 as a peer dependency of @rumahl/ui
BundlerESM support and CSS imports, for example Vite or Next.js
Next.jsAdd @rumahl/ui to transpilePackages if your setup does not transpile package JavaScript automatically

RUI components and themes

@rumahl/ui is the operating-system design system. It is not RWDS. Import the styles once, wrap the app in ThemeProvider and use semantic tokens instead of local colors.

Example.tsx
import { Button, GroupContainer, GroupRow } from "@rumahl/ui/components";
import "@rumahl/ui/base.css";
import "@rumahl/ui/primitives.css";

export function Example() {
  return (
    <GroupContainer>
      <GroupRow>
        <Button variant="primary">Continue</Button>
      </GroupRow>
    </GroupContainer>
  );
}
Entry pointWhat it exposes
@rumahl/uiTokens, color helpers, theme registry, slots and the SDK
@rumahl/ui/componentsReact components and controls
@rumahl/ui/iconsThe system icon set
@rumahl/ui/i18nThe German and English message catalog provider
@rumahl/ui/*.cssBase, materials, primitives, controls and component styles

See Create a theme for the token and package workflow. The theme package format is separate from the npm component package.

Bridge client

@rumahl/bridge-client is framework-agnostic. It performs the hello/welcome handshake, binds messages to the parent frame and exposes typed helpers. Outside the shell, available is false and calls reject instead of hanging.

bridge.ts
import { connectRumahlBridge } from "@rumahl/bridge-client";

const rumahl = connectRumahlBridge();
await rumahl.ready();

const info = await rumahl.info();
const theme = await rumahl.theme();
const settings = await rumahl.settings();
await rumahl.notify({ message: "Synced", variant: "success" });

rumahl.watchTheme((next) => applyTheme(next));
rumahl.window.minimize();
HelperPurpose
info()Bounded app and account information
theme() / watchTheme()Read the semantic palette and follow changes
notify()Send a user notification
settings() / setSettings()Read or write the app’s own settings; secrets are write-only
requestNetwork()Brokered HTTP(S) request to a consented origin
provide()Register a provided capability handler
invokeCapability()Call another app’s capability through the platform
window.*Close, minimize or focus the app window

A method is refused unless the signed manifest declares the matching capability. The npm package does not bypass the platform’s consent, lease or origin checks.

Contracts

@rumahl/contracts/bridge owns the protocol version, the complete method union, capability ids and message types. Use it instead of copying string literals into an app.

contracts.ts
import {
  RUMAHL_BRIDGE,
  RUMAHL_BRIDGE_VERSION,
  BRIDGE_METHODS,
  BRIDGE_CAPABILITIES
} from "@rumahl/contracts/bridge";

RUMAHL_BRIDGE;              // "rumahl.bridge.v1"
RUMAHL_BRIDGE_VERSION;      // 1
BRIDGE_METHODS;             // the complete v1 method surface
BRIDGE_CAPABILITIES.window; // "com.rumahl.os.window"
Entry pointWhat it validates or exposes
@rumahl/contractsSnapshot and contribution types for UI contract v1
@rumahl/contracts/parseBounded shell snapshot parsers
@rumahl/contracts/eventsShell event parser
@rumahl/contracts/widgetWidget frame descriptor validation
@rumahl/contracts/bridgeThe rumahl.bridge.v1 message contract

The protocol is versioned. New methods are additive; a caller should still check the app’s declared capabilities and handle a refusal.

Workspace-only packages

@rumahl/shell and @rumahl/ssr are first-party applications, not an SDK. They are consumed inside the rumahl frontend workspace and are not published to npm. Cloning the repository is the supported way to run or modify them.

workspace
git clone https://github.com/rumahl/rumahl.git
cd rumahl
pnpm --dir frontend install --frozen-lockfile

The local package manifests keep private: true. The public tarballs are built artifacts; do not infer that the source tree and the registry metadata are byte-identical.

Package CLI

shell
cargo run -p rumahl-app-packages --bin rumahl-package -- keygen \
  --key-id example-1 --publisher com.example --keystore keys/example.json

cargo run -p rumahl-app-packages --bin rumahl-package -- sign \
  --package dist/notes --manifest dist/notes/package.json \
  --keystore keys/example.json

cargo run -p rumahl-app-packages --bin rumahl-package -- verify \
  --package dist/notes --trust-store trust.json

The CLI is a Rust binary in the repository. It is not part of the npm packages and does not read a shell session.

Versions and compatibility

Package versions, contract versions and the OS release are separate promises. A new SDK patch does not silently change formatVersion or rumahl.bridge.v1.

Version surfaceCurrentRule
@rumahl/ui0.1.0Pin exact; 0.1.1 exists but is not the latest tag
@rumahl/bridge-client0.1.0Keep it aligned with contracts 0.1.0
@rumahl/contracts0.1.0Use the matching protocol version
Bridge protocolrumahl.bridge.v1Additive methods; unknown required versions are unsupported
Package formatformatVersion: 1The signed manifest is authoritative

See Versions and compatibility for the complete contract table and the rules for updates.

Platform APIs

The HTTP API, bridge, OIDC and store source endpoints are documented in the API reference. SDK helpers do not change the server-side authorization boundary; they only make the calls typed.

Next