npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

f2c-cli

v0.1.9

Published

CLI tool to convert Figma designs to React / Vue 3 components using AI. One command, zero boilerplate. Supports Tailwind, CSS Modules, TypeScript, GitHub PR auto-create.

Readme

f2c-cli — Figma to Code

npm version npm downloads License: MIT Node.js

Convert any Figma component to production-ready React or Vue 3 code with one command. AI-powered, zero boilerplate. No Figma plugin required.

npm install -g f2c-cli
f2c convert -u "https://figma.com/design/xxx?node-id=1-2" -f react

Why f2c?

Designers hand off in Figma. Developers translate it to code by hand. That translation is slow, error-prone, and repetitive.

f2c eliminates it. Paste a Figma URL → get a component file. That's it.

  • React TSX or Vue 3 SFC (<script setup lang="ts">)
  • Tailwind CSS, CSS Modules, or plain styles
  • Real component logic — not rigid template mapping
  • Works with any Figma file you have access to

Install

npm install -g f2c-cli

Requires Node.js 18+.


Quick Start

1. One-time setup

f2c init

The wizard will ask for:

  • Figma access token — get it at Figma → Settings → Security → Personal access tokens
  • AI provider — OpenAI (GPT-4o) or Anthropic (Claude). Your own API key, your own cost.

Config is saved to ~/.f2c/config.json.

2. Convert a component

# React (default)
f2c convert -u "https://www.figma.com/design/xxx?node-id=1-2"

# Vue 3
f2c convert -u "https://www.figma.com/design/xxx?node-id=1-2" -f vue

# With options
f2c convert -u "..." -f react --css tailwind --out ./src/components --ts

3. Activate Pro (optional)

After purchasing, you'll receive a license key by email (F2C-XXXX-XXXX-XXXX-XXXX).

f2c license activate F2C-XXXX-XXXX-XXXX-XXXX

# Check status anytime
f2c license status

Commands

| Command | Description | |---------|-------------| | f2c init | First-time setup wizard (Figma token + AI key) | | f2c convert -u <url> | Convert a Figma node to a component file | | f2c browse | Interactively browse and pick components from a file | | f2c config | View current configuration | | f2c link -u <url> | Link a Figma node to a local file path | | f2c sync | Detect Figma changes and create GitHub PRs (Pro) | | f2c watch | Auto-sync on Figma change (Pro) | | f2c license activate <key> | Activate Pro license | | f2c license status | Show current license status |


Convert Options

f2c convert \
  -u "https://figma.com/..." \
  -f react            # react (default) | vue
  --css tailwind      # tailwind (default) | cssmodules | plain
  --out ./src/components
  --ts                # force TypeScript

Free vs Pro

| Feature | Free | Pro | |---------|------|-----| | f2c convert (unlimited) | ✓ | ✓ | | React + Vue 3 output | ✓ | ✓ | | Tailwind / CSS Modules / Plain | ✓ | ✓ | | Linked components | up to 3 | ✓ unlimited | | f2c watch (auto re-generate) | — | ✓ | | f2c sync (GitHub PR auto-create) | — | ✓ | | Priority support | — | ✓ |

Get Pro (one-time $19.99): https://tourmaline-ganache-a7fd52.netlify.app/#pricing


AI Providers

| Provider | Model | Notes | |----------|-------|-------| | Anthropic Claude | claude-sonnet | Best output quality (recommended) | | OpenAI | gpt-4o | Good alternative | | Ollama | codellama | Free, runs locally |

Switch provider anytime:

f2c config --provider openai
f2c config --provider claude

Project Config

Create .f2crc in your project root to override global settings:

{
  "output": {
    "framework": "vue",
    "css": "tailwind",
    "dir": "./src/components",
    "typescript": true
  }
}

How to Get Your Figma URL

  1. Open Figma (web or desktop app)
  2. Right-click any layer / frame / component
  3. Click "Copy link to selection"
  4. Paste into f2c convert -u "..."

FAQ

Does f2c store my API keys? No. Keys are stored locally in ~/.f2c/config.json on your machine only.

Which Figma files does it work with? Any file you can open in Figma. Just make sure your access token has read access to the file.

Can I use it in a monorepo / CI pipeline? Yes. Set env vars F2C_FIGMA_TOKEN and F2C_AI_KEY to skip the interactive setup.

I bought Pro but haven't received my key. Keys are sent automatically within 1 minute. Check your spam folder. Still missing? Email [email protected] with your order number.


Links

  • Homepage: https://tourmaline-ganache-a7fd52.netlify.app/
  • npm: https://www.npmjs.com/package/f2c-cli
  • Get Pro: https://duziteng.gumroad.com/l/f2c-pro
  • Issues: https://github.com/dujun-bot/f2c/issues

MIT License © 2025 dujun