ZeroTier API CLI
A command-line interface for managing ZeroTier networks, built with Python.
Features
- List all members in your ZeroTier network
- View pending (unauthorized) members
- Authorize new members
- Remove members from the network
- JSON output support
- Rich terminal output with tables
Installation
Recommended: Using pipx
pipx install zerotier-api-cli
Alternative: Using pip
pip install zerotier-api-cli
Development: Using Poetry
# Clone the repository
git clone https://github.com/yourusername/zerotier-api-cli.git
cd zerotier-api-cli
# Install dependencies
poetry install
# Install the package
poetry build
pip install dist/*.whl
Configuration
The CLI requires two pieces of information to work:
- ZeroTier API Token
- Network ID
You can provide these in three ways:
1. Environment Variables
export ZEROTIER_TOKEN="your_api_token"
export ZEROTIER_NETWORK_ID="your_network_id"
2. Command Line Arguments
ztcli --token your_api_token --network-id your_network_id [command]
3. Configuration File
You can save your settings to a configuration file using the save-settings command:
ztcli --token your_api_token --network-id your_network_id save-settings
The configuration file will be saved to:
- Linux:
~/.config/zerotier-cli/config.yaml - macOS:
~/Library/Application Support/zerotier-cli/config.yaml - Windows:
%APPDATA%\zerotier-cli\config.yaml
Once saved, you won't need to provide the token and network ID in subsequent commands.
Usage
List Network Members
# List all members
ztcli list
# List only pending members
ztcli list --pending
# Output as JSON
ztcli list --json
Authorize a Member
ztcli approve MEMBER_ID
Remove a Member
ztcli remove MEMBER_ID
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/yourusername/zerotier-api-cli.git
cd zerotier-api-cli
# Install dependencies
poetry install
# Activate the virtual environment
poetry shell
Running Tests
poetry run pytest
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for zerotier-api-cli 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zerotier_api_cli-0.1.1.tar.gz | 4.6 kB | Without provenance | Details for zerotier_api_cli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zerotier_api_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for zerotier_api_cli-0.1.1-py3-none-any.whl |
Total release size: 11.0 kB
Release files / zerotier_api_cli-0.1.1.tar.gz
| Download URL | zerotier_api_cli-0.1.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13721153bde45aafafd198f7d3bc6ec6bbd5cb4f69883ec9d3e1a853b4523f5f
|
|
BLAKE2b-256 checksum How to use checksums |
60495c5c0679cdb6689a92d831d24bb9ba86dca2662ff66e8e28379c5ea17558
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.6 Darwin/24.4.0
|
Release files / zerotier_api_cli-0.1.1-py3-none-any.whl
| Download URL | zerotier_api_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84be90a300c46fc38ce1f25ad79baa5c174be62ec93ac901dcfd2d09ac003252
|
|
BLAKE2b-256 checksum How to use checksums |
5af7cdd8d9578938c79c74b24ac80fb37ff53c6c31c8115380fea0d4fdb78f9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.2 CPython/3.10.6 Darwin/24.4.0
|
Security for zerotier-api-cli 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.