{"id":26010181,"url":"https://github.com/pinoogni/netnscli","last_synced_at":"2025-03-05T22:39:45.618Z","repository":{"id":279995202,"uuid":"836259792","full_name":"pinoOgni/netnscli","owner":"pinoOgni","description":"NetNSCLI is a lightweight Go-based CLI tool, built with Cobra, designed to create and manage local network testbeds effortlessly from YAML configurations.","archived":false,"fork":false,"pushed_at":"2025-02-28T16:14:50.000Z","size":952,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T21:11:56.997Z","etag":null,"topics":["cli","linux","local","namespace","network"],"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/pinoOgni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-31T13:25:53.000Z","updated_at":"2025-02-28T16:14:56.000Z","dependencies_parsed_at":"2025-02-28T21:12:07.168Z","dependency_job_id":"627f7bc6-0aa2-43d3-a682-f85fbd7946fd","html_url":"https://github.com/pinoOgni/netnscli","commit_stats":null,"previous_names":["pinoogni/netnscli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinoOgni%2Fnetnscli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinoOgni%2Fnetnscli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinoOgni%2Fnetnscli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pinoOgni%2Fnetnscli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pinoOgni","download_url":"https://codeload.github.com/pinoOgni/netnscli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242117656,"owners_count":20074433,"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","linux","local","namespace","network"],"created_at":"2025-03-05T22:39:44.417Z","updated_at":"2025-03-05T22:39:45.600Z","avatar_url":"https://github.com/pinoOgni.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# netnscli\n\nNetNSCLI is a lightweight Go-based CLI tool, built with Cobra, designed to create and manage local network testbeds effortlessly from YAML configurations.\n\n**It is still a work in progress, and contributions are welcome!**\n\n## Installation\n\nTo build the `netnscli` tool, use the following command:\n\n```bash\nmake build\n```\n\nThis will create the binary, which can be found in the `./bin` directory.\n\n## Usage\n\nOnce built, you can use `netnscli` to create and manage your local network testbeds.\n\n```bash\nnetncli\n\n  _  _ ___ _____ _  _ ___  ___ _    ___ \n | \\| | __|_   _| \\| / __|/ __| |  |_ _|\n | .  | _|  | | |  ' \\__ \\ (__| |__ | | \n |_|\\_|___| |_| |_|\\_|___/\\___|____|___|\n                                        \nnetnscli creates and manages local network testbed\n\nUsage:\n  netnscli [flags]\n  netnscli [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  create      Create a local network testbed\n  delete      Delete a local network testbed\n  help        Help about any command\n  script      Script creates a script from a yaml configuration file for a local network testbed\n\nFlags:\n  -h, --help   help for netnscli\n\nUse \"netnscli [command] --help\" for more information about a command.\n```\n\n### Example Commands\n\n#### Create a Testbed\n\nTo create a network testbed from a YAML file:\n\n```bash\nsudo ./bin/netnscli create -f samples/yamls/test_ipv4_simple.yaml\n```\n\nTo verify that the network namespace was created, use:\n\n```bash\nip netns\n```\n\nOr to check the interface links in a specific namespace:\n\n```bash\nsudo ip netns exec ns1 ip link\n```\n\n#### Delete the Testbed\n\nTo delete the testbed, run:\n\n```bash\nsudo ./bin/netnscli delete -f samples/yamls/test_ipv4_simple.yaml\n```\n\n#### Generate a Script from YAML\n\nIf you can’t run `netnscli` on a node but have a well-structured YAML configuration file, you can use the `script` command to generate an equivalent shell script for setting up the testbed:\n\n```bash\n./bin/netnscli script -f samples/yamls/test_ipv4_simple.yaml\n```\n\nThe generated script can be used locally to set up the testbed manually.\n\n## Notes\n\nThis project started as an experiment to explore Go and the `netlink` and `netns` libraries, with the goal of creating a simpler, more structured way to create local testbeds for networking experiments. \n\nPlanned features include adding macvlan support and more commands. If you're interested, check out the TODOs in the code.\n\n## Logo\n\n\n\u003cimg src=\"logo.png\" width=\"200\" /\u003e\n\nThis logo was created using ChatGPT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinoogni%2Fnetnscli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpinoogni%2Fnetnscli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpinoogni%2Fnetnscli/lists"}