Skip to main content

cn-tool

Infoblox lookups, network checks and configuration investigation from an interactive menu or a scriptable command line. cn-tool helps network engineers and system administrators inspect IP space, check reachability, compare configuration snapshots and collect device inventory without assembling separate scripts for each task.

It runs on Linux, macOS and Windows 10/11 (x64), with Python 3.10 or newer. Infoblox is required for IPAM lookups; ping and local configuration tools can run independently.

Features

  • Inspect IPAM and DNS: look up IPv4/IPv6 addresses, subnets, FQDNs and sites, including network views, PTR checks, DHCP data and extensible attributes.
  • Check and monitor reachability: bulk ICMP and optional TCP probes, repeated monitoring, persistent history and summaries of when hosts were seen online.
  • Investigate configurations: search local repositories, identify snapshot changes with cn diff, and browse configurations and comparisons in a terminal interface.
  • Collect and enrich results: query Cisco IOS/IOS-XE and NX-OS inventory, add Active Directory subnet information or search local SD-WAN YAML repositories.
  • Reuse the output: table, JSON, Markdown and CSV output for commands; Excel workbooks and optional email delivery for reports.

Installation

pipx installs cn-tool in its own environment and places its commands on your PATH:

pipx install cn-tool
cn --version

Upgrade with pipx upgrade cn-tool. In a virtual environment you manage, python -m pip install cn-tool is also supported. cn-tool is an alternative name for cn if another installed program already uses that name.

See installation and upgrades for virtual environments, release archives and source installs, or the Windows guide for PowerShell.

Quick start

Try a local reachability check without Infoblox or credentials. ICMP needs the system ping command:

cn ping 127.0.0.1

For Infoblox, create your user configuration:

cn init

This writes ~/.cn (%USERPROFILE%\.cn on Windows) and never overwrites a file. Open it in a text editor, uncomment [api]'s endpoint, set your grid's WAPI URL and save as UTF-8. Then run:

cn doctor
cn

cn doctor checks configuration and, when configured, the Infoblox connection. cn opens the interactive menu. A terminal can prompt for credentials; separate Infoblox accounts and GPG sources are also supported. Edit the configuration in a text editor to keep its comments.

Command line

Run one command for scripts or individual tasks:

cn ip 10.20.0.5 --format json
cn subnet 10.20.0.0/24 --view prod --format md
cn ping router.example.net --tcp 22,443
cn monitor 10.20.0.0/28 --every 1m --for 2h
cn diff router01 --since 24h

Results go to stdout; progress and errors go to stderr. Commands do not prompt without a terminal. Use cn --help or cn <command> --help for options, and the CLI reference for input files, output schemas and exit statuses. Command-line reports require --report or -r FILE.

Browser interface

The optional local browser interface is installed separately:

pipx install "cn-tool[webui]"
cn-web

For an existing pipx installation, use pipx upgrade "cn-tool[webui]". With a regular Python installation, python -m cn_tool.webui starts the same interface. It binds to 127.0.0.1 and uses your existing .cn configuration.

Version scope: release 0.9.0 provides Subnets, IP, Ping, Monitor, Configuration Search and Site Demobilization. Release 0.8.4 provides Subnets. The two configuration scans run on Linux and Windows; on macOS, Site Demobilization network preview and the other tools remain available. Windows-native verification for the 0.9.0 additions remains deferred. See the WebUI guide for details. Closing a tab keeps the application running; Quit application ends it and runs configured exit actions, including email when enabled.

Documentation

These links describe current source and identify planned features where applicable. For an installed release, check cn --version and use the matching tag; the 0.8.4 README documents that release. The documentation index explains version scope.

Guide Details
Windows PowerShell, encoding, scheduled tasks and platform differences
Command line Commands, inputs, output, JSON, statuses and cn doctor
Infoblox Lookup behavior, network views, PTR/DHCP fields and IPv6
Ping and monitoring Probe limits, history, reruns and deletion
Configuration File precedence, settings, reports and Setup
Credentials Infoblox and device accounts, environment variables and GPG
Integrations AD, email, YAML, device inventory, DNS and trace tools
Configuration history cn diff, repository layout and browser TUI keys
Release highlights Upgrade notes and links to tagged releases

Operational notes

Infoblox queries read grid data. Network checks make probes; reports, cache and ping history write local files. Reports can contain sensitive network information and accumulate earlier results; review them before downloading or emailing them. Store credentials through the documented sources and keep TLS verification enabled with an appropriate CA bundle. See each guide for platform limits and error behavior.

Project

Source · Issues · Releases · Apache-2.0 license

Metadata

Release files for cn-tool 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cn-tool 0.9.0
File Size Uploaded Provenance Actions
cn_tool-0.9.0.tar.gz 472.1 kB Without provenance Details for cn_tool-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cn-tool 0.9.0
File Interpreter ABI Platform Actions
cn_tool-0.9.0-py3-none-any.whl Python 3 none any Details for cn_tool-0.9.0-py3-none-any.whl

Total release size: 968.8 kB

Release files / cn_tool-0.9.0.tar.gz

Download URL cn_tool-0.9.0.tar.gz
Size 472.1 kB
Tags Source
SHA-256 checksum
How to use checksums
53889caa5c63cd3773f7ff115826e4c64ccaea4ecdb92ae9a287069664c81136
BLAKE2b-256 checksum
How to use checksums
2702701d0e6c2a1d57271a12ec2d959bb0bd1e946d7b81c53f25b280699e88e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / cn_tool-0.9.0-py3-none-any.whl

Download URL cn_tool-0.9.0-py3-none-any.whl
Size 496.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4269d82653b3d9ac736e44e97619370f32279b705f72045aba71a8a812c8abcf
BLAKE2b-256 checksum
How to use checksums
b994bb3fc714cc67d5769b4ba36f14fd67d5838e48a2dd944da522e17e94c0c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Security for cn-tool 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page