Skip to main content
The Yasumu SDK is distributed as the @yasumu/core package on npm.

Install the package

Install using your preferred package manager:
npm install @yasumu/core

Package configuration

The package supports multiple module systems and runtimes:
{
  "exports": {
    "deno": "./src/index.ts",
    "node": "./dist/index.js",
    "default": "./dist/index.js",
    "import": "./dist/index.js",
    "require": "./dist/index.js",
    "types": "./dist/index.d.ts"
  }
}

Supported runtimes

  • Node.js - CommonJS and ESM modules
  • Deno - Direct TypeScript import
  • Bun - Native ESM support
  • Browser - Bundler-compatible

TypeScript configuration

The package includes TypeScript definitions. No additional @types packages are needed.
{
  "compilerOptions": {
    "moduleResolution": "bundler",
    "module": "ESNext",
    "target": "ES2020"
  }
}

Create a Yasumu instance

After installation, create a Yasumu instance with a platform bridge:
import { createYasumu } from '@yasumu/core';
import type { PlatformBridge } from '@yasumu/rpc';

// Implement your platform bridge
const platformBridge: PlatformBridge = {
  invoke: async (method, args) => {
    // Platform-specific RPC implementation
    return yourRpcClient.call(method, args);
  },
};

const yasumu = createYasumu({
  platformBridge,
  events: {
    onWorkspaceActivated: (workspace) => {
      console.log('Activated:', workspace.name);
    },
  },
});

await yasumu.initialize();

Platform bridge

The platform bridge is required and connects the SDK to the Yasumu backend. It must implement the PlatformBridge interface:
interface PlatformBridge {
  invoke(method: string, args: unknown[]): Promise<unknown>;
}
The bridge handles:
  • RPC communication with the backend
  • Platform-specific API calls
  • Serialization and deserialization

Next steps

Yasumu class

Learn about the main SDK class

Workspace

Create and manage workspaces

Build docs developers (and LLMs) love