Skip to content
DeskSSH

SDK

The app-runtime

Apps compile against @deskssh/app-runtime — the same SDK the built-in apps use. It gives you a registration hook, session context, UI primitives, and typed gateway calls.

Your entry self-registers with registerApp, returning an app definition: id, title, icon, the version ranges, and a render function. That render receives an AppContext with the translator t, the live session, and helpers like openTerminal and openEditor.

The runtime also re-exports the host UI kit (Card, Button, ScrollArea…), the full icon set, and the gateway functions (listServices, serviceAction, and the rest of the Contract). Externalize react and @deskssh/app-runtime at build time so your app shares the host’s single instances.

src/index.tsx tsx
import {
  registerApp,
  Card, CardHeader, CardTitle, CardContent,
  listServices, icons,
} from '@deskssh/app-runtime';

registerApp((t) => ({
  id: 'services',
  title: t('services.title'),
  description: t('services.description'),
  icon: icons.ServerCog,
  version: '0.1.0',
  contract: '^0.1.0',
  author: { name: 'you', github: 'you' },
  capabilities: ['listServices', 'serviceAction'],
  render: (ctx) => {
    // ctx.session, ctx.t, ctx.openTerminal, ctx.openEditor
    return <ServicesView session={ctx.session} />;
  },
}));

Start from the reference app

The app-services plugin in the core repo is a complete, buildable example — the fastest way to a working scaffold.