netbird-manage is an unofficial command-line tool written in Go for interacting with the NetBird API. It allows you to quickly manage peers, groups, policies, and other network resources directly from your terminal. This tool is built based on the official NetBird REST API documentation.
You must have the Go toolchain (version 1.18 or later) installed on your system. Clone this repository and build the binary:
git clone https://github.com/TechHutTV/netbird-management-cli.git
cd netbird-management-cli
go build ./cmd/netbird-manageThis creates a netbird-manage binary in the current directory. Optionally, move it to a directory in your PATH:
sudo mv netbird-manage /usr/local/bin/Before you can use the tool, you must authenticate. Generate a Personal Access Token (PAT) or a Service User token from your NetBird dashboard. Then, run the connect command:
netbird-manage connect --token <token>If successful, you will see a "Connection successful" message. To check status or change api url:
netbird-manage connect Check current connection status
connect [flags] Connect and save your API token
--token <token> (Required) Your NetBird API token
--management-url <url> (Optional) Your self-hosted management URL
Run any command without flags to see available options:
netbird-manage peer # Shows peer command help
netbird-manage group # Shows group command help
netbird-manage --help # Shows all available commands| Section | Description |
|---|---|
| Getting Started | Installation, safety features, debug mode, batch operations |
| Peers | Manage network peers |
| Setup Keys | Device registration and onboarding keys |
| Users | User management and invitations |
| Tokens | Personal access token management |
| Groups | Peer group management |
| Networks | Networks, resources, and routers |
| Policies | Access control policies and firewall rules |
| Routes | Network routing configuration |
| DNS | DNS nameserver groups and settings |
| Posture Checks | Device compliance validation |
| Events | Audit logs and traffic monitoring |
| Geo-Locations | Geographic location data |
| Accounts | Account settings and configuration |
| Ingress Ports | Port forwarding (Cloud-only) |
| Export & Import | YAML/JSON configuration management |
| Migrate | Migration between NetBird accounts |
14/14 NetBird API resource types fully implemented (100%)
| Resource | Status |
|---|---|
| Peers | Full CRUD |
| Groups | Full CRUD |
| Networks | Full CRUD |
| Policies | Full CRUD |
| Setup Keys | Full CRUD |
| Users | Full CRUD |
| Tokens | Full CRUD |
| Routes | Full CRUD |
| DNS | Full CRUD |
| Posture Checks | Full CRUD |
| Events | Read |
| Geo-Locations | Read |
| Accounts | Full CRUD |
| Ingress Ports | Full CRUD (Cloud-only) |
- Shell Completion - Tab completion for bash/zsh/fish
For detailed implementation notes and architecture guidance, see CLAUDE.md.
MIT/Apache dual license - see LICENSE file.
