Remix.run Logo
Show HN: Figma-use – CLI to control Figma for AI agents(github.com)
45 points by dannote 12 hours ago | 20 comments

I'm Dan, and I built a CLI that lets AI agents design in Figma.

What it does: 100 commands to create shapes, text, frames, components, modify styles, export assets. JSX importing that's ~100x faster than any plugin API import. Works with any LLM coding assistant.

Why I built it: The official Figma MCP server can only read files. I wanted AI to actually design — create buttons, build layouts, generate entire component systems. Existing solutions were either read-only or required verbose JSON schemas that burn through tokens.

Demo (45 sec): https://youtu.be/9eSYVZRle7o

Tech stack: Bun + Citty for CLI, Elysia WebSocket proxy, Figma plugin. The render command connects to Figma's internal multiplayer protocol via Chrome DevTools for extra performance when dealing with large groups of objects.

Try it: bun install -g @dannote/figma-use

Looking for feedback on CLI ergonomics, missing commands, and whether the JSX syntax feels natural.

Asciilotle 24 minutes ago | parent | next [-]

Nice use case! I built something along similar lines.. an ASCII wireframe generator to jump straight from idea to code with zero friction: https://bareminimum.design/. Also handy for quick UI critiques. Curious what you think.

dougfulop 19 minutes ago | parent [-]

Wish there were examples without a signup

pglevy 2 hours ago | parent | prev | next [-]

I'm curious to understand more about your use case. I've been working on getting fellow designers out of Figma since it's easier to express intent in code now using LLMs.

dannote 44 minutes ago | parent | next [-]

I still have a lot of assets living in Figma, and for some things it’s simply faster to prototype there before moving to code.

Personally, I’d really like to automate part of the workflow around exporting from Figma and assembling a design system into components — right now there’s just too much manual work involved.

james_marks an hour ago | parent | prev [-]

Not OP, but my interest in Figma is that when a human designer needs to take over, UI/UX designers know Figma.

dannote 41 minutes ago | parent [-]

Yeah, agreed.

VladVladikoff 4 hours ago | parent | prev | next [-]

Can it make a SVG of a pelican riding a bicycle?

rafaelmn 4 hours ago | parent [-]

"Humanity's last exam" HN edition

Mic92 3 hours ago | parent [-]

I am a human and I can't...

bryanrasmussen an hour ago | parent [-]

looks like you failed your last exam, please exit through the red door down the aisle.

falloutx 4 hours ago | parent | prev | next [-]

I like how MCP is not shoved into our face anymore after people realised more mcp servers eat into context and agents can easily use CLI tools.

_pdp_ 4 hours ago | parent [-]

I fully agree with the comment but CLI tools don't do auth and session management in a consistent way. Besides, imagine if now every vendor out there need to distributed custom binaries for their services. Some of them do. Many don't.. but overall it is just increased security risk for the end user when the functionality that is delivered is simply an interface to an API.

Mic92 3 hours ago | parent | next [-]

I remember that a llm agents often store those in clear text files (I think claude-code beeing one of them). Many of the CLIs I use have a better secret hygiene than that i.e. allow passwords commands or use secret apis.

conception 3 hours ago | parent | prev [-]

MCP tools do not do auth and session management in a consistent way based on just the seven or so I use regularly.

james_marks an hour ago | parent | prev | next [-]

Nice work!

How does it do applying styles from an existing codebase?

We have style guides, strong base css, etc. If that was represented when it built in Figma, that could be interesting.

dannote 31 minutes ago | parent [-]

Thanks! Right now it doesn't parse CSS directly, but you can bind colors to Figma variables:

  figma-use variable create "brand/primary" --collection <id> --type COLOR --value "#3B82F6"
Then reference them in JSX render:

  figma-use render ./Button.figma.tsx

  const colors = defineVars({
    primary: { name: 'brand/primary', value: '#3B82F6' },
  })

  export default () => (
    <Frame style={{ backgroundColor: colors.primary }}>
      <Text style={{ color: '#FFF' }}>Button</Text>
    </Frame>
  )
So if you map your design tokens to Figma variables first, components will reference them. Parsing CSS/Tailwind configs automatically could be a good feature though.
eddywebs 4 hours ago | parent | prev | next [-]

I can attest that ai agent executing cli binaries is better than use of an mcp, just because of the limitations of mcp, also figma mcp requires a pro license. Does the figma cli require a pro license as well ?

dannote 38 minutes ago | parent [-]

I don’t think so. This CLI mostly relies on the plugin API, which is free.

preommr 2 hours ago | parent | prev [-]

Any thoughts on why Citty, or if there's any other cli tools you might recommend?

dannote 23 minutes ago | parent [-]

Personal preference — because I love UnJS (https://unjs.io) ecosystem