Mirexa

Command line

mirexa-cli drives a node from a shell: write CSV, read ranges back as CSV, follow a stream live, set the stream settings that live on the node (trading calendars, lineage, cache size), administer a cluster, check a node's storage, and bulk-load CSV and Parquet files. Without any node, it also issues access tokens and the certificates a cluster's nodes use. make build puts it at ./bin/cli; its messages call it mirexa-cli. Every example here uses ./bin/cli.

Two listeners

Some commands speak Mirexa's binary protocol on the node's data port. Those that change stream settings or administer a cluster use the node's control listener (gRPC), which is off until you turn it on. data verify uses neither: it reads a data directory on the node's own machine.

CommandsPortFlag
ingest query subscribe streams stream inspect gap list diagnetwork.addr-addr, default localhost:8080
calendar lineage cache gap accept stream create/delete/set-custom-fields clustercontrol.addr-control, default 127.0.0.1:9091
data verifynone-data-dir, the node's storage.data_dir

To use the setting commands, turn the control listener on in the node's configuration. It listens on 127.0.0.1:9091, which is also where -control looks by default; metrics and health checks keep 9090. A node refuses a configuration that puts two of its listeners on one port.

mirexa.yaml
control:
  enabled: true
shell
./bin/cli calendar get -stream nyse:AAPL:1m

The node refuses a control address that is not loopback unless control.admin_auth is on. With it on, every setting command needs a token carrying ADMIN_CLUSTER; see Authentication.

Flags every data-port command takes

FlagDefaultWhat it does
-addrlocalhost:8080The node's data port, host:port.
-streamThe stream, as exchange:symbol:timeframe, for example binance:BTCUSDT:1m.
-token$MIREXA_TOKENA token from token issue, or the node's own admin token. With none, the CLI connects unauthenticated, which only a node with authentication off accepts.
-token-fileA file holding the token. Give -token or -token-file, not both.
-tls-caA PEM file with the CA to trust. Setting it turns TLS on.
-tls-server-namethe -addr hostThe name the node's certificate must carry.
-reconnect3Connection attempts per operation, so a command rides out a node restarting. 1 fails on the first refused dial.

Flags every setting command takes

FlagDefaultWhat it does
-control127.0.0.1:9091The node's control listener, host:port.
-streamThe stream, as exchange:symbol:timeframe.
-token$MIREXA_TOKENA token with ADMIN_CLUSTER, needed when control.admin_auth is on.
-token-fileA file holding that token.
-tls-caA PEM file with the CA to trust, when the node sets control.use_tls.
-tls-server-namethe -control hostThe name the node's certificate must carry.
-timeout30sDeadline for the whole command.

Conventions

Authentication

Authentication is on by default, and a node with it on refuses a connection that carries no valid token. The CLI does not log in: you hand it a token. A single node with no trusted_keys configured makes its own signing key and writes an admin token, carrying every permission, to <data_dir>/auth/admin.token; it re-mints the file every 20 minutes. Narrower tokens are minted offline with token issue, from the node's key (<data_dir>/auth/issuer.key) or from your own. Get started, step 6 covers both. The examples on this page leave the token out; with authentication on, add one.

The CLI takes the token from the first of these that is set:

With none set, the CLI connects without a token, which only a node with security.auth.enabled: false accepts. Such a node grants what security.max_permissions allows.

shell
./bin/cli query -stream binance:BTCUSDT:1m -token-file data/auth/admin.token

./bin/cli token issue -key data/auth/issuer.key \
  -perms READ_CANDLES,WRITE_CANDLES -validity 1h > token

./bin/cli query -stream binance:BTCUSDT:1m -token-file token

export MIREXA_TOKEN=$(cat token)
./bin/cli query -stream binance:BTCUSDT:1m

Which permission each command needs

CommandPermission
ingestWRITE_CANDLES, or WRITE_TICKS with -ticks
query subscribeREAD_CANDLES, or READ_TICKS with -ticks
streams diag storageLIST_STREAMS
stream inspect gap listREAD_CANDLES; inspect adds storage statistics with LIST_STREAMS
calendar lineage cache gap accept stream create/delete/set-custom-fields clusterADMIN_CLUSTER, only when the node sets control.admin_auth
data verifynone: it reads files, so it needs read access to the data directory

The node may grant less than a token asks for: it caps every grant at security.max_permissions. ingest and streams check the grant before reading any input and stop with the permission that is missing; the other commands get the node's refusal.

