A Figma plugin that works out of the box and already sends usage analytics to tode. React + Vite. Generated by create-tode-plugin; for Vue, Svelte, vanilla TypeScript or esbuild run npm create @tode-sdk@latest instead.
Click "Use this template", or:
npx degit tode-analytics/figma-plugin-template-with-tode my-plugin
cd my-plugin && npm install && npm run devIn Figma Desktop: Plugins → Development → Import plugin from manifest → manifest.json. Turn on "Hot reload plugin" there and the plugin reloads on every save. Rename the plugin in manifest.json and package.json.
manifest.json:permissions: ["currentuser"]andnetworkAccess.allowedDomainsforprocessing.usetode.dev,documentAccess: "dynamic-page".src/main/main.ts:tode.init({ apiKey })aftershowUI, with the key from.env(TODE_API_KEY). No key: the plugin runs, analytics is off.src/ui/App.tsx: theuseTode()hook at the root, which records sessions.- Two example events:
rectangles_createdwith the count as a metric (main thread) andhelp_opened(UI).
AGENTS.md explains the two threads, the commands and how to add a feature; CLAUDE.md includes it. npm run check is the one verification command (typecheck, lint, tests, build, manifest). npm run preview opens the UI in a browser with the main thread mocked, so an agent with a browser tool can click through it. skills/figma-plugin-tode/SKILL.md holds the sandbox rules.
tode docs · dashboard · generator. Ideas from plugma and create-figma-plugin. MIT.