Skip to content

CLI Reference

This page shows the help screens for the fractalctl command and its subcommands.

fractalctl

usage: fractalctl [-h]
                  {start,openapi,set-db,init-db-data,update-db-data,recent,sync-core-tasks}
                  ...

fractal-server commands

options:
  -h, --help            show this help message and exit

Commands:
  {start,openapi,set-db,init-db-data,update-db-data,recent,sync-core-tasks}

fractalctl start

usage: fractalctl start [-h] [--host HOST] [-p PORT] [--reload]

Start the server (with uvicorn)

options:
  -h, --help            show this help message and exit
  --host HOST           bind socket to this host (default: 127.0.0.1)
  -p PORT, --port PORT  bind socket to this port (default: 8000)
  --reload              enable auto-reload

fractalctl openapi

usage: fractalctl openapi [-h] [-f OPENAPI_FILE]

Save the `openapi.json` file

options:
  -h, --help            show this help message and exit
  -f OPENAPI_FILE, --openapi-file OPENAPI_FILE
                        Filename for OpenAPI schema dump

fractalctl set-db

usage: fractalctl set-db [-h]

Initialise/upgrade database schemas.

options:
  -h, --help  show this help message and exit

fractalctl init-db-data

usage: fractalctl init-db-data [-h] [--resource RESOURCE] [--profile PROFILE]
                               [--admin-email ADMIN_EMAIL]
                               [--admin-pwd ADMIN_PWD]
                               [--admin-project-dir ADMIN_PROJECT_DIR]

Populate database with initial data.

options:
  -h, --help            show this help message and exit
  --resource RESOURCE   Either `default` or path to the JSON file of the first
                        resource.
  --profile PROFILE     Either `default` or path to the JSON file of the first
                        profile.
  --admin-email ADMIN_EMAIL
                        Email of the first admin user.
  --admin-pwd ADMIN_PWD
                        Password for the first admin user.
  --admin-project-dir ADMIN_PROJECT_DIR
                        Project_dir for the first admin user.

fractalctl update-db-data

usage: fractalctl update-db-data [-h]

Apply data-migration script to an existing database.

options:
  -h, --help  show this help message and exit

fractalctl recent

usage: fractalctl recent [-h] [--minutes MINUTES]

Review recent jobs and task-group activities.

options:
  -h, --help         show this help message and exit
  --minutes MINUTES  Look-back period in minutes (default: 20).

fractalctl sync-core-tasks

usage: fractalctl sync-core-tasks [-h] --resources-and-groups
                                  RESOURCES_AND_GROUPS [--base BASE]
                                  [--add ADD] [--remove REMOVE]

Synchronize core tasks.

options:
  -h, --help            show this help message and exit
  --resources-and-groups RESOURCES_AND_GROUPS
                        Path to a JSON file with an array of `{"resource_id":
                        .., "user_group_id": ...}` objects. For each resource,
                        only tasks associated to the corresponding user group
                        can be marked as core.
  --base BASE           Path to a JSON file with an array of items like `["my-
                        package-name", "1.2.3", "My task name"]` which should
                        be made core. This file is often pre-fetched from a
                        remote source.
  --add ADD             Path to a JSON file with an array of items like `["my-
                        package-name", "1.2.3", "My task name"]` which should
                        be made core. This is often an instance-specific set
                        of additions on top of the `--base` one.
  --remove REMOVE       Path to a JSON file with an array of items like `["my-
                        package-name", "1.2.3", "My task name"]` which should
                        be made **not** core. This is often an instance-
                        specific set of removals from the `--base` one.