{
  "report_info": {
    "version": "10.0.3",
    "generated_at": "2026-10-29T23:50:29Z",
    "binary_name": "ip-fetch"
  },
  "binary": {
    "name": "ip-fetch",
    "path": "/opt/kodachi/dashboard/hooks/ip-fetch",
    "timestamp": "2026-10-29T23:50:29Z",
    "file_info": {
      "size": 9287296,
      "sha256": "0546e9f7a6a12e05837b1315896ca7590d68a5714544de6dbead699d99b87ba9"
    },
    "flag_n": {
      "command": "info",
      "data": {
        "author": "Warith Al Maawali",
        "copyright": "© 2026 Kodachi OS",
        "description": "IP Geolocation data fetcher for Kodachi OS - Fetches and displays IP address information including geolocation, ISP, and network details",
        "features": [
          "Multi-source IP geolocation with fallback support",
          "IPv4 and IPv6 dual-stack support",
          "Bulk IP lookup with optimized performance",
          "Offline mode with cached data",
          "VPN and proxy detection",
          "ISP and organization information",
          "Multi-provider lookups over HTTPS",
          "Falls back to the next provider when one is rate-limited or fails",
          "Comprehensive error handling"
        ],
        "license": "Proprietary",
        "name": "ip-fetch",
        "securityFeatures": {
          "authentication": "Not provided by cli-core (see online-auth)",
          "encryption": "Not provided by cli-core",
          "inputValidation": "Argument parsing via clap; per-command validation is the consumer's responsibility",
          "rateLimiting": "Not provided by cli-core"
        },
        "systemRequirements": {
          "dependencies": [
            "OpenSSL",
            "libcurl"
          ],
          "os": "Linux (Debian-based)",
          "privileges": "root/sudo for system operations"
        },
        "version": "10.0.3",
        "website": "https://www.digi77.com"
      },
      "errors": [],
      "metadata": {
        "executionTime": 2,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-10-29T23:50:29.109509635Z",
      "version": "10.0.3",
      "warnings": []
    },
    "flag_v": {
      "command": "version",
      "data": {
        "buildDate": "REDACTED-BUILD-TIME",
        "gitCommit": "unknown",
        "name": "ip-fetch",
        "rustVersion": "1.82.0",
        "version": "10.0.3"
      },
      "errors": [],
      "metadata": {
        "executionTime": 1,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-10-29T23:50:29.195255516Z",
      "version": "10.0.3",
      "warnings": []
    },
    "flag_h": {
      "command": "help",
      "data": {
        "commandCategories": [
          {
            "category": "Basic Operations",
            "commands": [
              {
                "description": "Simple plain text IP address retrieval",
                "examples": [
                  "ip-fetch plain-ip --ipv4",
                  "ip-fetch plain-ip --ipv6",
                  "ip-fetch plain-ip --ipv4 --server-index 5"
                ],
                "name": "plain-ip",
                "options": [
                  {
                    "description": "Return the IPv4 address (default)",
                    "flag": "-4, --ipv4"
                  },
                  {
                    "description": "Return the IPv6 address",
                    "flag": "-6, --ipv6"
                  },
                  {
                    "description": "Dual-stack is unsupported for this subcommand and is rejected at runtime. Use 'ip-fetch --both' instead",
                    "flag": "--both"
                  },
                  {
                    "description": "Use one specific plain-text server by its index instead of the default",
                    "flag": "--server-index <INDEX>"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch plain-ip [OPTIONS]"
              }
            ]
          },
          {
            "category": "Cache Management",
            "commands": [
              {
                "description": "Manage IP cache for improved performance",
                "examples": [
                  "ip-fetch cache status",
                  "ip-fetch cache list",
                  "ip-fetch cache clear 208.67.222.222",
                  "ip-fetch cache clear",
                  "ip-fetch cache set-ttl 24h"
                ],
                "name": "cache",
                "options": [
                  {
                    "description": "Show cache statistics and status (subcommand)",
                    "flag": "status"
                  },
                  {
                    "description": "List every cached IP address (subcommand)",
                    "flag": "list"
                  },
                  {
                    "description": "Clear the whole cache, or only the given IP (subcommand)",
                    "flag": "clear [IP]"
                  },
                  {
                    "description": "Set the default cache TTL, e.g. 24h, 7d, 1w (subcommand)",
                    "flag": "set-ttl <TTL>"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch cache [OPTIONS]"
              }
            ]
          },
          {
            "category": "Comprehensive Testing",
            "commands": [
              {
                "description": "Complete test suites for all functionality",
                "examples": [
                  "ip-fetch test-all",
                  "ip-fetch test-all --verbose",
                  "ip-fetch test-all --include-tor",
                  "ip-fetch test-all --include-tor --socks-port 10000 --json"
                ],
                "name": "test-all",
                "options": [
                  {
                    "description": "Also run the Tor SOCKS proxy tests",
                    "flag": "--include-tor"
                  },
                  {
                    "description": "Force the Tor SOCKS port used by --include-tor instead of auto-probing",
                    "flag": "--socks-port <PORT>"
                  },
                  {
                    "description": "Show per-source detail instead of the summary (cli-core global flag)",
                    "flag": "--verbose"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch test-all [OPTIONS]"
              }
            ]
          },
          {
            "category": "DNS Operations",
            "commands": [
              {
                "description": "DNS-based IP resolution and testing",
                "examples": [
                  "ip-fetch dns --ipv4",
                  "ip-fetch dns --ipv4 --query-index 0",
                  "ip-fetch dns --ipv6 --query-index all --json"
                ],
                "name": "dns",
                "options": [
                  {
                    "description": "Resolve over IPv4 DNS queries (default)",
                    "flag": "-4, --ipv4"
                  },
                  {
                    "description": "Resolve over IPv6 DNS queries",
                    "flag": "-6, --ipv6"
                  },
                  {
                    "description": "Dual-stack is unsupported for this subcommand and is rejected at runtime. Use 'ip-fetch --both' instead",
                    "flag": "--both"
                  },
                  {
                    "description": "Run one specific DNS query by index, or 'all' for every query",
                    "flag": "--query-index <INDEX>"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch dns [OPTIONS]"
              }
            ]
          },
          {
            "category": "Geolocation Services",
            "commands": [
              {
                "description": "Geolocation API testing with various IPs",
                "examples": [
                  "ip-fetch geo",
                  "ip-fetch geo --ip 208.67.222.222",
                  "ip-fetch geo --ip 1.1.1.1 --json"
                ],
                "name": "geo",
                "options": [
                  {
                    "description": "IP address to geolocate. Omit to use your current IP",
                    "flag": "--ip <IP>"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch geo [OPTIONS]"
              }
            ]
          },
          {
            "category": "IP Operations",
            "commands": [
              {
                "description": "Fetch IP geolocation information (default command)",
                "examples": [
                  "ip-fetch",
                  "ip-fetch fetch",
                  "ip-fetch 208.67.222.222 --json",
                  "ip-fetch --both",
                  "ip-fetch --no-cache",
                  "ip-fetch --cache-only 208.67.222.222",
                  "ip-fetch --nohistory",
                  "ip-fetch --bulk 1.1.1.1 9.9.9.9 208.67.222.222"
                ],
                "name": "fetch",
                "options": [
                  {
                    "description": "IP addresses to look up. Omit to look up your own public IP",
                    "flag": "<IP>..."
                  },
                  {
                    "description": "Request IPv4 only (default behavior)",
                    "flag": "-4, --ipv4"
                  },
                  {
                    "description": "Request IPv6 only",
                    "flag": "-6, --ipv6"
                  },
                  {
                    "description": "Request both IPv4 and IPv6 in one call",
                    "flag": "--both"
                  },
                  {
                    "description": "Force bulk mode. Requires online-auth authentication",
                    "flag": "--bulk"
                  },
                  {
                    "description": "Disable bulk mode, look each IP up individually",
                    "flag": "--nobulk"
                  },
                  {
                    "description": "Use a custom server URL for the lookup",
                    "flag": "--server <URL>"
                  },
                  {
                    "description": "Do not save this lookup to the IP history",
                    "flag": "--nohistory"
                  },
                  {
                    "description": "Bypass the cache and fetch fresh data",
                    "flag": "--no-cache"
                  },
                  {
                    "description": "Serve from cache only, fail if the IP is not cached",
                    "flag": "--cache-only"
                  },
                  {
                    "description": "Refresh the cache even if it is still valid",
                    "flag": "--refresh-cache"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch fetch [OPTIONS]"
              }
            ]
          },
          {
            "category": "Network Testing",
            "commands": [
              {
                "description": "Test IP lookup through Tor SOCKS proxy",
                "examples": [
                  "ip-fetch tor",
                  "ip-fetch tor --ipv4",
                  "ip-fetch tor --ipv4 all --torsafe",
                  "ip-fetch tor --ipv4 --socks-port 9150",
                  "ip-fetch tor --ipv6 all --json"
                ],
                "name": "tor",
                "options": [
                  {
                    "description": "Pass 'all' to query every source (positional). Default is one random source",
                    "flag": "<SCOPE>"
                  },
                  {
                    "description": "Request IPv4 only (default)",
                    "flag": "-4, --ipv4"
                  },
                  {
                    "description": "Request IPv6 only",
                    "flag": "-6, --ipv6"
                  },
                  {
                    "description": "Dual-stack is unsupported for this subcommand and is rejected at runtime. Use 'ip-fetch --both' instead",
                    "flag": "--both"
                  },
                  {
                    "description": "Force a SOCKS port. Without it, 9050, 9150 and the Kodachi pool 10000-10019 are auto-probed",
                    "flag": "--socks-port <PORT>"
                  },
                  {
                    "description": "Use only the 14 Tor-safe IPv4 URLs instead of all 19",
                    "flag": "--torsafe"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch tor [OPTIONS]"
              },
              {
                "description": "Check if connection is using Tor network",
                "examples": [
                  "ip-fetch check-tor",
                  "ip-fetch check-tor --status-only",
                  "ip-fetch check-tor --ip-only",
                  "ip-fetch check-tor --json"
                ],
                "name": "check-tor",
                "options": [
                  {
                    "description": "Print only the IP address (mutually exclusive with --status-only)",
                    "flag": "--ip-only"
                  },
                  {
                    "description": "Print only the Tor status, true or false (mutually exclusive with --ip-only)",
                    "flag": "--status-only"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch check-tor [OPTIONS]"
              }
            ]
          },
          {
            "category": "Testing Operations",
            "commands": [
              {
                "description": "Test fallback mechanisms and multiple source verification",
                "examples": [
                  "ip-fetch test-fallback --ipv4 json",
                  "ip-fetch test-fallback --ipv4 plain",
                  "ip-fetch test-fallback --ipv6 json --json"
                ],
                "name": "test-fallback",
                "options": [
                  {
                    "default": "plain",
                    "description": "Source format to exercise: 'json' or 'plain' (positional)",
                    "flag": "<FORMAT>"
                  },
                  {
                    "description": "Test IPv4 sources (default)",
                    "flag": "-4, --ipv4"
                  },
                  {
                    "description": "Test IPv6 sources",
                    "flag": "-6, --ipv6"
                  },
                  {
                    "description": "Dual-stack is unsupported for this subcommand and is rejected at runtime. Use 'ip-fetch --both' instead",
                    "flag": "--both"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch test-fallback [OPTIONS]"
              },
              {
                "description": "Verify multiple sources",
                "examples": [
                  "ip-fetch verify-multi --ipv4",
                  "ip-fetch verify-multi --ipv4 --verbose",
                  "ip-fetch verify-multi --ipv6 --json"
                ],
                "name": "verify-multi",
                "options": [
                  {
                    "description": "Verify across all IPv4 sources (default)",
                    "flag": "-4, --ipv4"
                  },
                  {
                    "description": "Verify across all IPv6 sources",
                    "flag": "-6, --ipv6"
                  },
                  {
                    "description": "Dual-stack is unsupported for this subcommand and is rejected at runtime. Use 'ip-fetch --both' instead",
                    "flag": "--both"
                  },
                  {
                    "description": "Show each source's raw response (cli-core global flag)",
                    "flag": "--verbose"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch verify-multi [OPTIONS]"
              },
              {
                "description": "Test random server selection functionality",
                "examples": [
                  "ip-fetch random --type plain --ipv4",
                  "ip-fetch random --type json --ipv4 --json",
                  "ip-fetch random --type dns --ipv6 --json"
                ],
                "name": "random",
                "options": [
                  {
                    "default": "plain",
                    "description": "Source type: plain, json or dns",
                    "flag": "--type <TYPE>"
                  },
                  {
                    "description": "Pick a random IPv4 source (default)",
                    "flag": "-4, --ipv4"
                  },
                  {
                    "description": "Pick a random IPv6 source",
                    "flag": "-6, --ipv6"
                  }
                ],
                "requires_sudo": false,
                "usage": "ip-fetch random [OPTIONS]"
              }
            ]
          }
        ],
        "description": "IP Geolocation data fetcher for Kodachi OS - Fetches and displays IP address information including geolocation, ISP, and network details",
        "environmentVariables": [
          {
            "default": "unset",
            "description": "Disable all colored output when set",
            "name": "NO_COLOR",
            "values": "1|true|yes (any value disables color)"
          }
        ],
        "exitCodes": {
          "0": "Success",
          "1": "General error",
          "2": "Invalid arguments",
          "3": "Permission denied",
          "4": "Network error",
          "5": "File not found"
        },
        "globalOptions": [
          {
            "description": "Print help information",
            "flag": "-h, --help"
          },
          {
            "description": "Print version information",
            "flag": "-v, --version"
          },
          {
            "description": "Display detailed information",
            "flag": "-n, --info"
          },
          {
            "description": "Show usage examples",
            "flag": "-e, --examples"
          },
          {
            "description": "Output in JSON format",
            "flag": "--json"
          },
          {
            "description": "Force output format (text|json)",
            "flag": "-o, --output-format <FORMAT>"
          },
          {
            "description": "Pretty-print JSON output with indentation",
            "flag": "--json-pretty"
          },
          {
            "description": "Enhanced JSON output with improved formatting (like jq)",
            "flag": "--json-human"
          },
          {
            "description": "Return only specified JSON fields (comma-separated)",
            "flag": "--json-filter <FIELD1,FIELD2>"
          },
          {
            "description": "Select specific fields to include in output (comma-separated)",
            "flag": "--fields <FIELD_LIST>"
          },
          {
            "description": "Limit number of results returned",
            "flag": "--limit <NUMBER>"
          },
          {
            "description": "Skip first N results (for pagination)",
            "flag": "--offset <NUMBER>"
          },
          {
            "description": "Working directory (defaults to auto-detected base directory)",
            "flag": "-d, --work-dir <PATH>"
          },
          {
            "description": "Set custom port number (1024-65535)",
            "flag": "--port <PORT>"
          },
          {
            "description": "Set log level (error|warn|info|debug)",
            "flag": "--log-level <LEVEL>"
          },
          {
            "description": "Enable verbose output",
            "flag": "--verbose"
          },
          {
            "description": "Suppress non-essential output",
            "flag": "--quiet"
          },
          {
            "description": "Disable colored output",
            "flag": "--no-color"
          },
          {
            "description": "Use custom configuration file",
            "flag": "--config <FILE>"
          },
          {
            "description": "Set operation timeout in seconds (optional; no default applied)",
            "flag": "--timeout <SECS>"
          }
        ],
        "name": "ip-fetch",
        "usage": "ip-fetch [OPTIONS] [COMMAND] [ARGS]"
      },
      "errors": [],
      "metadata": {
        "executionTime": 2,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-10-29T23:50:29.273823573Z",
      "version": "10.0.3",
      "warnings": []
    },
    "flag_e": {
      "command": "examples",
      "data": {
        "categories": [
          {
            "description": "Common usage patterns for ip-fetch",
            "examples": [
              {
                "command": "ip-fetch",
                "description": "Get your current public IP",
                "expectedOutput": "Current IP with geolocation data"
              },
              {
                "command": "ip-fetch fetch",
                "description": "Run the default fetch command explicitly",
                "expectedOutput": "Current IP with geolocation data",
                "notes": "Equivalent to the bare ip-fetch command"
              },
              {
                "command": "ip-fetch --examples",
                "description": "Show usage examples",
                "expectedOutput": "Display all usage patterns"
              }
            ],
            "id": "0_quick_start",
            "title": "Usage Examples"
          },
          {
            "description": "Common IP lookup operations",
            "examples": [
              {
                "command": "ip-fetch",
                "description": "Get your current public IP from Kodachi Cloud (primary) with automatic fallback",
                "expectedOutput": "Current IP with geolocation data"
              },
              {
                "command": "ip-fetch 208.67.222.222",
                "description": "Look up specific IP address",
                "expectedOutput": "Geolocation data for 208.67.222.222"
              },
              {
                "command": "ip-fetch 208.67.222.222 1.1.1.1",
                "description": "Look up multiple IP addresses",
                "expectedOutput": "Bulk lookup results",
                "notes": "Automatically uses bulk mode for better performance"
              },
              {
                "command": "ip-fetch --refresh-cache",
                "description": "Force refresh cache and get latest IP data",
                "expectedOutput": "Fresh IP data bypassing cache"
              }
            ],
            "id": "1_basic_usage",
            "title": "Basic Usage"
          },
          {
            "description": "Different ways to format output",
            "examples": [
              {
                "command": "ip-fetch --json",
                "description": "Get your current IP in JSON format from primary source with fallback",
                "expectedOutput": "JSON object with complete IP information"
              },
              {
                "command": "ip-fetch --json-pretty",
                "description": "Formatted JSON with indentation",
                "expectedOutput": "Pretty-printed JSON output"
              },
              {
                "command": "ip-fetch --json-human",
                "description": "Enhanced human-readable JSON output with colors (like jq)",
                "expectedOutput": "Colorized JSON output for better readability"
              }
            ],
            "id": "2_output_formats",
            "title": "Output Formats"
          },
          {
            "description": "Own IP lookup and single IP lookup operations",
            "examples": [
              {
                "command": "ip-fetch --ipv4",
                "description": "Explicitly request IPv4 from primary source with fallback",
                "expectedOutput": "Shows your IPv4 address with geolocation data"
              },
              {
                "command": "ip-fetch --ipv6",
                "description": "Get your current public IPv6 from Kodachi Cloud (primary) with automatic fallback",
                "expectedOutput": "Shows your IPv6 address with geolocation data"
              },
              {
                "command": "ip-fetch --ipv6 --json",
                "description": "Get your IPv6 in JSON format from primary source with fallback",
                "expectedOutput": "JSON object with IPv6 geolocation data"
              },
              {
                "command": "ip-fetch --both",
                "description": "Get both IPv4 and IPv6 information from primary sources with fallback",
                "expectedOutput": "Shows both IPv4 and IPv6 with full details"
              },
              {
                "command": "ip-fetch --both --json",
                "description": "Get both IPs in JSON format from primary sources with fallback",
                "expectedOutput": "JSON object with both IPv4 and IPv6 data"
              }
            ],
            "id": "3_basic_ip_lookups",
            "title": "Basic IP Lookups"
          },
          {
            "description": "Exercise the fallback chain (test-fallback walks sources until one answers) and cross-check every source against the others (verify-multi). Both work on one IP family at a time.",
            "examples": [
              {
                "command": "ip-fetch test-fallback --ipv4 json",
                "description": "Test IPv4 JSON sources with automatic fallback",
                "expectedOutput": "IPv4 JSON fallback test results"
              },
              {
                "command": "ip-fetch test-fallback --ipv6 json --json",
                "description": "Test IPv6 JSON sources with automatic fallback",
                "expectedOutput": "IPv6 JSON fallback test results in JSON format"
              },
              {
                "command": "ip-fetch test-fallback --ipv4 plain",
                "description": "Test IPv4 plain text sources with automatic fallback",
                "expectedOutput": "IPv4 plain text fallback results"
              },
              {
                "command": "ip-fetch test-fallback --ipv6 plain",
                "description": "Test IPv6 plain text sources with automatic fallback",
                "expectedOutput": "IPv6 plain text fallback results"
              },
              {
                "command": "ip-fetch verify-multi --ipv4",
                "description": "Test ALL IPv4 sources to verify consistency",
                "expectedOutput": "IPv4 multi-source verification report",
                "notes": "verify-multi is authentication gated. On an unauthenticated shell it fails with 'Authentication required'. Run 'online-auth authenticate' first."
              },
              {
                "command": "ip-fetch verify-multi --ipv4 --verbose",
                "description": "Verify all IPv4 sources and print each source's raw response",
                "expectedOutput": "Per-source responses followed by the consistency verdict"
              },
              {
                "command": "ip-fetch verify-multi --ipv6 --json",
                "description": "Test ALL IPv6 sources with JSON output",
                "expectedOutput": "JSON IPv6 multi-source verification"
              }
            ],
            "id": "4_fallback_and_multi_source_testing",
            "title": "Fallback and Multi-Source Testing"
          },
          {
            "description": "Check if your connection is using Tor",
            "examples": [
              {
                "command": "ip-fetch check-tor",
                "description": "Check if connection is using Tor and show IP",
                "expectedOutput": "Tor status and current IP address"
              },
              {
                "command": "ip-fetch check-tor --ip-only",
                "description": "Get just the IP address",
                "expectedOutput": "Your current IP address"
              },
              {
                "command": "ip-fetch check-tor --status-only",
                "description": "Get just the Tor status",
                "expectedOutput": "true or false"
              },
              {
                "command": "ip-fetch check-tor --json",
                "description": "Get Tor status and IP in JSON format",
                "expectedOutput": "JSON object with IsTor and IP fields"
              },
              {
                "command": "ip-fetch check-tor --json-pretty",
                "description": "Pretty-printed JSON output",
                "expectedOutput": "Formatted JSON with Tor status"
              },
              {
                "command": "ip-fetch check-tor --json-human",
                "description": "Colorized JSON output (like jq)",
                "expectedOutput": "Colored JSON with Tor status"
              }
            ],
            "id": "5_tor_detection",
            "title": "Tor Detection"
          },
          {
            "description": "Route the IP lookup through a Tor SOCKS5 proxy. Tor must already be running: without a reachable SOCKS port every source fails. Pass 'all' to query every source instead of one random source. This subcommand handles IPv4 or IPv6, not both at once.",
            "examples": [
              {
                "command": "ip-fetch tor --ipv4",
                "description": "Get IPv4 through Tor SOCKS5 proxy from ONE random source",
                "expectedOutput": "IP address via Tor proxy"
              },
              {
                "command": "ip-fetch tor --ipv4 all",
                "description": "Test ALL IPv4 sources through Tor SOCKS5 proxy",
                "expectedOutput": "Comprehensive Tor IPv4 test results"
              },
              {
                "command": "ip-fetch tor --ipv6 all --json",
                "description": "Test ALL IPv6 sources through Tor SOCKS5 proxy with JSON output",
                "expectedOutput": "JSON array with all Tor IPv6 results"
              },
              {
                "command": "ip-fetch tor --ipv4 --json",
                "description": "Get IPv4 JSON response through Tor SOCKS5 proxy",
                "expectedOutput": "JSON IPv4 data via Tor"
              },
              {
                "command": "ip-fetch tor",
                "description": "Default IPv4 source via Tor (auto-detects local SOCKS5: 9050, 9150, or Kodachi pool 10000-10019)",
                "expectedOutput": "IPv4 IP via Tor; output shows which SOCKS port was picked",
                "notes": "Pass --socks-port to disable auto-detect."
              },
              {
                "command": "ip-fetch tor --ipv4 --socks-port 9150",
                "description": "Force the Tor Browser bundle SOCKS port (9150), one random IPv4 source",
                "expectedOutput": "IPv4 via Tor Browser bundle"
              },
              {
                "command": "ip-fetch tor --ipv4 all --socks-port 10000",
                "description": "Force a Kodachi multi-instance pool port (10000) and query ALL IPv4 sources",
                "expectedOutput": "All IPv4 sources via Kodachi instance #0"
              },
              {
                "command": "ip-fetch tor --ipv4 all --torsafe",
                "description": "Query only the Tor-safe IPv4 sources",
                "expectedOutput": "Results from the 14 verified Tor-safe URLs instead of all 19",
                "notes": "Use this when some sources block or rate-limit Tor exit nodes and produce false failures."
              }
            ],
            "id": "6_tor_network_testing",
            "title": "Tor Network Testing"
          },
          {
            "description": "DNS-based IP resolution and testing",
            "examples": [
              {
                "command": "ip-fetch dns --ipv4",
                "description": "Test DNS-based IPv4 resolution using ONE random DNS query",
                "expectedOutput": "IPv4 address from DNS query"
              },
              {
                "command": "ip-fetch dns --ipv6",
                "description": "Test DNS-based IPv6 resolution using ONE random DNS query",
                "expectedOutput": "IPv6 address from DNS query"
              },
              {
                "command": "ip-fetch dns --ipv4 --query-index 0",
                "description": "Test specific DNS query by index",
                "expectedOutput": "IPv4 from specific DNS query"
              },
              {
                "command": "ip-fetch dns --ipv6 --query-index all --json",
                "description": "Test ALL available IPv6 DNS queries with JSON output",
                "expectedOutput": "JSON array with all IPv6 DNS results"
              }
            ],
            "id": "7_dns_resolution_testing",
            "title": "DNS Resolution Testing"
          },
          {
            "description": "Complete test suites for all functionality",
            "examples": [
              {
                "command": "ip-fetch test-all",
                "description": "Complete test suite results",
                "expectedOutput": "Full functionality test report"
              },
              {
                "command": "ip-fetch test-all --include-tor",
                "description": "Complete test suite including Tor tests",
                "expectedOutput": "Comprehensive test results with Tor"
              },
              {
                "command": "ip-fetch test-all --include-tor --socks-port 10000 --json",
                "description": "Complete test suite including Tor tests, forced to Kodachi pool port 10000 (skip auto-detect)",
                "expectedOutput": "JSON formatted test results with the specified Tor SOCKS port"
              },
              {
                "command": "ip-fetch test-all --json",
                "description": "JSON formatted complete test results",
                "expectedOutput": "Structured test suite results"
              }
            ],
            "id": "8_comprehensive_testing_suite",
            "title": "Comprehensive Testing Suite"
          },
          {
            "description": "Test random IP sources for reliability",
            "examples": [
              {
                "command": "ip-fetch random --type plain --ipv4",
                "description": "Test ONE random IPv4 plain text source",
                "expectedOutput": "Random IPv4 source test result"
              },
              {
                "command": "ip-fetch random --type json --ipv4 --json",
                "description": "Test ONE random IPv4 JSON source with JSON output",
                "expectedOutput": "Random IPv4 JSON source test result"
              },
              {
                "command": "ip-fetch random --type dns --ipv4",
                "description": "Test ONE random DNS IPv4 query",
                "expectedOutput": "Random DNS IPv4 query result"
              },
              {
                "command": "ip-fetch random --type dns --ipv6 --json",
                "description": "Test ONE random DNS IPv6 query with JSON output",
                "expectedOutput": "Random DNS IPv6 query result in JSON"
              }
            ],
            "id": "9_random_source_testing",
            "title": "Random Source Testing"
          },
          {
            "description": "Test geolocation APIs with various IPs",
            "examples": [
              {
                "command": "ip-fetch geo",
                "description": "Test geo APIs with current IP",
                "expectedOutput": "Geolocation test results for your IP"
              },
              {
                "command": "ip-fetch geo --ip 208.67.222.222",
                "description": "Test geo APIs with specific IP",
                "expectedOutput": "Geolocation test results for 208.67.222.222"
              },
              {
                "command": "ip-fetch geo --json-pretty",
                "description": "Compare every geo API side by side as indented JSON",
                "expectedOutput": "One indented JSON block per geolocation API that answered",
                "notes": "geo always prints each API's raw response, so there is no separate verbose mode."
              },
              {
                "command": "ip-fetch geo --ip 1.1.1.1 --json",
                "description": "Geo data for IP in JSON",
                "expectedOutput": "JSON geolocation data for 1.1.1.1"
              }
            ],
            "id": "10_geolocation_testing",
            "title": "Geolocation API Testing"
          },
          {
            "description": "Get IP addresses in plain text format",
            "examples": [
              {
                "command": "ip-fetch plain-ip --ipv4",
                "description": "Get IPv4 plain text",
                "expectedOutput": "Your IPv4 address as plain text"
              },
              {
                "command": "ip-fetch plain-ip --ipv6",
                "description": "Get IPv6 plain text",
                "expectedOutput": "Your IPv6 address as plain text"
              },
              {
                "command": "ip-fetch plain-ip --ipv4 --server-index 5",
                "description": "Use specific server by index",
                "expectedOutput": "IPv4 from server index 5"
              }
            ],
            "id": "11_plain_text_ip",
            "title": "Plain Text IP Retrieval"
          },
          {
            "description": "Look several IPs up in one round trip. Bulk mode turns on automatically for more than one IP. Every bulk lookup is authentication gated: run 'online-auth authenticate' first or the command fails with 'Authentication required'.",
            "examples": [
              {
                "command": "ip-fetch --bulk 1.1.1.1 9.9.9.9 208.67.222.222",
                "description": "Efficient bulk lookup of multiple IPs",
                "expectedOutput": "Bulk results for all IPs",
                "notes": "Requires an authenticated session. Run 'online-auth authenticate' first."
              },
              {
                "command": "ip-fetch --bulk 1.1.1.1 9.9.9.9 --json",
                "description": "Bulk lookup with JSON output",
                "expectedOutput": "JSON array with all IP data"
              },
              {
                "command": "ip-fetch --nobulk 1.1.1.1 9.9.9.9",
                "description": "Disable bulk mode for individual lookups",
                "expectedOutput": "Individual lookup results"
              },
              {
                "command": "ip-fetch --bulk --ipv4 1.1.1.1 9.9.9.9",
                "description": "Bulk IPv4-only lookups",
                "expectedOutput": "Bulk IPv4 results"
              },
              {
                "command": "ip-fetch --bulk --nohistory 1.1.1.1 9.9.9.9 208.67.222.222",
                "description": "Bulk lookup without saving to history",
                "expectedOutput": "Bulk results (not saved)"
              }
            ],
            "id": "12_bulk_operations",
            "title": "Bulk Operations"
          },
          {
            "description": "Inspect and manage the IP cache, and control the cache on a single lookup with --no-cache, --cache-only or --refresh-cache.",
            "examples": [
              {
                "command": "ip-fetch --no-cache",
                "description": "Bypass the cache and force a fresh lookup of your own IP",
                "expectedOutput": "Live IP data fetched from the network, cache untouched",
                "notes": "Mutually exclusive with --cache-only."
              },
              {
                "command": "ip-fetch --cache-only 208.67.222.222",
                "description": "Answer from the cache only, never touch the network",
                "expectedOutput": "Cached data for 208.67.222.222, or an error if it is not cached",
                "notes": "Useful offline. Fails rather than falling back to the network. Mutually exclusive with --no-cache."
              },
              {
                "command": "ip-fetch --refresh-cache",
                "description": "Fetch fresh data and overwrite the cached entry even if it is still valid",
                "expectedOutput": "Fresh IP data, cache entry rewritten"
              },
              {
                "command": "ip-fetch cache status",
                "description": "Show cache statistics and status",
                "expectedOutput": "Cache size, entry count and configured TTL"
              },
              {
                "command": "ip-fetch cache list",
                "description": "List all cached IP addresses",
                "expectedOutput": "Every IP address currently held in the cache"
              },
              {
                "command": "ip-fetch cache clear",
                "description": "Clear the entire cache",
                "expectedOutput": "Confirmation that all cached entries were removed",
                "notes": "Pass an IP to clear only that entry, e.g. 'ip-fetch cache clear 208.67.222.222'"
              },
              {
                "command": "ip-fetch cache clear 208.67.222.222",
                "description": "Clear a specific IP from the cache",
                "expectedOutput": "Confirmation that 208.67.222.222 was removed from the cache"
              },
              {
                "command": "ip-fetch cache set-ttl 24h",
                "description": "Set the default cache TTL",
                "expectedOutput": "Confirmation that the cache TTL was updated",
                "notes": "Accepts duration strings such as '24h', '7d' or '1w'"
              }
            ],
            "id": "13_cache_management",
            "title": "Cache Management"
          },
          {
            "description": "Use custom servers for IP lookup",
            "examples": [
              {
                "command": "ip-fetch --server https://api.ipify.org",
                "description": "Use custom server for IP lookup",
                "expectedOutput": "IP from custom server"
              },
              {
                "command": "ip-fetch --server https://api.ipify.org --json",
                "description": "Custom server with JSON output",
                "expectedOutput": "JSON from custom server"
              },
              {
                "command": "ip-fetch --server https://ipv4.icanhazip.com --ipv4",
                "description": "Custom IPv4 server",
                "expectedOutput": "IPv4 from custom server"
              },
              {
                "command": "ip-fetch --server https://ipv6.icanhazip.com --ipv6",
                "description": "Custom IPv6 server",
                "expectedOutput": "IPv6 from custom server"
              }
            ],
            "id": "14_server_options",
            "title": "Custom Server Options"
          },
          {
            "description": "The cli-core output flags below work on every ip-fetch command, not just the default lookup.",
            "examples": [
              {
                "command": "ip-fetch 208.67.222.222 --json-pretty",
                "description": "Indented JSON for one IP, readable in a terminal",
                "expectedOutput": "Multi-line, indented JSON object for 208.67.222.222"
              },
              {
                "command": "ip-fetch --json-human",
                "description": "Colorized, jq-style JSON for reading at a glance",
                "expectedOutput": "Syntax-highlighted JSON of your own IP data"
              },
              {
                "command": "ip-fetch --no-color",
                "description": "Strip ANSI colors, for redirecting into a file or a pipe",
                "expectedOutput": "Plain, uncolored text output"
              }
            ],
            "id": "15_output_options",
            "title": "Output Formatting Options"
          },
          {
            "description": "--nohistory belongs to the default lookup (the 'fetch' path) and only suppresses history there. It is NOT a global flag: writing it alongside a subcommand such as 'tor', 'dns' or 'geo' does not suppress anything, because those subcommands never read it. Every form below is a plain lookup, which is the only place the flag has an effect.",
            "examples": [
              {
                "command": "ip-fetch --nohistory",
                "description": "Look up your own IP without writing it to the history file",
                "expectedOutput": "Your current IP with geolocation data, nothing appended to history"
              },
              {
                "command": "ip-fetch --nohistory 208.67.222.222",
                "description": "Look up one specific IP without recording it",
                "expectedOutput": "Geolocation data for 208.67.222.222, nothing appended to history"
              },
              {
                "command": "ip-fetch --nohistory --ipv6 --json",
                "description": "Get your IPv6 as JSON without recording it",
                "expectedOutput": "JSON object with your IPv6 data, nothing appended to history"
              },
              {
                "command": "ip-fetch --bulk --nohistory 1.1.1.1 9.9.9.9 208.67.222.222",
                "description": "Bulk lookup of several IPs without recording any of them",
                "expectedOutput": "Bulk results for all three IPs, nothing appended to history",
                "notes": "Bulk mode is authentication gated. Run 'online-auth authenticate' first."
              }
            ],
            "id": "16_no_history",
            "title": "No History Operations"
          }
        ],
        "description": "Usage examples for ip-fetch",
        "name": "ip-fetch",
        "quickReference": [
          "ip-fetch",
          "ip-fetch 208.67.222.222 --json",
          "ip-fetch check-tor",
          "ip-fetch tor --ipv4",
          "ip-fetch cache status",
          "ip-fetch test-all",
          "ip-fetch --help",
          "ip-fetch --version",
          "ip-fetch --info --json",
          "ip-fetch --examples"
        ]
      },
      "errors": [],
      "metadata": {
        "executionTime": 1,
        "hostname": "REDACTED-BUILD-HOST",
        "user": "REDACTED-BUILD-USER"
      },
      "status": "success",
      "timestamp": "2026-10-29T23:50:29.434394073Z",
      "version": "10.0.3",
      "warnings": []
    }
  }
}
