Skip to main content

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:

  1. ZeroTier API Token
  2. 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.

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)

Source distribution for zerotier-api-cli 0.1.1
File Size Uploaded
zerotier_api_cli-0.1.1.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zerotier-api-cli 0.1.1
File Interpreter ABI Platform
zerotier_api_cli-0.1.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page