Build something beautiful

We’ve laid the foundations so you can build on the platform that empowers one million designers every day. Create plugins and integrations, read and write Sketch files directly in JSON or render Sketch documents using the command-line interface.

Getting started

Run a script

Try the Sketch JavaScript API now, directly within Sketch. The code below shows a message at the bottom of your Sketch Document window saying Hello Sketch 👋.

Run script menu

  1. Open a new or existing file in Sketch
  2. Select Run Script… from the Plugins menu or use the keyboard shortcut control + shift + k to bring up the code editor
  3. Paste in the code below
  4. Select Run
const sketch = require('sketch')

sketch.UI.message('Hello Sketch 👋')

Publish a plugin

Use the Sketch Plugin Manager skpm to publish a new plugin or an update of an existing one. This adds your plugin automatically to the Sketch Plugin Directory for review before being listed on the Sketch website.

Export assets automatically

Create assets with a single command with the Sketch command-line interface sketchtool. Quickly generate files for all exportable layers, slices, artboards or entire pages in as many different resolutions as you want.

  1. Open a new file in Sketch
  2. Add a shape or anything else to the canvas
  3. Save the file locally, e.g. App.sketch on your Desktop
  4. Open Terminal and run the following command, which looks up the sketchtool bundled with Sketch and exports all pages of App.sketch.

This will generate an image file called Page 1.png in the same folder you ran the command in.

SKETCH=$(mdfind kMDItemCFBundleIdentifier == 'com.bohemiancoding.sketch3' | head -n 1) && \
"$SKETCH/Contents/Resources/sketchtool/bin/sketchtool" export pages ~/Desktop/App.sketch
See something wrong or incomplete? Improve this page.

Not a developer? Submit an idea

If you don’t have the programming experience to create your own Sketch plugin or integration, you can submit an idea to let our team and the community know what kind of functionality you’re looking for.

Take a look at the list of plugins the community has already built.