Skip to content
NetsCLI

CLI

The CLI is the best interface for repeatable diagnostics, automation, and machine-readable output.

Terminal window
# Discover devices on the default local subnet.
netscli discover
# Discover a specific subnet.
netscli discover 192.168.1.0/24
# Scan common service ports on a host.
netscli scan 192.168.1.1 -p 22,80,443
# Inspect reachability, reverse DNS, and selected ports.
netscli inspect 192.168.1.1 -p 22,80,443
# Sweep a subnet for hosts with selected services.
netscli sweep 192.168.1.0/24 -p 22,80,443
# Query DNS records.
netscli dns netscli.com --record ALL
# Start the MCP server for agent integrations.
netscli serve

Use --json or --yaml when another tool needs stable data.

Terminal window
netscli scan 192.168.1.1 -p 22,80,443 --json
netscli dns netscli.com --record ALL --yaml

Structured output is additive. New fields may appear over time, but existing field names remain stable unless a breaking release says otherwise.

Example script pattern:

Terminal window
netscli discover --json | jq '.[].ip'

The CLI exposes shared network operations plus command-line maintenance workflows:

CommandPurpose
discoverFind reachable hosts on a subnet.
scanScan TCP ports on one host.
inspectBuild a host profile from reachability, reverse DNS, and optional ports.
sweepDiscover hosts and scan selected ports across them.
pingMeasure reachability and packet loss.
traceShow route hops to a host.
dnsQuery DNS records.
reverseReverse lookup an IP address.
mdnsDiscover local mDNS/DNS-SD service announcements.
interfacesList local network interfaces.
arpRead the local ARP neighbor cache.
pcapCapture or parse packets when built with packet-capture support.
serveRun the MCP server over stdio.
mcp-serviceManage MCP server auto-start on supported systems.
setup / doctorCheck local environment and dependencies.
completions / manGenerate shell completions or a man page.

Use command-specific help for exact flags:

Terminal window
netscli --help
netscli scan --help
netscli dns --help

--concurrency / -j is a global option for limiting in-flight network work. It is useful on fragile gateways or when scanning larger local ranges.

The help output is the source of truth for flags. The docs explain workflow and intent; the binary explains exact syntax.

Some workflows intentionally stay in the command-line interface:

  • setup and doctor for local environment checks.
  • serve and mcp-service for MCP server launch and supported service management.
  • Shell completions and manpage generation.

The desktop app exposes shared network operations and result exploration. It does not duplicate maintenance workflows unless they become shared core operations with a clear interactive use case.

Raw ICMP, traceroute, and packet capture can require elevated permissions depending on the platform. Port scans and DNS lookups normally do not.

The core library enforces safety limits for subnet size, port count, concurrency, and timeouts. Interface-specific code does not bypass those limits.