FigX is a no-nonsense CLI tool for importing design assets from Figma into your codebase. Built for developers who value explicit control and reproducibility.
π§ The project is in the active development phase π§
π See full documentation β’ π GitHub Action Available β’ π³ Docker Image Available
At a high level, FigX is a straightforward and reliable CLI tool designed for:
- π Deterministic and reproducible imports
- π§ Seamless integration into CI/CD pipelines
- π» Cross-platform support: macOS, Windows, and Linux
FigX comes with built-in import profiles for various formats, enabling immediate use without additional setup:
Profile | Description |
---|---|
android-webp |
1. Downloads PNG variants for themes (night /light ) and screen densities (hdpi , xhdpi , etc.)2. Converts all variants to WebP using libwebp 3. Places the resulting images into the appropriate drawable-* directories for Android |
compose |
1. Downloads SVG from Figma 2. Simplifies SVG using usvg 3. Converts to ImageVector for Jetpack Compose |
webp |
1. Downloads PNG from Figma 2. Converts PNG to WebP using libwebp |
png |
Downloads PNG assets directly from Figma |
svg |
Downloads SVG assets directly from Figma |
pdf |
Downloads PDF assets directly from Figma |
Profiles
png
,svg
,compose
support matrix-like import configurations β multiple variants (e.g.light
/night
, sizes16
/20
/24
) for a single resource, similar to GitHub Actions matrices.
On macOS and Windows, you can securely store your access token using the system keychain. And figx
will automatically retrieve the token from secure storage when needed.
For more details, see the documentation: FIGX / Concepts / Remotes.
Release notes: v0.7.4
FigX can show you which resources are already declared in the project, which packages/modules exist, or what flow specific resources follow during import before they are included in the project.
List all figx resources in the project without importing them:
figx query //...
List all figx packages in the project:
figx query -o package //...
Explain the import flow for specific resources:
figx explain //.../ui/icons:Sun
Example output:
//app/src/main/java/com/example/figxdemo/ui/icons:Sun
βββ π€ Export SVG from remote @icons/MhjeA23R15tAR3PO2JamCv
β β node: Environment / Sun
βββ β¨ Transform SVG to Compose
β β package: com.example.figxdemo.ui.icons
β°ββ πΎ Write to file
β output: Sun.kt
The easiest way to install on macOS is via Homebrew:
brew tap tonykolomeytsev/figx
brew install figx
Download the latest .msi
installer from the releases page, then run the installer to complete the setup.
Follow the detailed installation instructions available in the documentation.
- Clone this repository and open it in terminal.
- Go to examples/multiple-svg-icons
cd examples/multiple-svg-icons
- Get temporary access token for Figma and add it to your env:
export FIGMA_PERSONAL_TOKEN="<token from url above>"
- Run import and wait for complete
figx import //...
- You will get the result:
The example demonstrates importing icons in the Compose
ImageVector
format and importing illustrations in the WEBP format for different screen densities (fromhdpi
toxxxhdpi
).
- Clone this repository and open it in terminal.
- Go to examples/android-project
cd examples/android-project
- Get temporary access token for Figma and add it to your env:
export FIGMA_PERSONAL_TOKEN="<token from url above>"
- Run import and wait for complete
figx import //...
- You will get the result:
Compose ImageVector Android Drawable WEBP
See the generated Kotlin code for the icons
Full documentation available at: tonykolomeytsev.github.io/figx
Differences from figma-export
The figma-export tool was the catalyst for creating this project. FigX draws inspiration from its predecessor but completely reimagines the resource processing approach, incorporating lessons learned from negative experiences with figma-export.
Key distinctions between the tools:
figma-export | figx |
---|---|
macOS-only | Cross-platform: runs on macOS, Windows, Linux. Easily compilable for other platforms |
Requires external graphic tools for Android assets (vd-tool, cwebp) | Built-in libwebp for WEBP compression and native SVG-to-Android vector conversion without Java-based vd-tool legacy |
No Jetpack Compose ImageVector support |
Generates native ImageVector graphics as ready-to-use Kotlin code |
Resource imports determined by Figma file contents or CLI arguments | Granular resource specification via dedicated manifest files per project package/module |
Limited built-in import profiles (icons/illustrations) without project domain consideration | Extensible profile system supporting unlimited custom profiles with configurable import flows and identifiers |
Complex multi-module resource targeting | Designed for modular projects - immune to refactoring and path changes through proper package isolation |
Optimized primarily for local developer use | CI-optimized with aggressive caching to minimize resource waste in pipelines |
GPL-3.0 license Β© 2025 Anton Kolomeytsev