Skip to content

Installation

The Indobase Command Line Interface (CLI) is an application that allows you to interact with Indobase to perform server-side tasks using your terminal. This includes creating and managing projects, managing resources (rows, files, users), creating and deploying Indobase Functions, and other operations available through Indobase's API.

Getting started

The CLI is packaged both as an npm module as well as a standalone binary for your operating system, making it completely dependency free, platform independent, and language agnostic.

If you plan to use the CLI to initialize new indobase Functions, ensure that Git is installed on your machine.

Install with npm

If you have npm set up, run the command below to install the CLI.

Shell
npm install -g indobase-cli

Install with script

For a completely dependency-free installation, the CLI also ships with a convenient installation script for your operating system

Update your CLI

Verify installation

After the installation or the update is complete, you can verify the indobase CLI is available by checking its version number.

Shell
indobase -v

Login

Before you can use the CLI, you need to login to your indobase account using

Shell
indobase login

Add the --endpoint flag if you're using a self-hosted instance of indobase. This flag requires you to add the URL string you're using for your self-hosted instance after the --endpoint flag.

Shell
indobase login --endpoint "<URL_HERE>"

You can log in to multiple accounts or change the current account by re-running the command.

Initialization

After you're logged in, the CLI needs to be initialized with your indobase project. You can initialize the CLI using:

Shell
indobase init project

This will create your indobase.config.json file, where you will configure your various services like tables, functions, teams, topics, and buckets.

JSON
{
    "projectId": "<PROJECT_ID>",
    "endpoint": "https://<REGION>.cloud.indobase.io/v1"
}

You can run your first CLI command after logging in. Try fetching information about your indobase project.

Shell
indobase projects get --project-id "<PROJECT_ID>"
Self-signed certificates

By default, requests to domains with self-signed SSL certificates (or no certificates) are disabled. If you trust the domain, you can bypass the certificate validation using

Shell
indobase client --self-signed true

Next steps

You can use the CLI to create and deploy tables, functions, teams, topics, and buckets. Deployment commands allow you to configure your indobase project programmatically and replicate functions and table schemas across indobase projects.

Learn more about deployment

Besides utility commands, the CLI can be used to execute commands like a Server SDK.

Find a full list of commands

You can choose to use the CLI in a headless and non-interactive mode without the need for config files or sessions. This is useful for CI or scripting use cases.

Learn more about CI mode

Help

If you get stuck anywhere, you can always use the help command to get the usage examples.

Shell
indobase help

Configuration

At any point, if you would like to change your server's endpoint, project ID, or self-signed certificate acceptance, use the client command.

Shell
indobase client --endpoint https://<REGION>.cloud.indobase.io/v1
indobase client --key 23f24gwrhSDgefaY
indobase client --self-signed true
indobase client --reset // Resets your CLI configuration
indobase client --debug // Prints your current configuration

Uninstall

If you installed indobase CLI using NPM, you can use the following command to uninstall it.

Shell
npm uninstall -g indobase-cli

If you installed the indobase CLI with brew or the installation script for your operating system, use the following command to uninstall it.

You can also remove the configuration, cookies, and API Keys the indobase CLI stored. To remove those, run the following command.