-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
These flags apply to all subcommands.
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--format |
human |
Output format: human, json
|
|
--no-color |
false |
Disable ANSI colour in human output |
Usage:
catnet scan [targets] [flags]Arguments:
targets — comma-separated list of IPs, CIDRs, or dash ranges. Multiple positional arguments are also accepted.
Flags:
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--ports |
-p |
22,80,443,139,445,3389 |
Ports to scan |
--threads |
-t |
64 |
Max concurrent goroutines |
--ping-timeout |
1000 |
ICMP timeout in milliseconds | |
--port-timeout |
500 |
TCP connect timeout in milliseconds | |
--timeout |
(none) | Hard wall-clock scan deadline (e.g. 30s) |
|
--no-ports |
false |
Skip port scanning entirely | |
--output |
-o |
(none) | Write JSON to file (implies --format json) |
--quiet |
-q |
false |
Suppress progress output to stderr |
--format |
human |
Output format: human, json
|
--timeoutbehaviour: sets acontext.Deadlineon the entire scan. Partial results are returned if the timeout expires, and the process exits with code 2.
Examples:
-
Scan /24 with ports 22 and 80 only, quiet mode:
catnet scan 192.168.1.0/24 -p 22,80 --quiet
-
JSON output piped to jq:
catnet scan 10.0.0.0/24 --format json | jq '.devices[] | select(.isAlive)'
-
Save results and convert to CSV:
catnet scan 10.0.0.1-254 -o scan.json catnet export scan.json --format csv -o scan.csv -
Hard 60-second timeout:
catnet scan 172.16.0.0/16 --timeout 60s
-
No port scan, maximum speed:
catnet scan 192.168.0.0/16 --no-ports -t 256 --quiet
Usage:
catnet export [input.json] --format <fmt> [-o output]Arguments:
input.json — path to a previously saved scan result.
Flags:
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--format |
-f |
(required) | Output format: json, csv, xml
|
--output |
-o |
stdout | Write to file instead of stdout |
Schema forward compatibility: unknown JSON fields in the input file are silently ignored per catnet-core compatibility policy. A WARN is printed to stderr if the
schemaVersionmajor digit is not 1.
Usage:
catnet version [--short]Flags:
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--short |
false |
Print only the version number (no runtime info) |
Output format:
catnet/v0.2.0 (linux/amd64) go1.26.3
catnet-core/v0.2.0
Usage:
catnet completion [bash|zsh|fish|powershell]Pipe to a file or eval for persistent completion. See Installation for setup examples.
© 2026 Fábio Mendes · MIT License · catnet · catnet-core · Report an issue
catnet Wiki
Getting Started
Reference
Guides
Project