npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@elyos-dev/sdk

v0.1.15

Published

ElyOS SDK — runtime and development SDK for ElyOS plugin development

Downloads

1,386

Readme

@elyos-dev/sdk

The official SDK for building ElyOS apps. Provides runtime services (injected by ElyOS), a mock SDK for standalone development, and full TypeScript type definitions.

Installation

# npm / bun
bun add @elyos-dev/sdk

# JSR (Deno / Bun / Node)
bunx jsr add @elyos-dev/sdk
# or
deno add jsr:@elyos-dev/sdk

Package Exports

| Export | Description | | ---------------------- | -------------------------------------------- | | @elyos-dev/sdk | Runtime SDK (injected by ElyOS at load time) | | @elyos-dev/sdk/dev | Mock SDK for standalone development | | @elyos-dev/sdk/types | TypeScript type definitions only |

Quick Start

Runtime Mode (inside ElyOS)

When your app runs inside ElyOS, the SDK is automatically injected into window.webOS:

const sdk = window.webOS!;

sdk.ui.toast('Hello from my app!', 'success');

const user = sdk.context.user;
console.log(`Logged in as ${user.name}`);

Development Mode (standalone)

For local development without a running ElyOS instance, use the mock SDK:

// src/main.ts
import { MockWebOSSDK } from '@elyos-dev/sdk/dev';

if (!window.webOS) {
	MockWebOSSDK.initialize({
		context: {
			pluginId: 'my-app',
			user: { id: '1', name: 'Dev User', email: '[email protected]', roles: ['admin'], groups: [] }
		},
		i18n: {
			locale: 'en',
			translations: {
				en: { greeting: 'Hello, {name}!' },
				hu: { greeting: 'Szia, {name}!' }
			}
		}
	});
}

const sdk = window.webOS!;
sdk.ui.toast('Running in dev mode', 'info'); // → logs to console

The mock SDK simulates all services locally:

  • Toasts and dialogs log to the browser console
  • Data storage uses localStorage
  • Remote calls can be configured with custom handlers
  • i18n works with provided translation maps

Types Only

import type { WebOSSDKInterface, UIService, DataService } from '@elyos-dev/sdk/types';

API Overview

ui — UI Service

sdk.ui.toast('Saved!', 'success', 3000);
const result = await sdk.ui.dialog({ title: 'Confirm', message: 'Delete?', type: 'confirm' });
const theme = sdk.ui.theme; // Current theme colors
const components = sdk.ui.components; // ElyOS UI components

data — Data Service

await sdk.data.set('settings', { darkMode: true });
const settings = await sdk.data.get<{ darkMode: boolean }>('settings');
await sdk.data.delete('settings');

// SQL queries (requires `database` permission)
const rows = await sdk.data.query<User>('SELECT * FROM users WHERE active = $1', [true]);

// Transactions
await sdk.data.transaction(async (tx) => {
	await tx.query('INSERT INTO items (name) VALUES ($1)', ['New Item']);
	await tx.commit();
});

remote — Remote Service

const result = await sdk.remote.call<{ items: Item[] }>('getItems', { page: 1 });
const saved = await sdk.remote.call('saveItem', { name: 'Test' }, { timeout: 5000 });

i18n — Internationalization Service

const label = sdk.i18n.t('greeting', { name: 'World' }); // "Hello, World!"
const currentLocale = sdk.i18n.locale; // "en"
await sdk.i18n.setLocale('hu');
await sdk.i18n.ready(); // Wait for translations to load

notifications — Notification Service

// Requires `notifications` permission
await sdk.notifications.send({
	userId: 'user-123',
	title: 'New message',
	message: 'You have a new message',
	type: 'info'
});

context — Context Service

const pluginId = sdk.context.pluginId;
const user = sdk.context.user; // { id, name, email, roles, groups }
const params = sdk.context.params; // Parameters passed when opening the app
const perms = sdk.context.permissions; // ['database', 'notifications', ...]

sdk.context.window.setTitle('My App — Settings');
sdk.context.window.close();

assets — Asset Service

const iconUrl = sdk.assets.getUrl('icon.svg');
const imageUrl = sdk.assets.getUrl('images/banner.png');

TypeScript Support

All service interfaces are exported from @elyos-dev/sdk/types:

import type {
	WebOSSDKInterface,
	UIService,
	RemoteService,
	DataService,
	I18nService,
	NotificationService,
	ContextService,
	AssetService,
	UserInfo,
	ThemeColors,
	DialogOptions,
	DialogResult,
	ToastType,
	MockSDKConfig,
	PluginErrorCode
} from '@elyos-dev/sdk/types';

Further Reading

For user documentation, visit docs.elyos.hu.

License

MIT