Expiry

TLS

-tls-ca names a PEM file holding the CA to trust and turns TLS on; the CLI then speaks TLS 1.3 only. The certificate must carry the host in -addr (or -control), or the name in -tls-server-name. A token sent without TLS can be read by anyone on the path, so use both when the node is not on your machine.

ingest

Reads CSV from standard input and writes it to one stream. Candles are timestamp,open,high,low,close,volume; ticks (-ticks) are timestamp,price,volume. Needs WRITE_CANDLES or WRITE_TICKS.

FlagDefaultWhat it does
-acktrueWait for each batch to be in the node's write-ahead log and fsynced. -ack=false does not wait: faster, and the command can finish before the data is durable.
-batch1000Records per batch sent.
-flush100msSend a partial batch once its oldest record has waited this long.
-ticksRead ticks instead of candles.
-historyBulk historical load: the node compresses the rows straight into stored chunks, skipping the write-ahead log and the in-memory cache. They become readable when the command finishes. The way to load old data, and the only way to load bars older than the stream's cache.
-correctRestate bars the node already stores. Bars already on disk get a patch; bars still in memory are replaced in place.
-overwriteWrite to a derived stream, which the node otherwise refuses. Combines with -history or -correct.
shell
./bin/cli ingest -stream binance:BTCUSDT:1m < candles.csv
ingested 1440 candles into binance:BTCUSDT:1m in 2 batch(es)

./bin/cli ingest -stream binance:BTCUSDT:1m -history < last-year.csv
./bin/cli ingest -stream binance:BTCUSDT:1s -ticks < trades.csv

A live write must land within the stream's cache, near its newest data, and a batch must not span more slots than the cache holds. A batch the node is too busy to take is resent for you.

query

Reads [start, end) and prints CSV with no header: timestamp,open,high,low,close,volume for candles and timestamp,price,volume for ticks, timestamps in RFC 3339, UTC. Pages through long ranges by itself. Needs READ_CANDLES or READ_TICKS.

FlagDefaultWhat it does
-start, -endrequiredThe range.
-max0Stop after this many rows. 0 reads the whole range.
-gapsAlso print each missing bar, as a row with empty prices and gap in a seventh column; data rows get an empty seventh column.
-ticksRead trades instead of candles.
-rollupAnswer bars of this length (7m, 4h, 24h), made from the stream's candles at query time, or with -ticks from its trades. Nothing is stored.
shell
./bin/cli query -stream binance:BTCUSDT:1m \
  -start 2026-10-20T09:30:00Z -end 2026-10-20T09:33:00Z -gaps
2026-10-20T09:30:00Z,67012.5,67248.75,66981.25,67104,148.2,
2026-10-20T09:31:00Z,,,,,,gap
2026-10-20T09:32:00Z,67171.3,67202,67120.45,67140.8,121.9,

Give -stream a comma-separated list to read several streams over the same range in one request; each row then starts with its stream. If some streams fail, the rows of the others are printed and the command then fails, naming the ones that failed.

several streams
./bin/cli query -stream binance:BTCUSDT:1m,binance:ETHUSDT:1m \
  -start 2026-10-20T09:30:00Z -end 2026-10-20T09:31:00Z
binance:BTCUSDT:1m,2026-10-20T09:30:00Z,67012.5,67248.75,66981.25,67104,148.2
binance:ETHUSDT:1m,2026-10-20T09:30:00Z,2412.1,2415.8,2409.55,2414.95,182.4

subscribe

Prints every new bar (or trade, with -ticks) as the node stores it, as CSV with Unix-nanosecond timestamps, until stopped with Ctrl+C. Needs READ_CANDLES or READ_TICKS.

FlagDefaultWhat it does
-backfillSend stored history first, then live data, with no gap between them. Standard error says backfill complete; live from here at the switch.
-from0Where the history starts, in Unix nanoseconds; 0 is the earliest stored.
-count0Stop after this many records. 0 runs until stopped.
-resumeIf the connection drops, reconnect and carry on from the last record received.
-ticksFollow trades instead of candles.
shell
./bin/cli subscribe -stream binance:BTCUSDT:1m -backfill -resume

A record that arrives while the history is being sent can be printed twice, once in each part; never missed. If this consumer falls behind, the node drops batches rather than slowing the stream, and standard error says how many and which.

streams

