Skip to main content

No project description provided

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zerotier_api_cli-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zerotier_api_cli-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file zerotier_api_cli-0.1.0.tar.gz.

File metadata

  • Download URL: zerotier_api_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.6 Darwin/24.4.0

File hashes

Hashes for zerotier_api_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 04cad1bb343f19e78440614f962219fcbe4a5e47d0998a6832afbcfdecfa6a05
MD5 c59f4c7c6529b059cf56a0a78da0db6d
BLAKE2b-256 56ac7c3da45340cd2fb8369a1ffa94737621e40f846fd1a10ac267e7a241714a

See more details on using hashes here.

File details

Details for the file zerotier_api_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zerotier_api_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.10.6 Darwin/24.4.0

File hashes

Hashes for zerotier_api_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef1eedb7dd92c404cd6df96bebac84b03e4cb1e42f9915d4e49bc00df4e71b0f
MD5 424c6669528874831934f79d4394dc41
BLAKE2b-256 4bc33703f41ecfbaa1d2256ab227675bed9a59e7909a774c1317d0d3249d0084

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page