Reference·
Reference
A listing of the niyase-plugin CLI, the useNiyase() bridge, types, and helpers.
A listing of the public API of @niyase/plugin-sdk.
CLI (niyase-plugin)
| Command | Description |
|---|---|
new | Scaffold from @scope/name |
build | Generate the IIFE bundle (--entry / --out / --minify) |
lint | tsc + validateManifest() + forbidden-API scan |
test | Run vitest |
dev | Local preview (--port) |
publish | Build + validate + submit (--dry-run / --token) |
The useNiyase() bridge
data / core / context / i18n / navigate / toast / palette.
For details, see UI Integration and Core API Integration.
import { createNiyase, useNiyase, register } from "@niyase/plugin-sdk";
// In the entry: createNiyase(); register("@scope/name", Root);
// Anywhere: const niyase = useNiyase();
Manifest (@niyase/plugin-sdk/manifest)
import {
defineManifest,
validateManifest,
type PluginManifest,
} from "@niyase/plugin-sdk/manifest";
defineManifest(m): a typed identity (for completion)validateManifest(input):{ ok: true, manifest } | { ok: false, errors }(zod, identical to CLI lint)
Types
PluginManifest / PluginAudience / PluginTableDef / PluginColumnDef /
PluginIndustryPreset / PluginI18nTerms / PluginPaletteMetadata /
NiyaseBridge / NiyaseContextValue / NiyaseErrorCode.
Test helpers (@niyase/plugin-sdk/host)
createTestHost({ manifest, context }): returns a headless bridge connected to the MOCK backendrunBridgeConformance(bridge): a minimal conformance check of the bridge contract
import { createTestHost } from "@niyase/plugin-sdk/host";
const { niyase } = createTestHost({ manifest, context });
await niyase.ready;
const res = await niyase.data.list("task");
Examples
The best reference is your own scaffold running in local preview (niyase-plugin dev).
The official plugin @niyase/projects (an example of industry presets) is also a useful reference.