Lists every stream the node holds, as CSV with a header. Needs LIST_STREAMS.

FlagDefaultWhat it does
-statsAdd persisted_records, chunks, corrections, bytes_on_disk, first_time and last_time. The counts cover what is stored on disk; the times include what is still in memory.
shell
./bin/cli streams
exchange,symbol,timeframe
binance,BTCUSDT,1m
nyse,AAPL,1m
2 stream(s)

calendar

A stream's trading calendar is what tells a market closure apart from missing data: weekly hours in the exchange's time zone, declared closures such as holidays and halts, and for a market with no hours, how long a pause has to be to count as a closure. Every change re-files the gaps the stream already recorded before the command returns, and standard error says how much was re-filed. Prints the calendar as JSON.

CommandFlagsWhat it does
calendar getPrint the calendar.
calendar set-timezone, -hours, -no-hours, -threshold-low, -threshold-highChange the weekly hours and thresholds. Flags you do not give keep their values. Registers a stream the node does not know yet.
calendar add-closure-from, -to, -noteDeclare a closure over [from, to). Also the way to mark one gap as expected.
calendar remove-closure-from, -toRemove a range from the declared closures, cutting any it overlaps.
FlagDefaultWhat it does
-timezoneThe IANA time zone the hours are written in, such as America/New_York. Hours with none are UTC.
-hoursDAYS=WINDOWS, repeatable, replacing the weekly hours: mon-fri=09:30-16:00, or sat=10:00-12:00,13:00-15:00 for a break.
-no-hoursRemove the weekly hours: the market never closes.
-threshold-lowThe shortest gap recorded, such as 5m.
-threshold-highOn a stream with no hours, a gap at least this long is a closure, such as 12h.
shell
./bin/cli calendar set -control 127.0.0.1:9091 -stream nyse:AAPL:1m \
  -timezone America/New_York -hours mon-fri=09:30-16:00
./bin/cli calendar add-closure -control 127.0.0.1:9091 -stream nyse:AAPL:1m \
  -from 2026-11-26T09:30:00-05:00 -to 2026-11-26T16:00:00-05:00 -note Thanksgiving

lineage

Declares that a stream's candles are derived from a source — the same instrument's trades, or its shorter candles — so the node writes them itself as the source's data arrives. Prints the lineage as JSON, or null for a stream that is not derived.

CommandWhat it does
lineage getPrint the lineage.
lineage setDeclare or change it.
lineage clearStop deriving. Candles already derived are kept.
FlagDefaultWhat it does
-kindticks or candles: what the stream is derived from.
-source-streamThe source stream. For ticks it defaults to the stream itself, whose trades feed its candles.
-historyrequiredfrom-now derives only what arrives from now on. rederive also derives everything the source already holds, walking it in the background; rederive_pending in the printed lineage stays true until it has caught up.
-grace1sHow long past a bar's close late data still joins that bar.
-no-trade-limit10sTicks only: the longest silence between trades that is not missing data.
shell
./bin/cli lineage set -control 127.0.0.1:9091 -stream binance:ETHUSDT:1m \
  -kind ticks -history from-now
./bin/cli lineage set -control 127.0.0.1:9091 -stream binance:ETHUSDT:5m \
  -kind candles -source binance:ETHUSDT:1m -history rederive

A derived stream refuses ordinary writes; write to it with ingest -overwrite.

cache

Each stream keeps its newest bars in memory, in a window of slots one bar-length apart. The window's size is the stream's memory — 40 bytes a slot, set aside whether or not a bar fills it — and the widest batch a live write can span. By default the node sizes it from the stream's timeframe: enough slots for about five weeks of bars (what 50,000 one-minute bars cover), but no fewer than 2,048 and no more than 50,000.

TimeframeSlotsMemory
1s to 1m50,0002 MB
5m10,000400 KB
15m3,334133 KB
30m and longer2,04882 KB

The node settings behind it are ingestion.live_candle.cache_arena_capacity (50000, the most slots a window can have) and cache_span (the time a window covers; unset, what cache_arena_capacity one-minute bars cover, so raising the capacity raises it too). cache overrides one stream.

CommandWhat it does
cache getPrint the stream's size and where it comes from.
cache set -slots NGive the stream N slots, from 16 to 8,388,608. Registers a stream the node does not know yet.
cache clearRemove the override; the default for the timeframe applies again.
shell
./bin/cli cache get -control 127.0.0.1:9091 -stream nyse:IBM:1h
2048 slots (node default for 1h)

