Command line

Pinwheel’s building and testing can be run from the command line. This enables using Pinwheel as part of a script, or in situations where you’d prefer to use Terminal.

Usage #

PinWheelCLI [<arguments>] [<options>]

Arguments #

-b <path-to-pinwheel-document>: Build. The equivalent of running Build All for the specified document.

-t <path-to-pinwheel-document>: Test. The equivalent of running Test All for the specified document.

-i <path-to-json-document>: Import. If specified the colors in this JSON file will be used exclusively for building.

-c <path-to-pinwheel-document>: Configuration. Import all the build settings from the pinwheel document specified.

<path-to-pinwheel-document> The path to the Pinwheel document you want to build, including the file name.

<path-to-json-document> The path to a Design Tokens JSON file containing all the colors you’d like to use, including the file name.

Options #

-o <output-folder> Only applicable when using the build and configuration option. If specified, Pinwheel will use this folder instead of the one in the tasks you are exporting.

-autohc [true | false] Only applicable when using the configuration option. If specified as true Pinwheel will auto generate high contrast variants for colors you are exporting. If not specified defaults to false.

Examples #

This will build Colors.pinwheel.

/Applications/Pinwheel.app/Contents/SharedSupport/PinwheelCLI -b Colors.pinwheel

This will build Colors.pinwheel and send the output files to the desktop.

/Applications/Pinwheel.app/Contents/SharedSupport/PinwheelCLI -b Colors.pinwheel -o ~/Desktop/

This will test Colors.pinwheel.

/Applications/Pinwheel.app/Contents/SharedSupport/PinwheelCLI -t Colors.pinwheel

Please let us know if Pinwheel’s command line features cover your intended uses.