Examples
Seven example plugins ship with the SDK, demonstrating progressively more complex patterns.
Minimal Examples
Storage Demo
APIs: storage.set/get, db.insert/query/delete
Simple note-taking app. Demonstrates key-value storage for preferences and database collections for structured data.
Toasts Demo
APIs: toast.show, toast.notify, storage.set/get
Grid of buttons triggering each toast type (success, error, info) and OS notifications. Persists click counts in storage.
Sessions Demo
APIs: session.create, session.getStatus, session.getMessages, session.stop
Spawn Claude sessions, stream status updates, display conversation messages, and cancel running sessions.
Namespace Showcases
Auth Demo
APIs: auth.getUser, auth.isAuthenticated, auth.requestSignIn, auth.onAuthStateChange, auth.getSession
Read the signed-in AMC identity and request scoped Google / GitHub access tokens. Masks the returned token before rendering. Needs the auth and auth.session permissions.
Inbox Demo
APIs: inbox.setItems, storage.set/get
Add and remove items in the AMC inbox. Demonstrates the full-replace semantics of setItems() by keeping the working list in storage and re-publishing on every change.
Recording Demo
APIs: recording.start/stop/list/getShareUrl/delete
A working recorder. Screen recording is a backend capability (ctx.recording) with no webview equivalent, so this demo's backend owns it and the webview drives it over the shared event bus — which also makes it the reference example for crossing the two surfaces.
Full Example
GitHub Issues
APIs: http.fetch, db.*, cron.register, settings.get, sidebar.setBadge, toast.show, log.*
Full-stack plugin with backend. Syncs GitHub issues via cron, caches them locally, renders with filters and search. Demonstrates the complete plugin lifecycle.
Running Examples
Each example is a standalone plugin project:
cd examples/<example-name>
npm install
npm run build
npm run dev # launches dev shell