{
  "id": "asn",
  "name": "asn",
  "homepage": "https://github.com/nitefood/asn",
  "description": "ASN, BGP, IP reputation, geolocation, and network reconnaissance tool.",
  "executables": [
    "asn"
  ],
  "dotfiles": {
    "paths": [
      "~/.asnrc"
    ],
    "exclude": [],
    "secret": [
      "~/.asn/ipinfo_token",
      "~/.asn/iqs_token",
      "~/.asn/cloudflare_token"
    ]
  },
  "commands": {
    "format": 1,
    "label": "Look up a target",
    "description": "Look up an AS number, IP, prefix, hostname, URL or organization name. Server mode (-l) and multi-target stdin modes are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "help",
        "kind": "help",
        "url": "https://github.com/nitefood/asn/blob/master/asn",
        "revision": "master 2026-10-27",
        "evidence": "  $script_name [OPTIONS] [TARGET]\n  -t    (enable trace)\n  -n    (no trace|no additional INETNUM lookups)\n  -d    (detailed)\n  -a    (ASN Suggest)\n  -u    (Transit/Upstream lookup)\n  -c    (Country CIDR)\n  -s    (Shodan scan)\n  -o    (organization search)\n  -m    (monochrome output)\n  -j    (compact JSON output)\n  -J    (pretty-printed JSON output)\n"
      }
    ],
    "field": [
      {
        "id": "target",
        "label": "Target",
        "description": "AS number, IP, prefix, hostname, URL or organization name.",
        "type": "string",
        "position": 0,
        "sources": [
          "help"
        ]
      },
      {
        "id": "no_trace",
        "label": "Skip AS path trace",
        "type": "boolean",
        "option": [
          "-n"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "detailed",
        "label": "Detailed hop info",
        "type": "boolean",
        "option": [
          "-d"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "suggest",
        "label": "Search AS names",
        "type": "boolean",
        "option": [
          "-a"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "upstream",
        "label": "Find transit/upstream ASes",
        "type": "boolean",
        "option": [
          "-u"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "country",
        "label": "Country CIDR blocks",
        "type": "boolean",
        "option": [
          "-c"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "shodan",
        "label": "Shodan InternetDB scan",
        "type": "boolean",
        "option": [
          "-s"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "org",
        "label": "Treat as organization name",
        "type": "boolean",
        "option": [
          "-o"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "mono",
        "label": "Monochrome output",
        "type": "boolean",
        "option": [
          "-m"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "json",
        "label": "Compact JSON output",
        "type": "boolean",
        "option": [
          "-j"
        ],
        "sources": [
          "help"
        ]
      },
      {
        "id": "json_pretty",
        "label": "Pretty-printed JSON output",
        "type": "boolean",
        "option": [
          "-J"
        ],
        "sources": [
          "help"
        ]
      }
    ],
    "task": [
      {
        "id": "lookup",
        "label": "Look up with AS path trace",
        "fields": [
          "target",
          "detailed",
          "mono"
        ],
        "required": [
          "target"
        ]
      },
      {
        "id": "org-search",
        "label": "Search by organization",
        "set": {
          "org": [
            true
          ]
        },
        "lock": [
          "org"
        ],
        "fields": [
          "target",
          "org",
          "mono"
        ],
        "required": [
          "target"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "target",
          "detailed",
          "no_trace",
          "org"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "suggest",
          "upstream",
          "country",
          "shodan",
          "mono",
          "json",
          "json_pretty"
        ]
      }
    ]
  }
}
