Skip to main content
Version: 0.7.x

CLI reference

The arkflow binary is a single executable that runs streams and jobs from a YAML configuration and ships discovery commands for the component registry.

arkflow [OPTIONS] [COMMAND]

Run the engine​

OptionDescription
-c, --config <FILE>Path to the YAML configuration file. Required unless a discovery subcommand is used.
-v, --validateValidate the configuration and exit without starting the engine.
--versionPrint the version and exit.
# Run streams and jobs defined in the config
./target/release/arkflow --config config.yaml

# Deep-validate a config: parsing, stream ids, declared job graphs,
# duplicate ids, operator references, and configuration rules
./target/release/arkflow --config config.yaml --validate

--validate goes beyond deserialization: it checks stream id uniqueness, validates every declared Job spec (graph structure and operator references), and runs the engine's configuration rule checks. Validation failures print Invalid configuration: ... and exit with a non-zero status, which makes the flag suitable for CI pipelines and admission hooks.

components list​

List every registered component, grouped by kind.

arkflow components list [--kind KIND] [--format FORMAT]
OptionDescription
-k, --kind <KIND>Filter by component kind: input, output, processor, buffer, codec, temporary.
-f, --format <FORMAT>text (default, aligned columns) or json (machine-readable registry export).
$ arkflow components list --kind codec
codec:
json JSON codec for parsing and serializing message payloads
protobuf Protobuf codec using a compiled .proto descriptor
...

The json format is the same registry export that backs the generated component inventory, so scripts and the docs can never disagree with the binary.

components show​

Print the configuration schema for one component.

arkflow components show <KIND> <NAME> [--format FORMAT]
ArgumentDescription
<KIND>Component kind (required).
<NAME>Registered component type name (required).
-f, --format <FORMAT>text (default) or json.
$ arkflow components show input kafka
kafka: Kafka input component for consuming messages from Kafka topics
kind: input
config_optional: no

Example:
{ ... pretty-printed config example ... }

Config schema:
{ ... JSON Schema for the component config ... }

Unknown names fail with the list of valid alternatives, e.g. Unknown input type: kafaka. Available input types: file, generate, http, kafka, ....

schema​

Print the JSON Schema (draft 2020-12) for the whole engine configuration. Feed it to your editor for YAML auto-completion and hover docs — see IDE auto-completion.

arkflow schema > arkflow.schema.json

Exit behavior​

InvocationBehavior
components ..., schemaPrints results and exits immediately; no config file is read.
--validateValidates the config, logs The config is validated., exits without starting the engine.
--config <FILE> (default)Validates the config, then starts the engine and blocks until shutdown.
Missing --config without a subcommandError: missing --config <FILE> (or run a subcommand: components, schema).

arkflow-server​

The arkflow-server binary runs the control-plane Hub. Startup configuration comes from environment variables plus an optional full configuration file (--config <FILE>); the migrate, backup, and restore subcommands manage the storage database.

--config <FILE>​

--config loads the full startup configuration from a YAML, JSON, or TOML file (selected by file extension). The file covers every startup field, including ones no environment variable can set (api_prefix, health paths, cors_origins, session_ttl_ms, lease_ttl_ms, logging and observability):

# hub.yaml — full arkflow-server startup configuration
address: 0.0.0.0:8080
tls_cert: /etc/arkflow/hub.crt
tls_key: /etc/arkflow/hub.key
hub_storage: postgres://user:pass@db:5432/arkflow
node_token: ${env:ARKFLOW_NODE_TOKEN}
cors_origins:
- https://console.example.com
logging:
level: info
format: json
observability:
tracing:
enabled: true
endpoint: http://127.0.0.1:4318/v1/traces
service_name: arkflow-hub
hub:
operator_token: ${secret:OPERATOR_TOKEN}
ha:
enabled: true
lease_ttl_ms: 15000
advertise_url: https://hub.example.com
ai:
enabled: true
api_base: https://api.openai.com/v1
model: gpt-4o-mini
api_key: ${secret:OPENAI_API_KEY}
timeout_ms: 90000
max_tool_rounds: 8
requests_per_minute: 20
burst: 5

Rules:

  • Precedence: an environment variable that is explicitly set overrides the file; an unset variable falls back to the file value and then to the built-in default. Environment-only deployments behave exactly as before.
  • Secret references: ${env:VAR}, ${file:PATH}, and ${secret:NAME} are resolved while the file loads (same syntax as the engine config). A validation error after secret resolution never echoes the resolved value.
  • Unknown keys fail startup, naming the key — a typo like adress: is caught instead of silently ignored.
  • The enabled field is accepted but ignored: the standalone Hub always serves when invoked.
  • Format syntax errors carry line information; field-level type errors do not (the document is validated as a whole after secret resolution).

Startup environment variables​

