Default
Action lists, pinned controls, launch folders, system controls, and live status cards.
This page is the developer entry point after you understand WebTrigger concepts. A WebShell is a normal browser interface that calls local WebTrigger APIs for actions, live data, launch folders, and icons.
Use this as a practical SDK guide for hand-built shells, theme experiments, and AI-assisted shell creation.
GET /api/theme-context/export gives a WebShell or AI assistant the current actions, Live Data Sources, launch folders, API guide, and UI guidance in one place.
const context = await fetch('/api/theme-context/export').then(res => res.json());
const actions = context.actions || [];
const liveDataSources = context.liveDataSources || [];
const launchFolders = context.launchFolders || [];
WebShell JavaScript should use same-origin relative paths. These endpoints are served by the PC running WebTrigger.
/api/theme-context/exportDiscover actions, LDS, launch folders, icon guidance, and available API information.
/api/actionsList configured user actions.
/api/actions/execute/{id}Execute a configured action. Confirmation actions use { "confirmed": true }.
/api/system-actionsList built-in media, desktop, and power actions.
/api/system-actions/{id}/executeExecute a built-in action. Dangerous actions require confirmation.
/api/live-dataGet the current LDS snapshot.
/api/state/streamSubscribe to live data changes with Server-Sent Events.
/api/launch-foldersList configured launch folders.
/api/launch-folders/{id}/itemsList launchable items inside a folder.
/api/launch-items/{id}/launchLaunch a detected folder item.
/api/icons/resolve?actionId={id}Resolve an action icon to an icon URL, type, and colorizable flag.
/api/icons/custom/{fileName}Load a custom icon asset.
/api/icons/action-cache/{fileName}Load an action icon cached by WebTrigger.
const actions = await fetch('/api/actions').then(res => res.json());
for (const action of actions) {
console.log(action.name || action.Name, action.id || action.Id);
}
async function runAction(action) {
const id = action.id || action.Id;
const confirmed = !!(action.confirmationRequired || action.ConfirmationRequired);
const res = await fetch(`/api/actions/execute/${encodeURIComponent(id)}`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ confirmed })
});
const result = await res.json();
if (res.status === 429) {
console.log(`Cooldown: try again in ${result.retryAfterSeconds}s`);
}
if (result.requiresConfirmation) {
console.log('Ask the user to confirm, then retry with confirmed: true.');
}
return result;
}
const liveData = await fetch('/api/live-data').then(res => res.json());
document.querySelector('[data-lds="cpu"]').textContent =
liveData.cpu === 'N/A' ? '--' : `${liveData.cpu}%`;
const stream = new EventSource('/api/state/stream');
stream.onmessage = event => {
const { key, value } = JSON.parse(event.data);
const target = document.querySelector(`[data-lds="${key}"]`);
if (target) target.textContent = value;
};
async function resolveIcon(actionId) {
const url = `/api/icons/resolve?actionId=${encodeURIComponent(actionId)}`;
return fetch(url).then(res => res.json());
}
Fetch actions, group them by category or tags, render big touch-friendly buttons, and call /api/actions/execute/{id} when pressed.
Render LDS cards for built-in keys like cpu, ram, volume, battery, and any custom LDS key the user creates. Use /api/state/stream for live updates.
Use large navigation tabs, large touch targets, search, and quick pages for actions, media controls, scripts, and system actions.
Keep the API calls simple, then put your creativity into layout, typography, motion, sound, and visual state. Cyber Fantasy uses this approach.
Start by giving the assistant /api/theme-context/export, your layout goal, target device size, and the built-in safety rules. Review any generated JavaScript before importing it.
Action lists, pinned controls, launch folders, system controls, and live status cards.
Page-based button grids and layout editing, backed by /api/actiondeck/layout.
A themed system dashboard that still uses straightforward action, live data, and launch-folder APIs.
Mobile-first navigation for actions, media, scripts, launch folders, and system controls.
/api/actions./api/theme-context/export when you want the app to describe available actions, LDS, icons, and endpoints.