Edit on GitHub

Installation

If you already have Plank installed, jump to the tutorial.

macOS

The easiest way to install Plank is through Homebrew:

$ brew install plank

Linux (via Docker)

Plank supports building in Ubuntu Linux via Docker. The Dockerfile in the repository will fetch the most recent release of plank and build dependencies including the Swift snapshot.

$ docker build -t plank .

Build from source

Plank is built using the Swift Package Manager. Although you’ll be able to build Plank using swift build directly, for distribution of the binary we’d recommend using the commands in the Makefile since they will pass the necessary flags to bundle the Swift runtime.

$ make archive

Testing Install

Test that Plank installed correctly by running it with --version:

$ plank --version

Usage

Generate a schema file (user.json) using Plank using the format plank [options] file1 file2 file3 ...

$ plank user.json

This will generate files (User.h, User.m) in the current directory

Generate a schema file (user.json) using Plank.

$ ls
User.h User.m

There are a number of options that can be specified with your invocation of plank. The command line reference describes the general and language specific options available.

Next Steps

To get a taste on how to use Plank in your project, check out the tutorial.