CLI Reference
DevNote think about adding some more examples/usecases? Update/assure the commands are still as are and valid. |
DevNote add some more notes, descriptions. Consider generating this. |
Corteza command-line interface tool allows you to quickly interact with different parts of the system — from changing the settings to assigning roles to users.
Running CLI interface via docker
If you are running a deployment via docker or docker compose, you can easily execute an already running server outside of the containers.
Docker Compose
Refer to more docker compose examples at useful Docker commands. |
$ docker-compose exec <service name> ./bin/corteza-server <command>
Docker
First, find the ID of the container which is running your Corteza server in the current project directory. You can use the accrued container ID to execute CLI commands as illustrated by the following example.
The example assumes the service name is |
$ docker ps | grep `basename $PWD | sed -e 's/\.//g'`_server
$ docker exec <container ID> ./bin/corteza-server <command>
Authentication
Auto Discovery
Auto discovers new OIDC client.
Usage:
corteza-server auth auto-discovery [name] [url] [flags]
Flags:
--enable Enable this provider and external auth
-h, --help help for auto-discovery
--skip-validation Skip validation
Import
Imports data from yaml sources.
When importing RBAC rules, the changes do not automatically change. RBAC rules are reloaded in 1h intervals. If you need to reflect the changes immediately, you will need to restart the Corteza server. |
Usage:
corteza-server import [flags]
Flags:
-h, --help help for import
--merge-left-existing Update any existing values; existing data takes priority. Default skips.
--merge-right-existing Update any existing values; new data takes priority. Default skips.
--replace-existing Replace any existing values. Default skips.
Provision
Provision tasks
Usage:
corteza-server provision [flags]
Flags:
-h, --help help for provision
Serve api
Starts HTTP server with REST API.
Usage:
corteza-server serve-api [flags]
Aliases:
serve-api, serve
Flags:
-h, --help help for serve-api
Sink signature
Creates a signature for a sink HTTP endpoint.
Usage:
corteza-server sink signature [flags]
Flags:
--content-type string Content type (optional)
--expires string Date of expiration (YYYY-MM-DD, optional)
-h, --help help for signature
--max-body-size int Max allowed body size
--method string HTTP method that will be used (optional)
--origin string Origin of the request (arbitrary string, optional)
--path string Full sink request path (do not include /sink prefix, add / for just root)
--signature-in-path Include signature in a path instead of query string
Users
User management
Add user
Add new user
Usage:
corteza-server users add [email] [flags]
Flags:
-h, --help help for add
--no-password Create user without password
Federation Sync
-
data sync,
-
structure sync.
The two commands (corteza-server sync data
and corteza-server sync structure
) force the background watcher to run.
Usage:
corteza-server sync [command]
Available Commands:
data Sync data
structure Sync structure
Flags:
-h, --help help for sync