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"
[worker]
modules = ["myapp.workflows", "myapp.tasks"]
concurrency = 8
adapter = ["python", "-m", "coflux"]
[blobs]
threshold = 100
[[blobs.stores]]
type = "http"
url = "http://localhost:7777/blobs"
Reference
| Key | Default | Description |
|---|---|---|
host | localhost:7777 | Server host |
token | (none) | Authentication token |
workspace | default | Workspace name |
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_level | info | Log level (debug, info, warn, error) |
Worker settings
[worker]
modules = ["myapp.workflows", "myapp.tasks"]
concurrency = 8
adapter = ["python", "-m", "coflux"]
provides = ["gpu:A100", "region:eu"]
| Key | Default | Description |
|---|---|---|
worker.modules | (all) | Modules to load targets from; a package is scanned recursively. Unset, every module in the working directory. Overridden by modules passed on the command line, or by --all-modules |
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) |
worker.accepts | [] | Tags an execution must carry for this worker to accept it |
Blob storage
See Blobs for detailed blob store configuration.
Log storage
[logs]
type = "http"
url = "http://localhost:7777/logs"
batch_size = 100
flush_interval = "500ms"
flush_interval is a duration ("500ms", "2s"). Log and metric batches
are flushed when they fill or when this elapses, whichever comes first.
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:
| Flag | Description |
|---|---|
--config, -c | Path to configuration file (default: coflux.toml) |
--host | Server host |
--token | Authentication token |
--workspace, -w | Workspace name |
--team, -t | Team ID |
--output, -o | Output format (json) |
--log-level | Log level |