./bin/cli cache set -control 127.0.0.1:9091 -stream nyse:IBM:1h -slots 8760
8760 slots (override)

./bin/cli cache clear -control 127.0.0.1:9091 -stream nyse:IBM:1h
2048 slots (node default for 1h)

stream

Creates, deletes, labels and inspects one stream. A write registers a stream on its own, so create is for setting a stream up before its first data.

CommandListenerWhat it does
stream createcontrolRegisters the stream. One already registered is left as it is; the command says so and succeeds.
stream deletecontrolTakes the stream out of the node's catalog. Its chunks, indexes and log records are not deleted, and a write to it registers it again. One not in the catalog is reported and succeeds.
stream set-custom-fieldscontrolAdds, changes or removes free-form labels on the stream (-set key=value, -remove key, each repeatable). The rest of the stream's settings are kept. Labels change nothing the node does.
stream inspectdataPrints one JSON object: the stream's settings (hours, thresholds, closures, lineage, cache size, labels), its storage statistics, and a summary of its gaps.
shell
./bin/cli stream create -stream nyse:AAPL:1m
./bin/cli stream set-custom-fields -stream nyse:AAPL:1m -set desk=equities -set owner=ops
./bin/cli stream inspect -stream nyse:AAPL:1m
{
  "stream": "nyse:AAPL:1m",
  "metadata": {
    "working_hours": { "timezone": "America/New_York", "days": [ ... ] },
    "gap_threshold_low": "0s",
    "gap_threshold_high": "0s",
    "closures": [],
    "lineage": null,
    "cache_capacity": 0,
    "custom_fields": { "desk": "equities", "owner": "ops" }
  },
  "stats": { "persisted_records": 98280, "chunks": 252, "corrections": 0, ... },
  "gaps": { "count": 251, "open": 1, "fillable": 1, "off_time_count": 250,
            "missing": "5m0s", "off_time": "4377h30m0s" }
}

stats is null when the token lacks LIST_STREAMS. The counts cover what is on disk.

gap

gap list prints a stream's filed gaps as CSV, one row per range, with its status, its reason and whether it may be filled. A reason of OFF_TIME is a market closure, which is never fillable; the fill_refusal column says why a gap is not. Only gaps in data already written to disk are filed: a hole still in memory is not listed yet. A summary goes to standard error. gap list uses the data port and needs READ_CANDLES.

FlagDefaultWhat it does
-startthe beginningWindow start. A gap that overlaps the window is listed whole.
-endno endWindow end, not included.
-openOnly gaps still OPEN.
shell
./bin/cli gap list -stream nyse:AAPL:1m
start,end,duration,status,reason,fillable,fill_refusal
2026-10-27T15:12:00Z,2026-10-27T15:17:00Z,5m0s,OPEN,UNKNOWN,true,
2026-10-27T20:00:00Z,2026-10-28T13:30:00Z,17h30m0s,PERMANENT,OFF_TIME,false,the market was closed for this period, so there is no data to recover
2 gap(s), 1 open, 1 fillable: 5m0s missing, 17h30m0s closed (off-time)

A bar the node derived while some of its source data was missing carries an INCOMPLETE mark. gap accept marks it accepted: known incomplete, keep it. gap unaccept puts it back. Only an incomplete mark can be accepted; a gap with no data is filled or left open. These two use the control listener.

FlagDefaultWhat it does
-startrequiredThe mark's start exactly as gap list reports it, RFC 3339 or Unix nanoseconds.
shell
./bin/cli gap accept -control 127.0.0.1:9091 -stream binance:ETHUSDT:5m \
  -start 2026-10-22T09:00:00Z

cluster

Administers a cluster through any member's control listener. status is answered by the node you name, without needing the cluster to agree, so it works while the cluster is broken. Every other command is sent to the cluster's current leader, which the CLI finds from the node you name. Run against a node with clustering off, a command says so.

