Commandline Interface

Edit your templates locally and push to your app.

The easiest way to edit your pages is to change them right through the github editor and deploying automatically. If this suits you better please view the relevant guide here.

The more flexible, and powerful option for developers is to use commandline interface.

Setting up SaaSBox CLI brings you convenience of editing and storing your SaaSBox front-end on your local computer. This way you can make local edits, then push updates to your SaaS with a single command. This includes your frontend marketing pages, as well as the application dashboard, and any client side javascript used by the application dashboard.

The workflow would be to check out a template via git, and edit your templates locally, then push your template to your SaaS and make it live in one step.

How to get started, installation and push templates (Full Tutorial)

Getting Started

Installing the CLI:

npm install saasbox-cli

Checking out available templates:

Template #1 - Default Light Theme

git clone git@github.com:saasbox-templates/with-atis-light.git

This template comes with a user dashboard with pointers to how you can integrate a nocode application.

Template #2 - Dark Theme

git clone git@github.com:saasbox-templates/with-atis-dark.git

Template #3 - Tailwind UI

git clone git@github.com:saasbox-templates/with-tailwindui.git 

NOTE: Email us at team@saasbox.net with your github username as "our client" to access the Tailwind UI based template under the client access license terms in their license.

Licensing

These templates were created to work with SaaSBox, using designs bought from template publishers.

To remove any doubt for you to use them in your projects, it is best to buy a one time license from these 3rd party providers:

  • For Template #1, and #2, go to https://shuffle.dev

  • For Template #3, go to https://tailwindui.com

The additional components and drag and drop tools they provide will be handy to customize your SaaS frontend pages.

Adding your API Keys:

Go to "Inbound API Keys" section of your SaaS dashboard. Click on "Generate API Key"

Create a new file in your user home directory called sbox.config.json. As an example this files resides in /Users/yourname/sbox.config.json on a Mac.

Copy paste your API key and Application ID as follows:

{
   "apikey": "e6125403603450f0c8701a34ddf14ae66e6",
   "appid": "42652a13-66a3-4dd3-960e-243dc0160ee6"
}

This file will be read by the sbox cli and used for API credentials.

Edit your frontend files and push from inside your template directory:

sbox -d -a .

Here, "." represents current directory, and -d means deploy. Deploy will deploy the template, however it will not make it go "live". If you want to both deploy and make your template live, a "-a" or "--active" option needed as well.

Overview of the template directory structure. Pushing your first update and asset

Next Steps

Congratulations! You have edited and pushed your SaaS template, and the template is maintained on your local computer. It is highly recommended to create a git repo and track versions of your SaaS template.

Last updated