{"id":30452100,"url":"https://github.com/jaketrogers/subnetcalc","last_synced_at":"2026-01-03T02:18:45.947Z","repository":{"id":181717567,"uuid":"666593285","full_name":"JakeTRogers/subnetCalc","owner":"JakeTRogers","description":"subnet calculator","archived":false,"fork":false,"pushed_at":"2025-08-18T22:24:57.000Z","size":198,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-21T08:01:33.634Z","etag":null,"topics":["cobra-cli","golang","network","networking","utility"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JakeTRogers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-14T23:58:39.000Z","updated_at":"2025-08-17T18:34:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d1c6afb-a24f-4545-a02a-da144c7ee0f5","html_url":"https://github.com/JakeTRogers/subnetCalc","commit_stats":null,"previous_names":["jaketrogers/subnetcalc"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/JakeTRogers/subnetCalc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeTRogers%2FsubnetCalc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeTRogers%2FsubnetCalc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeTRogers%2FsubnetCalc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeTRogers%2FsubnetCalc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakeTRogers","download_url":"https://codeload.github.com/JakeTRogers/subnetCalc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeTRogers%2FsubnetCalc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271752208,"owners_count":24814761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cobra-cli","golang","network","networking","utility"],"created_at":"2025-08-23T14:39:12.072Z","updated_at":"2026-01-03T02:18:45.943Z","avatar_url":"https://github.com/JakeTRogers.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# subnetCalc\n\n## Description\n\nThis is a Go CLI utility (built with [Cobra](https://github.com/spf13/cobra)) to calculate network information from a CIDR.\n\nIt can also split a “supernet” into smaller subnets and render the result either as a styled table or JSON. There is also an optional interactive TUI for splitting/joining subnets.\n\nIPv4 is the primary target. IPv6 works for basic calculations/output, but deeper functionality (especially around very large splits) is intentionally limited.\n\n## Usage\n\n`subnetCalc \u003cip address\u003e/\u003csubnet mask\u003e`\n\n### Flags\n\n- `--subnet-size`, `-s` — split the input network into subnets of this prefix length\n- `--json`, `-j` — output JSON\n- `--interactive`, `-i` — launch the interactive TUI (mutually exclusive with `--json`)\n- `--verbose`, `-v` — increase verbosity (repeat for more)\n\n### Interactive TUI Key Bindings\n\nWhen using `--interactive` mode:\n\n- `↑/k` — move cursor up\n- `↓/j` — move cursor down\n- `←/h` — scroll split columns left\n- `→/l` — scroll split columns right\n- `pgup` — page up through rows\n- `pgdn` — page down through rows\n- `s` — split selected subnet\n- `x` — join selected subnet with sibling\n- `u` — undo last split/join operation\n- `r` — redo last undone operation\n- `e` — export tree as JSON\n- `c` — copy JSON to clipboard\n- `?` — toggle help display\n- `q` — quit\n\n## Examples\n\n### List /12 Subnets Contained in a /8 Network Using the Interactive TUI\n\n![svg](/assets/demo_interactive-mode.svg)\n\n### Get Network Information for a /19 Network\n\n`subnetCalc 10.12.34.56/19`\n\n```text\n               Network: 10.12.32.0/19\n    Host Address Range: 10.12.32.1 - 10.12.63.254\n     Broadcast Address: 10.12.63.255\n           Subnet Mask: 255.255.224.0\n         Maximum Hosts: 8,190\n```\n\n### List /27 Subnets Contained in a /25 Network\n\n`subnetCalc 192.168.10.0/25 --subnet-size 27`\n\n```text\n               Network: 192.168.10.0/25\n    Host Address Range: 192.168.10.1 - 192.168.10.126\n     Broadcast Address: 192.168.10.127\n           Subnet Mask: 255.255.255.128\n         Maximum Hosts: 126\n\n  192.168.10.0/25 contains 4 /27 subnets:\n╭──────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ #   Subnet              Subnet Mask     Assignable Range              Broadcast       Hosts      │\n│1   192.168.10.0/27     255.255.255.224 192.168.10.1 - 192.168.10.30  192.168.10.31   30          │\n│2   192.168.10.32/27    255.255.255.224 192.168.10.33 - 192.168.10.62 192.168.10.63   30          │\n│3   192.168.10.64/27    255.255.255.224 192.168.10.65 - 192.168.10.94 192.168.10.95   30          │\n│4   192.168.10.96/27    255.255.255.224 192.168.10.97 - 192.168.10.126192.168.10.127  30          │\n╰──────────────────────────────────────────────────────────────────────────────────────────────────╯\n```\n\n### List /20 Subnets Contained in a /19 Network in JSON Format\n\n`subnetCalc 10.12.34.56/19 --subnet-size 20 --json`\n\n```json\n{\n  \"cidr\": \"10.12.32.0/19\",\n  \"firstIP\": \"10.12.32.1\",\n  \"lastIP\": \"10.12.63.254\",\n  \"networkAddr\": \"10.12.32.0\",\n  \"broadcastAddr\": \"10.12.63.255\",\n  \"subnetMask\": \"255.255.224.0\",\n  \"maskBits\": 19,\n  \"maxHosts\": \"8,190\",\n  \"subnets\": [\n    {\n      \"cidr\": \"10.12.32.0/20\",\n      \"firstIP\": \"10.12.32.1\",\n      \"lastIP\": \"10.12.47.254\",\n      \"networkAddr\": \"10.12.32.0\",\n      \"broadcastAddr\": \"10.12.47.255\",\n      \"subnetMask\": \"255.255.240.0\",\n      \"maskBits\": 20,\n      \"maxHosts\": \"4,094\"\n    },\n    {\n      \"cidr\": \"10.12.48.0/20\",\n      \"firstIP\": \"10.12.48.1\",\n      \"lastIP\": \"10.12.63.254\",\n      \"networkAddr\": \"10.12.48.0\",\n      \"broadcastAddr\": \"10.12.63.255\",\n      \"subnetMask\": \"255.255.240.0\",\n      \"maskBits\": 20,\n      \"maxHosts\": \"4,094\"\n    }\n  ]\n}\n```\n\n## Notes / Limitations\n\n- `--subnet-size` will refuse to generate an extremely large number of subnets (currently capped at 1,000,000) to avoid accidental OOM/hangs.\n- IPv6 output is supported, but some concepts (like “broadcast”) are displayed as the last address in the range.\n\n## Feedback\n\nBug reports, feature requests, and pull requests are welcome but may not be responded to in an even remotely timely manner.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaketrogers%2Fsubnetcalc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaketrogers%2Fsubnetcalc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaketrogers%2Fsubnetcalc/lists"}