Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
schpet/figma-cliIt is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
88%
Published
3 months ago (0.1.4)
figma cli
a command line tool to copy figma nodes as images to your clipboard.
currently, it has three commands:
# copy a figma node to your clipboard figma node copy "https://www.figma.com/design/FILE_ID/DESIGN_NAME?node-id=NODE_ID&t=HASH" # export a figma node to a file figma node export "https://www.figma.com/design/FILE_ID/DESIGN_NAME?node-id=NODE_ID&t=HASH" # get the direct image URL for a figma node figma node url "https://www.figma.com/design/FILE_ID/DESIGN_NAME?node-id=NODE_ID&t=HASH"
see full info in docs/usage.md
Tip
Copy usage.md to your ~/.claude/CLAUDE.md or other global llm rules file to allow llm coding tools to use this
installation
- install deno
- install the package
deno install -A -g --force jsr:@schpet/figma-cli
it should be available on your $PATH, if that fails, check deno's docs.
development installation
if you're working from source:
deno task install
setup
1. get a figma personal access token
- go to figma and click on your profile picture in the top right
- select "settings" from the dropdown
- scroll down to the "personal access tokens" section
- click "create new token"
- give it a name (like "figma-cli")
- set the expiration (max 90 days currently)
- copy the token that starts with
figd_
2. set environment variable
add your token to your shell profile:
bash/zsh (.bashrc, .zshrc, or .profile):
export FIGMA_PERSONAL_ACCESS_TOKEN="figd_your_token_here"
after adding it, reload your shell:
source ~/.bashrc # or ~/.zshrc, ~/.profile
fish:
set -Ux FIGMA_PERSONAL_ACCESS_TOKEN "figd_your_token_here"
usage
copy a figma node
figma node copy "https://www.figma.com/design/FILE_ID/DESIGN_NAME?node-id=NODE_ID&t=HASH"
this will:
- download the image to a temporary directory
- copy it to your clipboard (macos only)
- show you where the file was saved
commands
figma node copy <url>- copy a figma node as an image to clipboardfigma node export <url>- export a figma node to a temporary filefigma node url <url>- get the direct image URL for a figma nodefigma --help- show help informationfigma node --help- show node command help
requirements
- deno
- macos (for clipboard functionality - images are still downloaded on other platforms)
- figma personal access token
Built and signed on
GitHub Actions
Add Package
deno add jsr:@schpet/figma-cli
Import symbol
import * as figma_cli from "@schpet/figma-cli";
Import directly with a jsr specifier
import * as figma_cli from "jsr:@schpet/figma-cli";
Add Package
pnpm i jsr:@schpet/figma-cli
pnpm dlx jsr add @schpet/figma-cli
Import symbol
import * as figma_cli from "@schpet/figma-cli";
Add Package
yarn add jsr:@schpet/figma-cli
yarn dlx jsr add @schpet/figma-cli
Import symbol
import * as figma_cli from "@schpet/figma-cli";
Add Package
vlt install jsr:@schpet/figma-cli
Import symbol
import * as figma_cli from "@schpet/figma-cli";
Add Package
npx jsr add @schpet/figma-cli
Import symbol
import * as figma_cli from "@schpet/figma-cli";
Add Package
bunx jsr add @schpet/figma-cli
Import symbol
import * as figma_cli from "@schpet/figma-cli";