The Superblog CLI lets you work on your blog from a terminal. Use it to build a custom template, and to preview or deploy your blog without opening the dashboard.

Install and sign in

npm i -g @superblog/cli
superblog login

superblog login opens your browser. Approve the computer and pick your blog. No key is shown or copied: it is stored in ~/.superblog/config.json, readable only by you.

On a computer with no browser, such as a server, run superblog login -no-browser. It prints a link to open on another device, and asks you to paste the key it gives you.

Run superblog status to see which blog you are signed in to.

Commands

CommandWhat it does
superblog loginConnect this computer to a blog, through your browser
superblog logoutForget the stored key
superblog statusShow which blog you are working on
superblog template devWrite your template and see it live on your own posts
superblog template previewUpload the template folder and build every post at a preview address
superblog template deployUpload the template folder and publish
superblog template initOnly write the starter template files
superblog previewBuild your blog as it is, at a preview address
superblog deployPublish your blog as it is

Add -h to any command to list its options.

superblog preview and superblog deploy act on your blog as it is in the dashboard. They do not upload any local files. Use them after content changes, the same as the Preview and Deploy buttons.

A preview address is private, not indexed by search engines, and removed 3 hours after it is built.

Build a template

The template commands are for custom templates, on the SUPER plan and above. See Build your own template.

Sign-in and your team

The CLI acts as you. If you leave the blog's team, or transfer the blog to someone else, your CLI sign-in for that blog stops working. Run superblog login again for another blog.