{"id":16207933,"url":"https://github.com/applejag/hns-tree","last_synced_at":"2025-10-28T23:31:41.688Z","repository":{"id":58139794,"uuid":"530169266","full_name":"applejag/hns-tree","owner":"applejag","description":"Hierarchical namespaces tree view TUI","archived":false,"fork":false,"pushed_at":"2024-04-19T12:26:04.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T21:39:09.988Z","etag":null,"topics":["cli","go","golang","hierarchical-namespaces","kubernetes","kubernetes-cli"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/applejag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSES/CC-BY-4.0.txt","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}},"created_at":"2022-08-29T10:26:41.000Z","updated_at":"2023-02-27T09:36:41.000Z","dependencies_parsed_at":"2024-03-14T00:29:10.308Z","dependency_job_id":"ad2b735f-42b8-4283-b389-370dcd869ce0","html_url":"https://github.com/applejag/hns-tree","commit_stats":null,"previous_names":["applejag/hns-tree","jillejr/hns-tree"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applejag%2Fhns-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applejag%2Fhns-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applejag%2Fhns-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/applejag%2Fhns-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/applejag","download_url":"https://codeload.github.com/applejag/hns-tree/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238741411,"owners_count":19522773,"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","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":["cli","go","golang","hierarchical-namespaces","kubernetes","kubernetes-cli"],"created_at":"2024-10-10T10:14:50.664Z","updated_at":"2025-10-28T23:31:41.389Z","avatar_url":"https://github.com/applejag.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: 2022 Kalle Fagerberg\n\nSPDX-License-Identifier: CC-BY-4.0\n--\u003e\n\n# hns-tree\n\n[![REUSE status](https://api.reuse.software/badge/github.com/jilleJr/hns-tree)](https://api.reuse.software/info/github.com/jilleJr/hns-tree)\n\nI found that the kubectl-hns command line was too slow when printing the\ntree of namespaces, so I just created a small utility script to render them\nquickly.\n\n## Install\n\nRequires Go 1.18 or higher\n\n```sh\ngo install github.com/jilleJr/hns-tree@latest\n```\n\n## Usage\n\n```console\n$ hns-tree --help\nUsage of hns-tree:\n  -h, --help                show this help text\n      --kubeconfig string   (optional) absolute path to the kubeconfig file (default \"/home/kallefagerberg/.kube/config\")\n  -o, --output output       output format: tree, json, or yaml (default tree)\n```\n\n```console\n$ time hns-tree\ndefault\nhnc-system\nkube-node-lease\nkube-public\nkube-system\ntest-root\n└── test-child1\n│   ├── test-child3\n│   ├── test-child4\n└── test-child2\n    └── test-child5\nhns-tree  0.03s user 0.01s system 57% cpu 0.066 total\n```\n\nVersus the time it takes for kubectl-hns:\n\n```console\n$ time kubectl-hns tree --all-namespaces\ndefault\nhnc-system\nkube-node-lease\nkube-public\nkube-system\ntest-root\n├── [s] test-child1\n│   ├── [s] test-child3\n│   └── [s] test-child4\n└── [s] test-child2\n    └── [s] test-child5\n\n[s] indicates subnamespaces\nkubectl-hns tree --all-namespaces  0.04s user 0.04s system 1% cpu 5.828 total\n```\n\n## License\n\nThis project is primarily licensed under the GNU General Public License v3.0 or\nlater (GPL-3.0-or-later).\n\nCopyright © Kalle Fagerberg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplejag%2Fhns-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapplejag%2Fhns-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapplejag%2Fhns-tree/lists"}