Skip to content

Non-interactive

The indobase CLI can be used in a non-interactive and headless manner, without saving configuration or sessions. This is especially useful when you want to automate tasks on a continuous integration server. You can enable the non-interactive mode for the indobase CLI by setting the project ID, endpoint, and API Key:

Shell
indobase client \
    --endpoint https://<REGION>.cloud.indobase.io/v1 \
    --project-id <PROJECT_ID> \
    --key YOUR_API_KEY

When you set the global configuration parameters using the indobase client command, they take precedence over the local configuration parameters in your indobase.config.json thereby switching the CLI to non-interactive mode.

In this mode, the CLI can only interact with one project at a time.

API Keys

In non-interactive mode, the CLI uses an API key to authenticate. Your API key must have sufficient permissions to execute the commands you plan to use. Learn more about API Keys.

Deployment

indobase's push commands can also be executed in a non-interactive mode. This applies to the following resources: functions, tables, buckets, teams, and messaging topics.

You can push a resource non-interactively by using the --force option to skip all warnings and specify which resources you want to deploy.

To push all available resources:

Shell
indobase push all --all --force

To push a single function by ID:

Shell
indobase push functions --function-id [FUNCTION ID] --force

Push all functions:

Shell
indobase push functions --all --force

You can push databases, tables, teams, and buckets non-interactively in a similar way by using the --all and --force option.

Push all databases and tables:

Shell
indobase push tables --all --force

Push all teams:

Shell
indobase push teams --all --force

Push all buckets:

Shell
indobase push buckets --all --force

CI/CD integrations

Use providers like Github actions to create continuous integrations and continuous delivery or deployment (CI/CD).

Github

You can use Github actions to automate your Indobase CLI commands, allowing you to use them even in non-interactive mode.