ip-tools 0.2.0

A CLI tool and library to retrieve the local IP address and list network interfaces
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2026-07-24

### Added
|- Add editorconfig
|- Add renovate.json
|- Add a badge for [Rust GitHub Template](https://rust-github.github.io/)
|- Add CLI integration tests covering get, list, no-subcommand, flag rejection, and help output
|- Add assert_cmd and predicates as dev dependencies
|- Add pre-publish test step to cargo publish in CD workflow
|- Add husky-rs git hooks (pre-commit, commit-msg, pre-push) for local fmt/clippy/test enforcement
|- Add unit tests for IpToolsError (Display, source, From, Send+Sync) to improve coverage
|- Add coverage enforcement step to CI (`cargo llvm-cov --fail-under-lines 80`)
|- Document coverage testing with cargo-llvm-cov in CONTRIBUTING.md
|- Add `--json` global flag for machine-readable JSON output of `get` and `list` subcommands
|- Add CLI integration tests for JSON output structure (get, list, and global flag placement)
|- Add `#![warn(clippy::pedantic, clippy::nursery)]` to crate roots to enforce code quality standards locally and in CI
|- Update CI clippy and pre-push hook to explicitly check pedantic and nursery lints
|- Update CONTRIBUTING.md clippy command to include pedantic and nursery lints
|- Add runnable doc-tests (`# Examples`) to the public API (`get_local_ip`, `list_net_ifs`, `IpToolsError`) so documented examples are compiled and verified in CI
|- Add crate-level documentation (`//!`) with a quick-start example to `src/lib.rs`, providing the docs.rs front page for the library
|- Add an inline library usage snippet to README.md so readers see the `ip_tools` API at a glance
|- Add a runnable library example (`examples/ip_info.rs`) demonstrating `get_local_ip` and `list_net_ifs`; makes the CI docs job `--examples` flag meaningful

### Changed
|- Document the library example (`cargo run --example ip_info`) and clarify that `cargo test` runs doc-tests in CONTRIBUTING.md
|- Remove redundant `.version()` and `.about()` calls (and their now-unused `crate_version`/`crate_description` imports) from the CLI parser — `command!()` already sets these from Cargo.toml; behavior unchanged (`.author(crate_authors!("\n"))` kept for its multi-author separator)
|- Improve crate `description` (was the generic "IP Tools") and add `keywords` and `categories` to Cargo.toml for better crates.io discoverability; the new description also improves the CLI `--help` about text
|- Update pre-commit hook to run clippy with `-W clippy::pedantic -W clippy::nursery`, matching pre-push and CI (previously only pre-push and CI enforced these lints, so the local commit gate was weaker than CI for targets without a crate-level `#![warn]` attribute, e.g. examples)
|- Adopt `thiserror` for `IpToolsError`, replacing manual `Display`, `Error`, and `From` implementations with derive macros (reduces ~30 lines of boilerplate while maintaining identical public API)
|- Remove cli.yml
|- Add `serde` and `serde_json` as direct dependencies (already transitive via `clap`)
|- Remove redundant dependabot.yml — Renovate handles all dependency updates
|- Update clap to v4
|- Replace clap_derive with clap_builder
|- Replace CARGO_API_KEY with CARGO_REGISTRY_TOKEN
|- Refactor `get_local_ip` and `list_net_ifs` to return `Result` instead of panicking
|- Print errors to stderr and exit with non-zero status on failure
|- Add `ExitCode` return from CLI entry point
|- Replace placeholder tests with meaningful integration tests
|- Add benchmarks for `get_local_ip` and `list_net_ifs`
|- Modernize CD workflow: replace deprecated `actions-rs/toolchain` and `actions-rs/cargo` with `dtolnay/rust-toolchain` and direct `cargo` commands
|- Modernize audit workflow: replace deprecated `actions-rs/audit-check` with `cargo install cargo-audit` and direct `cargo audit`
|- Improve README with actual usage examples for `get` and `list` subcommands
|- Update clap from `~4.5.0` to `~4.6.0` (4.5.61 -> 4.6.4)
|- Update clap_builder to 4.6.2
|- Remove redundant `--ip` flag from `get` subcommand and `--all` flag from `list` subcommand
|- Fix pedantic clippy warnings: `handler` takes `&ArgMatches` instead of by value, use `&net_ifs` in for loops
|- Simplify `list_net_ifs` by removing unnecessary `let` binding and `Ok()` wrapper
|- Use Display format instead of Debug format for IP addresses in CLI output
|- Fix list output format from tab-separated to `name: ip`
|- Fix misleading doc comments on `get_local_ip` and `list_net_ifs` to clarify they return `Result`
|- Inline format arguments (e.g., `{e}` instead of `{}`, `e`) in string formatting

### Fixed
|- Fix broken checkbox format in bug report and feature request issue templates
|- Fix clippy command in CONTRIBUTING.md to match CI (`-D warnings`)
|- Fix README example output to match actual `name: ip` format (was tab-separated)
|- Run tests before `cargo publish` to prevent untested code from being published to crates.io

## [v0.1.0] - 2022-08-02

### Added
|- initial release
|- add clap for command line arguments