Skip to main content
Working expansions in the app repository under examples/expansions/. Copy one into your Expansions folder, put your own id and apiKey in its meta.json, and it runs.

quick_notes (TypeScript)

A notes page per project, opened from the sidebar. Shows: pages.register and sidebar.add with an imported SVG icon, multi-file code (src/lib/notes.ts), a CSS module, a JSON import, and useProjectState for state that survives restarts.

item_inspector (JavaScript)

A summary of the open item, under its model viewer in the item editor. Shows: injections.add into item-editor:model-viewer:after, reading injectionContext, an events.on('item:open') listener, and plain JS with JSX.

activity_log (TypeScript)

Records item and folder changes to activity.log in the project folder. Shows: several events.on listeners, a project settings tab, setInterval cleaned up for you, project:read / project:write in practice, and onUnload flushing before the expansion goes away.

class_style (JavaScript)

The same ideas written with classes. Shows: a start file exporting class extends Expansion with onLoad / onUnload, state on the instance, and a React class component page.

sdk_playground (TypeScript)

A page of buttons, each exercising one SDK point and showing its result. Shows: nearly every point at once, a lib/ library imported by name and by subpath, a permission being refused on purpose (fetch without network), a component that throws so you can see the error card, and toggles for an injection and a global stylesheet. Useful as a reference and as a way to check the SDK works after changing the app.

Reading order

New to it

quick_notes, then sdk_playground to see the rest.

Coming from main.js

item_inspector is closest to what you had.

Prefer classes

class_style.