Livestream: AI-Powered prototyping & wireframing | 4/24

Announcing Visual Copilot - Figma to production in half the time

Builder logo
builder.io
Contact SalesGo to App

Livestream: AI-Powered prototyping & wireframing | 4/24

Announcing Visual Copilot - Figma to production in half the time

Builder logo
builder.io

Blog

Home

Resources

Blog

Forum

Github

Login

Signup

×

Visual CMS

Drag-and-drop visual editor and headless CMS for any tech stack

Theme Studio for Shopify

Build and optimize your Shopify-hosted storefront, no coding required

Resources

Blog

Get StartedLogin

in beta

for developers

After creating a design with Figma, integrate Builder with your codebase to enable live code generation. Builder generates code directly into your codebase, using the design you've provided and your own code files for seamless integration.

  • Use the Builder Figma plugin and the Code Generation CLI tool to generate code into your codebase.
  • Prompt Code Generation CLI to make stylistic and functional modifications to the design of your generated code.

To use Code Generation CLI, you must have:

  • A Builder account with an accessible Develop Space.
  • A Figma account with a design ready to export and the Builder Figma plugin.
  • A local machine with Node.js 18 or higher installed.
  • A local codebase with a front-end framework supported by Builder. Code Generation CLI works best with React-based projects.

Use of Code Generation CLI requires you to navigate between Figma, Builder, and your codebase.

First, ensure that you have the Builder Figma plugin within Figma. Once you have done so, complete the following steps.

Within Figma:

  1. Select your design. For large designs, you may have better success by selecting one portion of your design.
  2. Open the Builder Figma plugin.
  3. Go to the Export tab within the plugin.
  4. Click the Export Design button.
  5. Builder's AI generates multiple design options. Choose one.

Once you see Export Successful, you are ready to move on to the next step.

The video below demonstrates the process of selecting a design within Figma and then using the Builder Figma plugin to export a design.

To use Code Generation CLI:

  1. Copy the command-line script within the plugin's window. This command begins with npx @builder.io/dev-tools@latest code.
  2. Go to your codebase's directory within your terminal.
  3. Paste and run the command from the Builder Figma plugin.

At this point, Code Generation CLI begins to scan through your project and authenticate with Builder.

To authenticate with Builder, follow the prompts provided within the command line and browser. Connect to a Develop Space when authenticating.

If you ever need to re-authenticate with Builder and Figma via the command line, you can use the following command to trigger the authentication process.

npx builder.io auth

After successfully connecting to your space, you are ready to move on to the next step.

Once you have been prompted within the command line to describe how your design integrates with your codebase, interact with the command line as you would any other AI.

Provide specificity and context within your prompts whenever possible. For example:

  • ✅ Create a responsive product page with a path of "/products".
  • ❌ Create a new page.

Code Generation CLI receives your request, generating code within your codebase. It then identifies which files it has changed and generates a summary of the changes it made.

Builder Figma CLI tool in progress after having been prompted with a design and the prompt "add a new products page".

You are then provided with three options:

  1. Accept and Continue. This option accepts the current changes and then offers a new prompt for additional suggestions to the design or code.
  2. Refine. This option marks the generated code as unacceptable and provides a new chance to refine your prompt.
  3. Undo last changes. All of the changes just made are be reverted, after which a new prompt is offered.

Continue to prompt Code Generation CLI to adjust your application as desired. When you are done, follow the command-line instructions to quit the tool.

Note: After providing a prompt, Code Generation CLI asks for an optional context file. This step is useful in a large codebase or in a situation where your prompt could refer to multiple pieces of the codebase.

The video below demonstrates the process of running the CLI command and providing a prompt.

Learn more about the Builder Figma plugin or see Figma export modes for more details on how to export your design from Figma. After that, learn to Map components with the CLI.

Was this article helpful?

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Get the latest from Builder.io

By submitting, you agree to our Privacy Policy

  • Platform Overview

    AI Overview

  • Integrations

  • What's New

  • Figma to Code Guide

  • Composable Commerce Guide

  • Headless CMS Guide

  • Headless Commerce Guide

  • Composable DXP Guide

  • Design to Code

  • Blog

  • Knowledge Base

  • Community Forum

  • Partners

  • Templates

  • Success Stories

  • Showcase

  • Resource Center

    Glossary

© 2025 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms

Security & Compliance

Cookie Preferences

Gartner Cool Vendor 2024