Divshot Cheat Sheet

From WikiOD

Here is the cheatsheat of Divshot and basic guide on how to use Divshot

Getting started[edit | edit source]

Install divshot-cli[edit | edit source]

$ npm install -g divshot-cli
$ divshot login

Create divshot.json[edit | edit source]

  "name": "yourapp",
  "root": "./app"

Push your app[edit | edit source]

$ divshot push

Configuration[edit | edit source]

See configuration reference and routing guide.

  "name": "yourapp",
  "root": "./app",
  "clean_urls": true,
  "clean_urls": ["/app/**", "/!components/**"],,
  "error_page": "error.html",
  "exclude": [ "Gruntfile.js" ],
  "cache_control": {},
  "routes": {
    "/*.html": "index.html",
    "/app/**/*.html": "app.html",
    "**": "index.html"
  "redirects": {
    "/old/:segment/path": "/new/path/:segment",
    "/some/old/path": {
      "status": 302,
      "url": "/some/new/path"
  "headers": {
    "/cors-stuff/**": {
      "Access-Control-Allow-Origin": "*"
    "/scripts/**": {
      "content-type": "text/javascript"

CLI[edit | edit source]

divshot s   # server

divshot push [staging|production|development]
divshot pull [staging|production|development]
divshot purge   # cleans cache
divshot files

divshot promote development production

divshot open [<env>]

Config[edit | edit source]

Edits divshot.json

divshot config:add name your-app-name
divshot config:remove name

Environment vars[edit | edit source]

divshot env:add <env> KEY=value
divshot env:remove <env> KEY
divshot env:pull <env>

App management[edit | edit source]

divshot create <appname>
divshot rename <newname>
divshot status
divshot destroy

divshot apps divshot account

### Password protect

divshot protect <env> <username:password>

Custom domains[edit | edit source]

See custom domains guide.

divshot domains:add foo.bar.com

In your DNS create a CNAME: (no apex domains are supported)

www.    CNAME    yourname.divshot.io