Skip to content

About

Figma plugin template (React + Vite) with tode analytics built in. Regenerated from create-tode-plugin on every release.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Figma plugin template with tode

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.

Use it

Click "Use this template", or:

npx degit tode-analytics/figma-plugin-template-with-tode my-plugin
cd my-plugin && npm install && npm run dev

In 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.

What is wired

  • manifest.json: permissions: ["currentuser"] and networkAccess.allowedDomains for processing.usetode.dev, documentAccess: "dynamic-page".
  • src/main/main.ts: tode.init({ apiKey }) after showUI, with the key from .env (TODE_API_KEY). No key: the plugin runs, analytics is off.
  • src/ui/App.tsx: the useTode() hook at the root, which records sessions.
  • Two example events: rectangles_created with the count as a metric (main thread) and help_opened (UI).

Made for coding agents

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.

Links

tode docs · dashboard · generator. Ideas from plugma and create-figma-plugin. MIT.

About

Figma plugin template (React + Vite) with tode analytics built in. Regenerated from create-tode-plugin on every release.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages