Skip to main content

CLI configuration

The CLI is configured through a combination of a configuration file, environment variables, and command-line flags. The priority order is: flags > environment variables > config file > defaults.

Configuration file

The default configuration file is coflux.toml in the current directory. Use coflux setup to create one interactively:

coflux setup

A typical configuration file:

host = "localhost:7777"
workspace = "default"
modules = ["myapp.workflows", "myapp.tasks"]

[worker]
concurrency = 8
adapter = ["python", "-m", "coflux"]

[blobs]
threshold = 100

[[blobs.stores]]
type = "http"
url = "http://localhost:7777/blobs"

Reference

KeyDefaultDescription
hostlocalhost:7777Server host
token(none)Authentication token
workspacedefaultWorkspace name
modules[]Modules to load
secure(auto)Use TLS (defaults to true for non-localhost hosts)
team(none)Team ID for Studio authentication
output(none)Output format (json for machine-readable output)
log_levelinfoLog level (debug, info, warn, error)

Worker settings

[worker]
concurrency = 8
adapter = ["python", "-m", "coflux"]
provides = ["gpu:A100", "region:eu"]
KeyDefaultDescription
worker.concurrency(CPU count + 4, max 32)Maximum concurrent executions
worker.adapter[]Adapter command for executing Python code
worker.provides[]Features this worker provides (for pool matching)

Blob storage

See Blobs for detailed blob store configuration.

Log storage

[logs]
type = "http"
url = "http://localhost:7777/logs"
batch_size = 100
flush_interval = 0.5

Environment variables

All configuration keys can be set via environment variables with the COFLUX_ prefix:

export COFLUX_HOST=localhost:7777
export COFLUX_TOKEN=my-token
export COFLUX_WORKSPACE=production

Nested keys use underscores: COFLUX_WORKER_CONCURRENCY, COFLUX_BLOBS_THRESHOLD.

Global flags

These flags are available on all commands:

FlagDescription
--config, -cPath to configuration file (default: coflux.toml)
--hostServer host
--tokenAuthentication token
--workspace, -wWorkspace name
--team, -tTeam ID
--output, -oOutput format (json)
--log-levelLog level