id = "snitch" name = "snitch" homepage = "https://github.com/karol-broda/snitch" description = "Prettier way to inspect network connections" executables = ["snitch"] [dotfiles] # The official README documents the optional config at # ~/.config/snitch/snitch.toml and remembered TUI state at # $XDG_STATE_HOME/snitch/tui.json (defaulting to ~/.local/state/snitch/tui.json). # https://github.com/karol-broda/snitch/blob/master/README.md paths = [ "[configHome]/snitch/snitch.toml", "~/.local/state/snitch/tui.json", ] secret = [] [commands] format = 1 label = "Snitch" description = "List network connections as a table. The interactive TUI, json, watch and upgrade commands are left out." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand]] path = ["ls"] label = "List connections" description = "One-shot table of sockets and processes, optionally filtered." [[commands.subcommand.source]] id = "snitch-readme" kind = "manual" url = "https://github.com/karol-broda/snitch/blob/master/README.md" revision = "master README" evidence = '''snitch ls # styled table (default) snitch ls -l # listening only snitch ls -t -l # tcp listeners snitch ls -e # established only snitch ls -p # plain/parsable output snitch ls -o json # json output snitch ls -o csv # csv output snitch ls -n # numeric (no dns resolution) snitch ls --no-headers # omit headers -t, --tcp tcp only -u, --udp udp only -l, --listen listening sockets -e, --established established connections -4, --ipv4 ipv4 only -6, --ipv6 ipv6 only snitch ls proto=tcp state=listen snitch ls pid=1234 snitch ls proc=nginx snitch ls lport=443 snitch ls contains=google''' [[commands.subcommand.field]] id = "listen" label = "Listening sockets" type = "boolean" option = ["--listen", "-l"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "established" label = "Established connections" type = "boolean" option = ["--established", "-e"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "tcp" label = "TCP only" type = "boolean" option = ["--tcp", "-t"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "udp" label = "UDP only" type = "boolean" option = ["--udp", "-u"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "ipv4" label = "IPv4 only" type = "boolean" option = ["--ipv4", "-4"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "ipv6" label = "IPv6 only" type = "boolean" option = ["--ipv6", "-6"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "output" label = "Output format" type = "enum" option = ["-o"] choices = [{ value = "json", label = "JSON" }, { value = "csv", label = "CSV" }] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "plain" label = "Plain output" type = "boolean" option = ["-p"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "numeric" label = "No name resolution" type = "boolean" option = ["-n"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "no_headers" label = "Omit headers" type = "boolean" option = ["--no-headers"] sources = ["snitch-readme"] [[commands.subcommand.field]] id = "filters" label = "Filters" description = "key=value pairs such as proto=tcp, state=listen, pid=1234, proc=nginx, lport=443, contains=google." type = "string" position = 0 multiple = true sources = ["snitch-readme"] [[commands.subcommand.task]] id = "listeners" label = "TCP listeners" set = { tcp = [true], listen = [true] } fields = ["tcp", "listen", "numeric"] required = [] [[commands.subcommand.task]] id = "process" label = "Find a process" fields = ["filters", "numeric"] required = ["filters"] [[commands.subcommand.task]] id = "export" label = "Export as JSON" set = { output = ["json"] } fields = ["output", "listen", "established"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["listen", "established", "tcp", "udp", "filters", "output"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["ipv4", "ipv6", "plain", "numeric", "no_headers"]