Skip to content

CLI Reference

FlagDescription
--host <addr>Server address (default: localhost:9000)
--namespace <name>Namespace for operations (default: default)
--timeout <ms>Operation timeout in milliseconds
--format <fmt>Output format: text, json
--debugEnable debug output

Start a Flo server.

Terminal window
flo server start [options]
FlagDescriptionDefault
-c, --config <path>Config file pathflo.toml
--port <port>Client protocol port9000
--data-dir <path>Data directory./data
--shard-count <n>Number of shard threadsCPU count
--node-id <id>Unique node identifierauto
--seeds <addrs>Cluster seed addresses

Show server status and health.

Terminal window
flo server status

Set a key-value pair.

Terminal window
flo kv set <key> <value> [options]
FlagDescription
--ttl <seconds>Time-to-live
--if-not-existsOnly set if key doesn’t exist
--cas <version>Compare-and-swap version

Get a value by key.

Terminal window
flo kv get <key> [options]
FlagDescription
--block <ms>Block until key appears

Get many keys in a single round trip. Keys may live on different shards — the server gathers results in parallel.

Terminal window
flo kv mget <key1> <key2> ... [options]
FlagDescription
--namespace <ns>Override default namespace
--output <fmt>text (default), json, or table

Maximum 256 keys per call. Missing keys are returned as nil entries (not errors).

Delete a key.

Terminal window
flo kv delete <key> [options]
FlagDescription
--cas <version>Only delete if the current version matches (race-free lock release)
-r, --routing-key <key>Explicit shard routing key
-t, --txn <id>Buffer inside a transaction

List keys by prefix.

Terminal window
flo kv list [prefix] [options]
FlagDescription
--limit <n>Maximum number of keys
--keys-onlyOnly return keys, not values

Show version history for a key.

Terminal window
flo kv history <key> [options]
FlagDescription
--limit <n>Maximum versions to return

Atomically increment an i64 counter.

Terminal window
flo kv incr <key> [--by <delta>]
FlagDescription
-b, --by <n>Signed delta (default +1)

Adjust the TTL on an existing key without rewriting the value.

Terminal window
flo kv touch <key> --ttl <seconds> # update TTL (0 clears it)
flo kv persist <key> # clear TTL
FlagDescription
--cas <version>Only update if the current version matches (race-free lease renewal)
-r, --routing-key <key>Explicit shard routing key
-t, --txn <id>Buffer inside a transaction

Existence check (no value transferred). Exits 0 when present, 1 when absent.

Terminal window
flo kv exists <key>

JSON sub-field operations using a small JSONPath subset ($, .field, [index]).

Terminal window
flo kv jset <key> <path> <json>
flo kv jget <key> [path]
flo kv jdel <key> [path]

jget prints both the value and the document’s current version; jset / jdel print the new version after the write.

Per-shard transactions buffer multiple writes on a single pinned partition and commit them atomically as one Raft entry.

Terminal window
flo kv begin <routing-key> # → prints txn_id and pinned_hash
flo kv commit <txn-id> # → prints commit_index and op_count
flo kv rollback <txn-id> # discard buffered ops

Add --txn <id> to any of set, get, delete, incr, touch, persist, exists to run that operation inside the transaction:

Terminal window
TXN=$(flo kv begin user:42 --format json | jq -r .txn_id)
flo kv set user:42:name "Jane" --txn "$TXN"
flo kv incr user:42:visits --txn "$TXN"
flo kv commit "$TXN"

Every key inside a transaction must hash to the same partition as the routing key, otherwise the server returns kv_txn_cross_shard. scan, mget, jget, jset, jdel, and history are not supported inside transactions.

Server caps: 256 ops per transaction, 1 MiB total payload, 1024 open transactions per server. Transactions survive across stateless connections — they are owned by txn_id, not by the TCP connection.

Create a stream.

Terminal window
flo stream create <name> [options]
FlagDescription
--retention <duration>Retention period (e.g., 7d, 24h)
--max-size <bytes>Maximum stream size

Append a record to a stream.

Terminal window
flo stream append <stream> <data>

Read records from a stream.

Terminal window
flo stream read <stream> [options]
FlagDescription
--offset <n>Start offset
--count <n>Number of records
--followFollow mode (block for new records)

Show stream metadata.

Terminal window
flo stream info <stream>

Manage consumer groups.

Terminal window
flo stream group create <stream> <group>
flo stream group read <stream> <group> <consumer> [--count <n>]
flo stream group ack <stream> <group> <offsets...>
flo stream group status <stream> <group>

Add a message to a queue.

Terminal window
flo queue enqueue <queue> <data> [options]
FlagDescription
--priority <n>Message priority (higher = sooner)
--delay <ms>Delivery delay in milliseconds
--dedup-key <key>Deduplication key

Dequeue messages.

Terminal window
flo queue dequeue <queue> [options]
FlagDescription
--count <n>Number of messages (default: 1)
--block <ms>Block until messages available
--visibility <ms>Visibility timeout for leased messages

Acknowledge processed messages.

Terminal window
flo queue ack <queue> <sequence...>

Negative acknowledge (requeue or send to DLQ).

Terminal window
flo queue nack <queue> <sequence...> [options]
FlagDescription
--dlqSend to dead-letter queue

Peek at messages without leasing.

Terminal window
flo queue peek <queue> [--count <n>]

Manage dead-letter queue.

Terminal window
flo queue dlq list <queue> [--count <n>]
flo queue dlq requeue <queue> <sequence...>
flo queue dlq purge <queue>

Write a data point using InfluxDB line protocol.

Terminal window
flo ts write <measurement> <tags> <fields>

Examples:

Terminal window
flo ts write cpu host=web-01 usage=82.5
flo ts write temperature region=us-east,sensor=a1 value=23.4

Run a FloQL query.

Terminal window
flo ts query "<query>"

Examples:

Terminal window
flo ts query "cpu{host=web-01}[1h] | avg(5m)"
flo ts query "temperature{region=us-east}[24h] | max(1h)"

Register an action type.

Terminal window
flo action register <name> [options]
FlagDescription
--timeout <ms>Execution timeout
--max-retries <n>Maximum retry count

Invoke an action.

Terminal window
flo action invoke <name> [data] [options]
FlagDescription
--idempotency-key <key>Dedup key for at-most-once
--priority <n>Execution priority
--waitWait for completion

Check action execution status.

Terminal window
flo action status <run-id>

Create a workflow from a YAML definition.

Terminal window
flo workflow create -f <file.yaml>

Start a workflow execution.

Terminal window
flo workflow start <name> [data]

Check workflow execution status.

Terminal window
flo workflow status <execution-id>

Send a signal to a running workflow.

Terminal window
flo workflow signal <execution-id> <signal-name> [data]

Submit a stream processing job.

Terminal window
flo processing submit -f <job.yaml>

Check job status.

Terminal window
flo processing status <job-id>

Stop a running job.

Terminal window
flo processing stop <job-id>

Show cluster membership and partition distribution.

Terminal window
flo cluster status

Trigger partition rebalancing.

Terminal window
flo cluster rebalance