Skip to main content

CLI reference

gnarl <command> [subcommand] [flags]

Global flags apply to every command.

FlagDefaultDescription
--config <path>./gnarl.yamlConfig file to load
--home <path>~/.gnarlIdentity, peer table, and local state
--output <fmt>texttext, json, or ndjson
--log-level <lvl>infoerror, warn, info, debug, trace
--no-coloroffDisable ANSI color

node

gnarl node up [--data <path>] [--listen <addr>] [--entry-only] [--relay]
gnarl node status [--watch]
gnarl node drain [--timeout 60s]
gnarl node down

up starts the process, builds or opens the local index, and begins serving. It does not announce to any network — that is join.

FlagDescription
--data <path>Corpus to index. Repeatable. Opened read-only.
--listen <addr>Bind address. Default 0.0.0.0:7420.
--entry-onlyCoordinate queries, hold no index.
--relayForward manifests and queries across a boundary.
--watch(status) Refresh in place until interrupted.

join / leave

gnarl join --network <name> [--bootstrap <addrs>] [--psk-file <path>]
gnarl leave [--network <name>]
FlagDescription
--network <name>Network to announce into. public for the open network.
--bootstrap <addrs>Comma-separated host:port peers to contact first.
--psk-file <path>Pre-shared key for a private network.

index

gnarl index build <name>
gnarl index publish <name>
gnarl index unpublish <name>
gnarl index refresh <name>
gnarl index watch <name>
gnarl index list
gnarl index drop <name> [--force]

build creates the index locally. publish announces its manifest. The split is deliberate: you always get to look at a manifest before the network sees it.

manifest

gnarl manifest show <index> [--output json]
gnarl manifest verify <file>
gnarl manifest list [--peer <node-id>]
gnarl search <query> [flags]
FlagDefaultDescription
--localoffQuery only this node
--limit <n>10Hits to return
--index <name>allRestrict to one index. Repeatable.
--max-nodes <n>64Fan-out ceiling
--deadline <dur>750msGive up on stragglers after this
--trust <mode>verifiedverified, pinned-only, or any
--explainoffPrint the plan, the roster, and the timings
gnarl search "glacier retreat" --index imagery --limit 25 --explain

peer

gnarl peer list [--healthy]
gnarl peer show <node-id>
gnarl peer trust <node-id> [--label <name>]
gnarl peer untrust <node-id>
gnarl peer block <node-id>

identity

gnarl identity create [--label <name>]
gnarl identity show
gnarl identity rotate [--keep-old <dur>]
gnarl identity export --out <path>

Exit codes

CodeMeaning
0Success
1Generic failure
2Bad usage or config
3Query returned incomplete coverage and --require-complete was set
4Signature verification failed
5Refused by policy