CLI Reference

Master the Handoff CLI with this full reference of every command, flag, and configuration option available to your team. Whether you are scaffolding new components, building documentation, or ejecting configurations for customization, this guide has the technical details you need. Empower your local environment with the full power of the Handoff engine.

This is the complete technical reference for the handoff-app command-line interface. If you are just getting started, we recommend following the CLI Quickstart first.

Core Commands

CommandDescription
handoff-app initCreate a new Handoff project interactively.
handoff-app fetchPull design decisions and metadata from Figma.
handoff-app startLaunch the local documentation development server.
handoff-app build:appCompile your documentation site for production.
handoff-app scaffoldGenerate component implementations from Figma tokens.

Configuration Ejection

Handoff allows you to "eject" its default configurations and templates into your local project so you can customize them to your heart's content.

CommandDescription
handoff-app eject:configEject handoff.config.js to your project root.
handoff-app eject:integrationEject integration templates for custom styling.
handoff-app eject:pagesEject default documentation pages for custom content.

Global Options

The following flags can be used with any Handoff command to modify its behavior.

FlagDescription
-c, --config [file]Path to a custom Handoff configuration file.
-d, --debugEnable verbose debug logging for troubleshooting.
-v, --versionDisplay the current version of the CLI.

Environment Variables

You can also configure Handoff using environment variables. This is particularly useful for managing credentials like HANDOFF_FIGMA_PROJECT_ID and HANDOFF_DEV_ACCESS_TOKEN in CI/CD environments.