VariableDefaultDescription
ARKFLOW_HUB_ADDRESS127.0.0.1:8080Listen address for the Hub API.
ARKFLOW_OPERATOR_TOKEN—Operator token for human/admin API access. Supports the role|token credential format; see Hub authentication and Users and credentials.
ARKFLOW_NODE_TOKEN—Shared bootstrap/break-glass token accepted on initial node enrollment (and already-enrolled nodes only when ARKFLOW_ALLOW_SHARED_NODE_TOKEN_BREAK_GLASS=true or Hub is volatile).
ARKFLOW_HUB_INSECURE_LOCALoffSet to 1/true/yes to relax checks for local development only.
ARKFLOW_HUB_STORAGE—Storage backend spec: a SQLite path or a PostgreSQL URL. Required when HA is enabled and by the managed identity and per-node credential APIs.
ARKFLOW_HUB_NODE_BOOTSTRAP_DISABLEDoffSet to 1/true/yes to block shared node_token enrollment; nodes must authenticate with pre-provisioned arkn_ credentials.
ARKFLOW_ALLOW_SHARED_NODE_TOKEN_BREAK_GLASSoffSet to 1/true/yes to allow already-enrolled nodes to re-register with the shared node_token for emergency recovery.
ARKFLOW_HUB_TLS_CERT / ARKFLOW_HUB_TLS_KEY—TLS certificate and key paths for the Hub listener.
ARKFLOW_HUB_TLS_CA—PEM CA bundle for client certificate verification on the Hub listener.
ARKFLOW_HUB_TLS_CLIENT_AUTHagent_required (when CA is set)Hub client-auth policy: agent_required (client cert mandatory on /api/v1/agent/*), required, or none.
ARKFLOW_AGENT_TLS_CA / ARKFLOW_AGENT_TLS_CERT / ARKFLOW_AGENT_TLS_KEY—Agent HTTP client CA root and paired client cert/key (cert and key are all-or-none) for connecting to an mTLS Hub.
ARKFLOW_NODE_CREDENTIAL_FILE—Optional file path where an enrolled Agent atomically persists (0600) and reloads its Hub-issued arkn_ per-node credential.
ARKFLOW_HUB_HA_ENABLEDoffSet to 1/true/yes to enable lease-based HA. Requires ARKFLOW_HUB_STORAGE to be set; use a PostgreSQL URL for multi-instance HA (a SQLite path only logs a development-only warning).
ARKFLOW_HUB_HA_LEASE_TTL_MS15000Lease TTL in milliseconds; values below 1000 are rejected.
ARKFLOW_HUB_HA_HOLDER_ID—Explicit lease holder identity; by default one is generated from hostname, PID, and boot time.
ARKFLOW_HUB_HA_ADVERTISE_URL—Absolute http(s):// URL with a host that agents use to reach this Hub instance (multi-Hub discovery).
ARKFLOW_LOG_LEVELinfoHub log level (trace/debug/info/warn/error).
ARKFLOW_OTEL_TRACING_ENABLEDoffSet to 1/true/yes to export Hub spans via OTLP/HTTP-JSON.
ARKFLOW_OTEL_ENDPOINThttp://127.0.0.1:4318/v1/tracesOTLP/HTTP-JSON span export endpoint.
ARKFLOW_OTEL_SERVICE_NAMEarkflowResource service.name on exported spans. Set it (e.g. arkflow-hub) when a collector also receives engine traces.
ARKFLOW_AI_ENABLEDoffSet to 1/true/yes to enable the Hub AI Copilot (ai_copilot capability). Requires ARKFLOW_AI_API_BASE and ARKFLOW_AI_MODEL.
ARKFLOW_AI_API_BASE—OpenAI-compatible http:// or https:// base URL (requests target {api_base}/chat/completions).
ARKFLOW_AI_MODEL—Chat model name supporting OpenAI tool calling.
ARKFLOW_AI_API_KEY—Optional Bearer API key for the upstream LLM endpoint (omit for unauthenticated local Ollama/vLLM).
ARKFLOW_AI_TIMEOUT_MS90000Total orchestration timeout in milliseconds (minimum 1000).
ARKFLOW_AI_MAX_TOOL_ROUNDS8Maximum tool-calling loop iterations per request (minimum 1).
ARKFLOW_AI_MAX_TOKENS4096Optional max_tokens cap forwarded to the upstream model.
ARKFLOW_AI_REQUESTS_PER_MINUTE20Per-principal AI Copilot sustained request rate limit.
ARKFLOW_AI_BURST5Per-principal AI Copilot burst capacity.
ARKFLOW_RATE_LIMIT_ENABLED / _PRINCIPAL_RPS / _PRINCIPAL_BURST / _NODE_RPS / _NODE_BURSTtrue / 100 / 200 / 500 / 1000Per-credential rate limiting for the versioned API; full table in rate limits.

The RUST_LOG environment variable, when set to parseable EnvFilter directives (e.g. RUST_LOG=info or arkflow=debug), overrides the static log level in both the engine and the Hub. Precedence: RUST_LOG > ARKFLOW_LOG_LEVEL > logging.level (file) > default info. An unparsable value warns on stderr and falls back to the static level. See Observability for the Hub tracing behavior.

Identity-related variables that are not Hub startup basics — the OIDC federation block (ARKFLOW_OIDC_*, including ARKFLOW_OIDC_MANAGED_USERS_ONLY) — are documented in deployment. The managed user directory and its credentials are documented in Users and credentials.

Usage errors​

Unknown flags or stray arguments on the serve path, a missing --config value, and an unreadable/unparseable/unknown-extension config file print a message to stderr and exit with code 2 — an unknown argument never silently starts the Hub.

migrate subcommand​

Migrates the Hub storage database from SQLite to PostgreSQL — the path you take when moving a single-instance Hub (SQLite) to multi-instance HA (PostgreSQL).

arkflow-server migrate --from sqlite:<path> --to postgres://<url>

On success it prints a per-table row report (<table>: <rows> rows ... migration complete: <n> rows total) and exits 0.

Exit codeBehavior
0Migration completed.
2Usage error: missing --from/--to, or --from not starting with sqlite:, or --to not starting with postgres:///postgresql://.
non-zeroMigration failed; the error is printed to stderr.