https://github.com/erikh/ztui
A terminal UI for ZeroTier
https://github.com/erikh/ztui
terminal ui zerotier
Last synced: about 1 year ago
JSON representation
A terminal UI for ZeroTier
- Host: GitHub
- URL: https://github.com/erikh/ztui
- Owner: erikh
- License: agpl-3.0
- Created: 2022-05-22T06:36:14.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-18T17:13:18.000Z (about 3 years ago)
- Last Synced: 2025-04-30T17:04:53.171Z (about 1 year ago)
- Topics: terminal, ui, zerotier
- Language: Rust
- Homepage:
- Size: 399 KB
- Stars: 36
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ztui: your one-stop shop for ZeroTier terminal UI goodness
ztui aims to be a frontend for all interactions with ZeroTier in an attempt to
transform how people work with it. It provides the following features:
- Main Screen:
- Bookmarks for Networks (disconnecting does not make the network id disappear from the list, and you can rejoin easily)
- Interaction directly with Central members from the network list.
- Joining, Leaving Networks
- Per-Network bandwidth statistics
- Bind arbitrary commands to keys that use a template to launch (see more on this below)
- Review the network JSON formatted pretty
- Launch `$EDITOR` against a file of network rules (and save them back to central)
- Central / Member List:
- Rename members
- Auth, Unauth, and Delete members
Networks List View:

Members List / Network View:

## Installing
Get [Rust](https://www.rustup.rs) 1.60 or better if you need to. You'll need it.
```
cargo install ztui
```
You may also appreciate our [GitHub Releases](https://github.com/erikh/ztui/releases)!
## Configuring arbitrary commands
### Rules
- Command must not be mapped by existing commands
- Will be executed in a shell; quote accordingly
### Configuration Syntax
After you start `ztui` for the first time, `$HOME/.config.zerotier/settings.json` will be created for you with your last-saved network information. Now, what we want to do is create `$HOME/.config.zerotier/config.json` and add something like this:
```json
{
"network_commands": {
"1": "/bin/tcpdump -i %i"
},
"member_commands": {
"1": "/bin/iperf -c %a"
}
}
```
Network format strings available:
- `%i`: the interface of the ZeroTier network
- `%n`: the network ID of the ZeroTier network
- `%a`: the first addresses in the list of assigned IP addresses
In this case, it would allow me to press `1` over a network to `tcpdump` its interface; then I would control+C out of it to come back to `ztui`.
Member format strings available:
- `%n`: the network ID of the ZeroTier network
- `%i`: the identity of the member of this ZeroTier network
- `%a`: the first assigned IP address of this member
- `%N`: the name (not the fqdn!) of the ZeroTier network member as it appears in central
In the above example, it allows me to start an `iperf` client against the address of the selected member.
## Author
Erik Hollensbe