The only way to control a Dingo in the wild
dingoctl is the command-line interface for managing a running Dingo node. It communicates with the node over the Bark gRPC API.
go install github.com/blinklabs-io/dingoctl@latestOr build from source:
git clone https://github.com/blinklabs-io/dingoctl.git
cd dingoctl
go buildConnect to a local Dingo node:
dingoctl --connect localhost:8080 <command>With TLS:
dingoctl --connect mainnet.example.com:443 --tls <command>dingoctl supports a flexible configuration system with profiles, making it easy to manage connections to multiple Dingo nodes.
Configuration is stored at ~/.config/dingoctl/config.yaml (XDG-compliant).
Example configuration:
current_profile: default
profiles:
default:
connect: localhost:8080
timeout: 30s
output: text
mainnet:
connect: mainnet.example.com:443
tls: true
timeout: 60s
output: json# List all profiles
dingoctl config list
# Switch to a different profile
dingoctl config use mainnet
# Get a configuration value
dingoctl config get connect
# Set a configuration value
dingoctl config set connect localhost:8080
dingoctl config set --profile mainnet tls trueOverride any configuration setting with environment variables:
export DINGOCTL_PROFILE=mainnet
export DINGOCTL_CONNECT=localhost:8080
export DINGOCTL_TIMEOUT=60s
export DINGOCTL_OUTPUT=jsonSettings are applied in this order (highest to lowest priority):
- Command-line flags
- Environment variables (
DINGOCTL_*) - Profile settings (from config file)
- Defaults
dingoctl [flags] <command> [args]version: Print CLI and node version informationcompletion [bash|zsh|fish|powershell]: Generate shell completion scriptsconfig: Manage local dingoctl profiles and settingsdatabase: Manage snapshots, restore, truncate, and operation statusevents: List event types, print event schemas, and stream eventsstop: Gracefully stop the connected Dingo noderestart: Gracefully restart the connected Dingo nodestatus: Show lifecycle state, health, uptime, and sync status
Read-only access to the node's EventBus over Bark's EventService. Publishing is not exposed.
dingoctl events list # event types the node accepts
dingoctl events schema chain.update # payload fields of one type
dingoctl events subscribe # stream every event until Ctrl+C
dingoctl --output json events subscribe --type 'chain.update'events subscribe flags:
--type <name|pattern>: registered event type or category pattern such aspeergov.*; repeatable. Default is every type.--origin-node <id>: only events from this origin node; repeatable.--filter <expr>: client-side filter,key=valueorkey!=value, where the value may use*and?wildcards. Repeatable; every filter must match. Keys aretype,origin_node_id,id,sequence, anddata.<field>for a field of the decoded payload (nested fields asdata.rollback.to_slot). An event that lacks a key never matches=. Payload fields can only be filtered for payload types this dingoctl build knows; others carry adata_typeand nodata.--reliable: acknowledged at-least-once delivery (SubscribeWithAck) instead of the default at-most-once Subscribe. Events are acknowledged after they are written (including ones a filter drops), a reconnect resumes from the last acknowledged event, and redelivered events are skipped by sequence.--subscriber-id <id>and--from-sequence <n>: with--reliable, resume a named subscription across runs. The default id is random.
Output follows --output: one line per event in text and table, one compact
JSON object per line with json (newline-delimited, suited to jq and
scripts), and one ----separated document per event with yaml.
A dropped connection, such as the node restarting, is retried with exponential backoff (capped at 5 seconds) until the stream is stopped; other transient errors, such as a subscriber limit, are retried within the retry budget, which resets whenever an event arrives. A message goes to stderr on each reconnect. In at-most-once mode, events published while disconnected are lost. SIGINT and SIGTERM stop the stream once the event being written is complete and exit with status 130 and 143 respectively. Other failures use the usual exit codes.
--connect <address>: Node address (host:port)--profile <name>: Config profile to use--tls: Use TLS--insecure: Skip TLS certificate verification--ca-cert <path>: Path to CA certificate--client-cert <path>: Path to client certificate for mTLS--client-key <path>: Path to client key for mTLS--timeout <duration>: Request timeout (e.g., 30s, 1m)--output <format>: Output format (text, json, yaml, table)--quiet: Suppress non-error output--verbose: Enable verbose output
dingoctl talks to a Dingo node over Bark's gRPC API. Point it at your node
with --connect (or $DINGOCTL_CONNECT), e.g. --connect localhost:9091.
--tls(or--insecure, which implies it): use TLS.--ca-certtrusts a custom CA instead of the system pool.--tlsis required for every command — including read-only ones likedatabase info— against any node that has the database lifecycle service enabled (barkPort+databaseLifecycle.snapshotDirconfigured on the node). That node's TLS cert/key become mandatory server-side, so it no longer has a plaintext listener at all; connecting without--tlsfails at the transport level before any RPC — including a purely read-only one — is even attempted. If you get a connection error on a command that used to work with no flags at all, this is almost always why: the node you're pointed at now requires TLS across the board, not just for destructive commands.--client-cert/--client-key: present a client certificate for mutual TLS. This is additionally required against a node that hasbarkClientCaFilePathconfigured, forsnapshot create,snapshot delete,snapshot verify,restore,truncate, andcancelspecifically. In addition, Bark'sLifecycleServiceis mTLS-protected, so every lifecycle command (status,versionnode lookup,stop, andrestart) also requires--client-cert/--client-keyon such nodes. Without a client cert, those commands fail at the TLS/auth boundary before RPC dispatch.stop/restartalso require an authorized operator principal; an authenticated but unauthorized cert is rejected with permission denied. Ask whoever operates the node for a certificate signed by its configured CA and mapped to the required role.
All of the above can also be set per-profile in the config file; see
dingoctl config --help.
Apache 2.0 - see LICENSE for details.