CommandWhat it does
cluster statusThis node's view: who leads, the term, voters and non-voters, how far its log has applied.
cluster nodesThe registered nodes and their status. -status online (or leaving, offline, offline-leaving, decommissioned) filters.
cluster partitionsEvery partition's primary, copies and epoch. -node N: only what node N holds.
cluster healthEach partition's health: serving, short of copies, primary down, or unavailable, and which copy could take over. -impaired: only those that are not fully serving.
cluster config getThe settings every node agrees on.
cluster config set -compression CChanges the codec new chunks are written with (fixed_point_dod, gorilla or none), the one setting that may change. A node takes it when it restarts; existing chunks keep theirs.
cluster planWhat the balancer would move, from the leader's latest evaluation. Nothing is moved.
cluster migrate -partition P -to NMoves partition P to node N. It returns at once; the cluster does the move.
cluster abort -partition P -to NStops that move. Anything it already landed stays.
cluster migrationsThe moves in flight and how far each has got.
cluster drain -node NDecommissions node N: it moves its partitions away, then leaves the cluster and exits.
cluster drainsEvery draining node's progress.
cluster deregister -node NForgets a decommissioned or dead node, so its id may be used again. An online node is drained first.

Output is JSON with the protocol's field names. The list commands also take -format table.

Running a command twice is safe. If the cluster refuses a change, the CLI reads the cluster back: when what you asked for already holds (the partition is already on that node, the node is already draining, the codec is already set), it says so on standard error and succeeds. It never sends a change twice. When a change may or may not have landed, it reads back the same way and tells you which.

shell
./bin/cli cluster nodes -format table
NODE  STATUS  DATA            CONTROL         REPLICATION     INCARNATION
1     ONLINE  10.0.0.1:8080   10.0.0.1:9091   10.0.0.1:9300   12
2     ONLINE  10.0.0.2:8080   10.0.0.2:9091   10.0.0.2:9300   418
./bin/cli cluster migrate -partition 17 -to 2
./bin/cli cluster migrations -format table
PARTITION  KIND     SOURCE  TARGET  STEP
17         PRIMARY  1       2       CATCHING_UP

diag

diag storage prints one JSON object about the node you name: its disk (total, free, the fraction used), what it holds and what it is primary of (streams, records, bytes, partitions), its chunk and correction counts, and its ten largest streams by bytes on disk. A value the node did not measure is null, not zero. It lists every stream's statistics, which costs the node one index read per stream. Needs LIST_STREAMS.

shell
./bin/cli diag storage
{
  "node_id": 1,
  "disk": { "total_bytes": 501809635328, "free_bytes": 19533381632, "used_fraction": 0.961 },
  "held": { "streams": 1, "records": 30, "bytes": 375, "partitions": 1 },
  "primary": { "streams": 1, "records": 30, "bytes": 375, "partitions": 1 },
  "chunks": 1,
  "corrections": 0,
  "largest_streams": [ { "stream": "binance:BTCUSDT:1m", "bytes": 375, "records": 30, "chunks": 1 } ]
}

data

data verify -data-dir DIR checks every candle stream under a node's storage.data_dir: that its indexes can be read, and that every chunk they name is on disk and passes its own checksums, size, record count and time range. Run it on the node's machine. It only reads, so it is safe while the node runs: a chunk the node retires during the check is not reported. Tick data and the write-ahead log are not checked.

Each damaged file is one line on standard output (stream directory, chunk number, path, what is wrong), and the command exits with status 2 when there is any. A directory holding no partitions is an error rather than a clean result, so a wrong path cannot pass for a healthy one.

shell
./bin/cli data verify -data-dir /var/lib/mirexa
verified 1840 stream(s), 96211 chunk(s), 41730212352 bytes: no damage found

load

load loads candle files into a node or a cluster: CSV (plain, .gz, .zst, tab-separated .tsv) and Apache Parquet. Give it files or directories. It sends each row through an ordinary write, or through the history route for bars a live write cannot place, and then reads its window back: a row already stored with the same values is skipped, and one stored with different values is refused unless you pass -correct. A row that does not read is refused with its file and line, and the rest still load. A summary goes to standard error; the command exits with status 2 when any row was refused.

The columns default to timestamp,open,high,low,close,volume by position for CSV and by name for Parquet; -map names them otherwise. Each row's stream comes from -stream, or from columns and -exchange/-symbol/-timeframe, so one file can hold many streams. -addr takes any nodes of a cluster, comma-separated: each row is sent to its stream's primary. Needs WRITE_CANDLES and READ_CANDLES. Candles only; for trades use ingest -ticks.

