Skip to content

CLI Guide

The CLI ships in both editions (desktop and server). Every command works without sudo once the service is installed.

CLI example — remote servers over the last 5 minutes (once it’s done, you’re back at the prompt):

CaudalGhost CLI example: the output of "caudalghost hosts 5m" is a table of remote servers with bytes received, sent, and total; once it finishes, the shell returns to the prompt.

Several subcommands accept a range as an argument. Valid values are:

RangeMeaning
5m, 1h, 24h, 7d, 30d, 90d, 365dRelative window going back from now
hoyFrom midnight to now
ayerThe entire previous calendar day
este-mesFrom the 1st of the current month to now
este-anioFrom January 1st of the current year to now
dia:YYYY-MM-DDA specific calendar day, e.g. dia:2026-06-30
rango:YYYY-MM-DD:YYYY-MM-DDA specific date range, e.g. rango:2026-06-01:2026-06-30

A malformed range (invalid date, reversed interval…) ends the command with exit code 5.

Checks that the CLI can reach the daemon over the Unix socket. Handy in scripts before requesting data.

Ventana de terminal
caudalghost ping

Traffic right now, per interface (per-second rates).

Ventana de terminal
caudalghost now

Use --seconds to control the instant-sampling window (a handful of seconds by default):

Ventana de terminal
caudalghost now --seconds 5

Cumulative totals per interface for a given range.

Ventana de terminal
caudalghost total 24h
interfaz rx tx total
wlan0 842 MiB 119 MiB 961 MiB
eth0 12 MiB 3 MiB 15 MiB
Σ total 854 MiB 122 MiB 976 MiB

Top applications by network usage, for a range or for an instant window.

Ventana de terminal
caudalghost top 24h
app rx tx total
firefox 612 MiB 88 MiB 700 MiB
thunderbird 140 MiB 21 MiB 161 MiB
syncthing 45 MiB 39 MiB 84 MiB
Σ total 797 MiB 148 MiB 945 MiB

It also accepts an instant window via --seconds, instead of a range:

Ventana de terminal
caudalghost top --seconds 10

The (otros) (“other”) row never appears in top: every app is listed under its own name.

Remote servers (by hostname), grouped by root domain, for a given range.

Ventana de terminal
caudalghost hosts 5m
host rx tx total
cdn.ejemplo.net 38 MiB 2 MiB 40 MiB
api.ejemplo.org 9 MiB 4 MiB 13 MiB
(otros) 3 MiB 1 MiB 4 MiB
Σ total 50 MiB 7 MiB 57 MiB

Unlike top, here an (otros) (“other”) row can appear: it groups the hosts that don’t make the per-app top list.

You can narrow it down to a single application with --app:

Ventana de terminal
caudalghost hosts 24h --app firefox

How total throughput evolves over a range, in time buckets (terminal sparkline + table).

Ventana de terminal
caudalghost serie 24h

Bucket size is controlled with --bucket (minute, hour, or day):

Ventana de terminal
caudalghost serie 7d --bucket hour

Interactive terminal panel (TUI): apps, interfaces, and hosts, live or over a historical range, with per-app→hosts drill-down, a range selector, and threshold highlighting.

Ventana de terminal
caudalghost live

CaudalGhost live panel in the terminal (TUI): three bands showing download and upload charts, live apps and interfaces, and accumulated history.

Inside live you can move between apps, interfaces, and hosts, drill into an app to see which hosts are driving its traffic, switch ranges without leaving the panel, and visually flag usage that crosses a threshold. Exit with the key shown right in the panel.

These flags work on ping, now, total, top, hosts, and serie (not on live, which is a separate interactive panel):

FlagEffect
-o, --output table|json|csv|ndjsonOutput format. Defaults to table
--jsonShorthand for -o json
-u, --units binary|decimal|bitsUnits: binary (KiB, MiB…), decimal (KB, MB…), or bits (Kbps, Mbps…)
-n, --limit NLimits the number of rows
--sort <col>Sorts by a column (e.g. --sort total)
-r, --reverseReverses the sort order
--fields a,b,cProjects only those columns — csv, json, and ndjson only
--no-headerOmits the header row — csv only
--watchRefreshes the table at a set interval — only with -o table
--interval SECSRefresh interval for --watch
--quietSuppresses any output besides the result
--no-colorDisables color (also respects the NO_COLOR variable)

Table columns are lowercase: app, host, or interfaz depending on the command, plus rx, tx, and total, with a final Σ total row.

JSON example (includes "schema":1 so you can version your parsing):

Ventana de terminal
caudalghost top 24h -o json
{"schema":1,"rango":"24h","filas":[
{"app":"firefox","rx":641925120,"tx":92274688,"total":734199808},
{"app":"thunderbird","rx":146800640,"tx":22020096,"total":168820736}
],"total":{"rx":835055616,"tx":155189248,"total":990244864}}

CSV example with column projection:

Ventana de terminal
caudalghost hosts 24h --fields host,total -o csv
host,total
cdn.ejemplo.net,41943040
api.ejemplo.org,13631488

If you’re running a manual daemon with a different socket (advanced use), pass it via --socket or the CAUDALGHOST_SOCKET environment variable:

Ventana de terminal
caudalghost live --socket /run/caudalghost/caudalghost.sock
Ventana de terminal
export CAUDALGHOST_SOCKET=/run/caudalghost/caudalghost.sock
caudalghost now

On a standard install this isn’t needed: the CLI auto-detects the service’s socket.

CodeMeaning
0OK
1Other error
2Invalid usage (malformed flags or arguments)
3Daemon unreachable
4Business error (e.g. nonexistent app or host)
5Invalid time range

The package installs command completion for bash, zsh, and fish, plus a man page:

Ventana de terminal
man caudalghost
Ventana de terminal
caudalghost --version

Shows the version, the git hash, and the build date — handy for reporting which build you’re on when you ask for help.