Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including skaffolder-cli with all npm packages installed. Try it out:

var skaffolderCli = require("skaffolder-cli")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

skaffolder-cli v1.1.29

CLI to interact with Skaffolder, you can generate boilerplate in different programming languages and customize your own scaffolding.


To install skaffolder-cli run:

npm install -g skaffolder-cli


Getting started!

First of all you have to login into your free Skaffolder account running sk login:

[root@skaffolder ~]$ sk login
    Skaffolder: Insert your email account:
    Skaffolder: Insert your password:
    ✔  Login successful

Create project

Now you can create a new project running sk new

[root@skaffolder ~]$ sk new

    Skaffolder: Insert name of your project:  MyProject

    Skaffolder: Select your frontend language
     ▸ Angular 4

    Skaffolder: Select your backend language
     ▸ NodeJS
       Java Spring Boot
       Java Spring Boot MySQL

    ✔   Project created!
    You can edit your project structure at!/projects/my-project-id/design/models
    Generator file imported in ./.skaffolder/template

To open an existing project you can run sk open

Generate source code

You can use the command sk generate to generate your source code from your template files.

[root@skaffolder ~]$ sk generate

    File created: ./.gitignore
    File created: ./swagger.yaml
    File created: ./app.js
    ✔  Generation complete!

Edit project

Now you can edit you project on Skaffolder platform adding data models, APIs and pages at your app.

Add page

To add a page run sk add page. You can optionally specity the name running sk add page <name>

[root@skaffolder ~]$ sk add page mypage
    File created: ./client/app/pages/mypage/mypage.component.css
    File created: ./client/app/pages/mypage/mypage.component.html
    File created: ./client/app/pages/mypage/mypage.component.ts
    ✔  Generation complete!
    You can edit your project structure at!/projects/my-project-id/design/models
Add Data Model

To add a data model run sk add model. You can optionally specity the name running sk add model <name>

[root@skaffolder ~]$ sk add model

To add an API run sk add api

[root@skaffolder ~]$ sk add api

Edit project from web interface

You can completely manage data models, APIs and pages of your project from a graphic interface. You can run sk get project url and browse the provided link:

[root@skaffolder ~]$ sk get project url
    To manage data models, APIs and pages of your project, visit this URL:!/projects/my-project-id/design/models

Create a custom template generator

In you current path a folder .skaffolder was created. In .skaffolder/template you can find your template files editable, they respect the Handlebars sintax and you can use also these additional helpers functions.

You can create a new template from any boilerplate. Put in your Skaffolder project folder your boilerplate files and run

[root@skaffolder ~]$ sk generator import

With this command all files in Skaffolder project folder will be imported in .skaffolder/template with Handlebars sintax and default Skaffolder properties.

###Skaffolder Properties

Each template file in .skaffolder/template folder has .hbs extension and first lines of file can be (optional) Skaffodler properties. This section is delimitated by **** PROPERTIES SKAFFOLDER **** token and contains JSON formatted properties.

Properties Type Description
forEachObj String Generate this file for each selected value:
  • oneTime
  • db
  • table
  • module
  • resource
overwrite Boolean If true overwites existing files
partials Array of Object Object with:
  • name
    Name of partial
  • template
    Content to insert in partial section
  • tagFrom
    Start delimiter of partial
  • tagTo
    End delimiter of partial


You can create the file .skaffolder/template/{{capitalize}} with this content and run sk generate

    "forEachObj": "table",
    "overwrite": true,
    "_partials": [
            "name": "Description",
            "template": "// Partial comment",
            "tagFrom": "// START - PARTIAL",
            "tagTo": "// END - PARTIAL"
// This is my file content
// File name: {{capitalize}}

public class {{capitalize}} {
    private Long _id;
    // Attributes
    {{#each entity._attrs}}
    private String {{name}};

    All Handlebars parameters:

{{json .}}


###Add a custom Handlebars Helper

Handlebars Helpers are custom function that you can execute on your template.

You can add an helper creating a file name extra.js in your project folder with an array of helpers function as shown in the example below

exports.helpers = [
        name: "myFunction",
        fn: function(param1, options) {
            return param1 + " Hello World"

You can now use this function in your .hbs template file:

HBS file:
my HBS file {{myFunction "test"}}

my HBS file test Hello World

###Import Schema from existing Database

You can import you Db schema in Skaffolder from a XML file. The XML file is produced by SchemaSpy you can find an example file here.

In order to import this file in your Skaffolder project run:

[root@skaffolder ~]$ sk import db <path_file>

Now you have data models on Skaffolder platform.

More documentation

You can find additional documentation here

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free