FlagDefaultWhat it does
-addrlocalhost:8080Node addresses, comma-separated: any nodes of a cluster.
-streamnoneOne stream for every row, as exchange:symbol:timeframe.
-exchange, -symbol, -timeframenoneOne part of the stream for every row, where no column names it.
-mapby positionThe column mapping, field=source,…. Fields are ts open high low close volume exchange symbol timeframe; a source is a header name, #N (the Nth column) or a 'quoted constant'.
-map-filenoneA file of field=source lines, instead of -map.
-ts-formatnoneunix-s, unix-ms, unix-us, unix-ns, rfc3339 or a Go layout. A Parquet timestamp column needs none.
-tznoneThe time zone of timestamps that carry none (an IANA name).
-headerautoWhether a CSV file starts with a header line: auto, yes or no.
-delimiter,The CSV field separator (a tab for .tsv).
-correctoffRestate stored bars a row disagrees with, instead of refusing the row.
-dry-runoffRead, map and check every row and report, sending nothing.
-parallel4Streams loaded at once.
-reportnoneWrite the JSON report to this file (- for standard output).

It also takes -token, -token-file, -tls-ca and -tls-server-name, as the data-port commands do. Every rule (decimals, duplicates, how a refused row is reported, the report's fields) is in the wiki's load reference, and a walkthrough in Bulk loading files.

shell
./bin/cli load -stream binance:BTCUSDT:1m -ts-format unix-ms dump/*.csv.gz

./bin/cli load -addr node1:8080,node2:8080 -exchange binance -timeframe 1m \
  -map 'ts=open_time,open=o,high=h,low=l,close=c,volume=v,symbol=sym' \
  -report report.json vendor.parquet

token

token makes the keys and access tokens of authentication. It talks to no node: a token is signed with a private key on your machine, and the node checks it against the public key in its configuration. A token cannot be revoked before it expires, so its validity is the limit on a leaked one; to cut every outstanding token short, change the signing key.

A single node with no trusted_keys configured makes its own key, <data_dir>/auth/issuer.key, in the format keygen writes, so issue -key takes it as it is. Once trusted_keys lists a key, the node makes none.

CommandWhat it does
token keygen -name N [-dir D]Writes an Ed25519 keypair, N.key (mode 0600) and N.pub, into D (default the current directory), and prints the trusted_keys entry to add to the node's configuration. It refuses to overwrite a key.
token issue -key F -perms P,… [-validity D]Prints a signed token, alone on standard output, so > token gives a usable file; what it issued goes to standard error. -validity defaults to 30 minutes and may not exceed an hour. The permissions are READ_CANDLES, WRITE_CANDLES, READ_TICKS, WRITE_TICKS, LIST_STREAMS, ADMIN_STREAM and ADMIN_CLUSTER.
token inspect TOKEN [-pub F]Prints a token's permissions and expiry. With -pub it also checks the signature against that public key; without it, it says the signature was not checked.
shell
./bin/cli token keygen -name ops -dir ./keys
./bin/cli token issue -key keys/ops.key -perms READ_CANDLES,LIST_STREAMS -validity 1h > token
./bin/cli token inspect "$(cat token)" -pub keys/ops.pub
tenant:      0
permissions: READ_CANDLES|LIST_STREAMS
expires:     2026-10-31T15:12:04Z
status:      valid for another 59m59s
signature:   valid, signed by keys/ops.pub

The wiki's token reference has every flag.

certs

certs is the certificate authority for a cluster's inter-node mutual TLS. It talks to no node. Make a CA once, then a key and certificate for each node; give each node its own pair plus ca.crt. A node certificate names the node (mirexa-node-<id>) and the addresses its peers dial it at.

CommandWhat it does
certs ca -dir D [-cn NAME] [-validity D]Writes ca.key (mode 0600) and ca.crt into D; valid ten years by default. It refuses to replace a CA that exists, since every certificate it issued would stop verifying.
certs issue -dir D -node-id N -hosts H,… [-validity D]Writes node-N.key and node-N.crt beside the CA, signed by it; valid 90 days by default. -hosts are the node's IP addresses and names.
certs inspect -cert FPrints a certificate's node id, issuer, validity (and whether it expires within two weeks) and addresses.

A certificate is replaced without a restart: write the new files and send the node SIGHUP. There is no revocation list; a node that must stop being used is fenced, or drained and decommissioned. The wiki's certs reference and TLS and certificates have the rest.

shell
./bin/cli certs ca -dir ./certs
./bin/cli certs issue -dir ./certs -node-id 1 -hosts 10.0.0.1,node1.internal