zplCloud CLI

One binary for macOS, Linux, Raspberry Pi and Windows - apply printer profiles, send raw ZPL, set up Weblink certificates and start a remote agent.

What is the zplCloud CLI?

The zplcloud CLI is a small, self-contained command-line tool (a single binary) that connects to api.zplcloud.com with an API key. With it you can provision Zebra printers directly from the terminal - without the web UI:

  • Apply printer profiles - the printer profiles saved in zplCloud are transferred to a printer (TCP 9100 or USB).
  • Send raw ZPL - send a label straight to the printer from the command line.
  • Set up Weblink - store the Weblink certificates on the printer.
  • Remote proxy agent - an outbound SignalR connection to zplCloud; print jobs from the "Remote Printers" tab are forwarded to the printers in the local LAN over TCP 9100. No inbound ports, no firewall changes.
  • USB printers - send ZPL via virtual COM ports (e.g. COM3, /dev/ttyACM0, /dev/cu.usbmodem1101).

Installation

The installer detects the operating system and architecture automatically and downloads the matching binary from https://zplcloud.com/downloads/.

macOS / Linux / Raspberry Pi (one line)

curl -fsSL https://zplcloud.com/install-cli.sh | sh
# or:  wget -qO- https://zplcloud.com/install-cli.sh | sh
zplcloud --version

Supported platforms: osx-x64, osx-arm64 (Apple Silicon), linux-x64, linux-arm64 (64-bit Pi OS), linux-arm (32-bit Raspberry Pi).

Windows (PowerShell, no admin)

irm https://zplcloud.com/install-cli-pshell | iex
zplcloud --version

Installs to %LOCALAPPDATA%\zplcloud\zplcloud.exe and adds the directory to the user PATH (new terminals). Supports win-x64 and win-arm64.

Alternatively: Docker (agent as a container)

See CLI as a Docker container - for Raspberry Pi, Synology and any Docker host, without managing the CLI file path.

Prerequisites

An API key from the zplCloud API tab. Pass it via an environment variable or --api-key:

# Environment variable (recommended):
export ZPLCLOUD_API_KEY=sk_zplcloud_xxxx
# Windows PowerShell:
$env:ZPLCLOUD_API_KEY='sk_zplcloud_xxxx'
# or per command:
zplcloud profiles list --api-key sk_zplcloud_xxxx

Commands (reference)

zplcloud profiles list

Lists all printer profiles of your account (ID, name, printer target configuration).

zplcloud profiles list

zplcloud profiles apply

Applies a saved profile to a specific printer - all commands of the profile are executed in sequence (with a live response per command).

zplcloud profiles apply 42 --target 10.0.0.5
zplcloud profiles apply "Factory Reset" --target printer01.local --vars-file vars.json
ParameterMeaning
<id-or-name>Profile ID (number) or profile name (in quotes).
--target <ip|hostname>TCP target of the printer (IP or hostname), default port 9100.
--port <n>TCP port (default: 9100).
--usbSend over a USB virtual COM port instead of TCP.
--serial-port <name>Explicit serial port (COM3, /dev/cu.usbmodem1101, …); empty = auto-detection of the Zebra printer.
--var name=valueSet a command variable (repeatable).
--vars-file file.jsonJSON object with variable values.
--non-interactiveFail instead of prompting interactively for missing variables.
--timeout <ms>Connection/read timeout (default: 5000).

zplcloud cookbook list

Lists the available ZPL cookbook recipes (articles/snippets).

zplcloud cookbook list

zplcloud send

Sends raw ZPL to a printer - directly from the command line or from a file.

zplcloud send --target 10.0.0.5 --zpl "^XA^FO50,50^ADN,36,20^FDHello^FS^XZ"
zplcloud send --target 10.0.0.5 --file label.zpl
ParameterMeaning
--target <ip|hostname>TCP target (required).
--port <n>TCP port (default: 9100).
--zpl "<zpl>"ZPL code directly (either --zpl or --file).
--file <path>Send a ZPL file (either --zpl or --file).
--usb / --serial-portOptional: send over USB instead of TCP (see profiles apply).

zplcloud weblink setup

Sets up the Weblink connection on a printer (sets weblink.ip.conn2.location to the Weblink endpoint).

zplcloud weblink setup --printer printer01 --endpoint https://weblink.zplcloud.com --target 10.0.0.5
ParameterMeaning
--printer <hostname>Printer name (NRD storage/scope).
--endpoint <url>Weblink URL (e.g. https://weblink.zplcloud.com).
--target / --portTCP target + port (default 9100) to the printer.

zplcloud proxy

Starts the remote agent (TeamViewer style): outbound SignalR connection to api.zplcloud.com. Print jobs from the "Remote Printers" tab are forwarded to Zebra printers in the local LAN over TCP 9100.

zplcloud proxy --agent "Warehouse Berlin"
zplcloud proxy --agent "PI" --verbose --log --log-dir ./logs
ParameterMeaning
--agent <name>Display name in the "Remote Printers" tab (required).
--timeout <ms>Connect/read timeout (default: 5000).
--verbose | --debugSignalR negotiation/transport/handshake trace (with timestamps) for connection diagnosis.
--logWrites the complete console output to zplcloud-<yyyy-MM-dd>.log.
--log-dir <dir>Log directory (default: current directory).
--service-installInstall the proxy as a system service (systemd / launchd / Windows scheduled task) - survives reboots, reconnects automatically. Needs --agent + API key.
--service-uninstallRemove an installed service (no API key needed).

zplcloud proxy --service-install (system service)

So the remote agent survives reboots and reconnects to api.zplcloud.com automatically after every start, it can be installed as a system service with a single parameter. API key, agent name, API base and timeout are written into the service:

zplcloud proxy --agent "Warehouse Berlin" --service-install --api-key sk_zplcloud_xxxx

Depending on the operating system, the matching mechanism is used automatically:

SystemMechanismStart
Linux / Raspberry Pisystemd unit zplcloud-agent.service (Restart=always, RestartSec=5)at boot (needs sudo, detected automatically)
macOSlaunchd LaunchAgent ~/Library/LaunchAgents/com.zplcloud.agent.plist (KeepAlive=true)at login, no admin needed
Windowsscheduled task zplcloud-agent (schtasks ONLOGON, /RL LIMITED)at login, no admin needed

Check status / uninstall:

# Status
Linux/Pi : systemctl status zplcloud-agent       |  journalctl -u zplcloud-agent -f
macOS    : launchctl list | grep zplcloud
Windows  : schtasks /Query /TN zplcloud-agent

# Uninstall (without API key)
zplcloud proxy --service-uninstall

Optional parameters: --timeout <ms>, --log-dir <dir> (default: Linux /var/log/zplcloud, macOS /tmp, Windows %LOCALAPPDATA%\zplcloud\logs). Logs (Linux): journalctl -u zplcloud-agent -f or the file in --log-dir.

Docker: In the container approach this is already done - restart: unless-stopped in docker-compose.agent.yml restarts the agent automatically (see CLI as a Docker container).

zplcloud usb list

Lists serial/USB ports and Zebra USB printers (libusb) - useful for --serial-port.

zplcloud usb list

zplcloud version / help

zplcloud version or --version shows the version; zplcloud help or --help shows the full help.

Global options

OptionMeaning
--api-key <key>API key from the zplCloud API tab.
--api-base <url>Backend base URL (default: https://api.zplcloud.com).
--log / --log-dirLogging (see proxy).

Environment variables

VariableMeaning
ZPLCLOUD_API_KEYAPI key (alternative to --api-key).
ZPLCLOUD_API_BASEBase URL (alternative to --api-base).
ZPLCLOUD_AGENTAgent name (same as --agent, useful in a Docker container).
ZPLCLOUD_TIMEOUTConnect/read timeout in ms.

Complete --help output

zplcloud v1.2.15
zplCloud.com CLI - provision Zebra printers from zplCloud.com printer profiles.

USAGE:
  zplcloud profiles list
  zplcloud profiles apply <id-or-name> --target <ip|hostname> [--port 9100] [--var name=value ...] [--vars-file file.json]
  zplcloud cookbook list
  zplcloud send --target <ip|hostname> [--port 9100] (--zpl "<zpl>" | --file <path>)
  zplcloud weblink setup --printer <hostname> --endpoint <url> --target <ip|hostname> [--port 9100]
  zplcloud proxy --agent <name> [--timeout <ms>] [--verbose|--debug] [--log [--log-dir <dir>]]
  zplcloud usb list
  zplcloud version
  zplcloud help

TRANSPORT (apply/send/weblink):
  --target <ip|hostname>   TCP target (default port 9100)
  --port <n>               TCP port (default: 9100)
  --usb                    Use a USB virtual COM port instead of TCP
  --serial-port <name>     Explicit serial port (COM3, /dev/cu.usbmodem1101, ...)
  --bluetooth              (not supported yet - reserved for future RFCOMM transport)
  --timeout <ms>           Connect/read timeout (default: 5000)

PROXY (indirect realtime sending, no inbound firewall ports):
  zplcloud proxy --agent "Warehouse Berlin" [--verbose|--debug]
  Connects OUTBOUND to api.zplcloud.com and forwards print commands from the
  'Remote Printers' tab to Zebra printers in the local LAN over TCP 9100.
  --verbose/--debug prints SignalR negotiation/transport/handshake trace
  (with timestamps) to diagnose connection problems.

VARIABLES (profiles apply):
  --var name=value         Set a command variable (repeatable)
  --vars-file file.json    JSON object with variable values
  --non-interactive        Fail instead of prompting for missing required variables

API:
  --api-key <key>          API key from the zplCloud API tab
  --api-base <url>         api.zplcloud.com base URL (default: https://api.zplcloud.com)
  Environment: ZPLCLOUD_API_KEY, ZPLCLOUD_API_BASE

LOGGING:
  --log                    Write all console output to zplcloud-<yyyy-MM-dd>.log
  --log-dir <dir>          Log directory (default: current directory)

VERSION:
  --version                Print the version and exit
  zplcloud version

Examples

# View profiles
zplcloud profiles list

# Apply profile 42 to printer 10.0.0.5
zplcloud profiles apply 42 --target 10.0.0.5

# Set variables
zplcloud profiles apply "GTIN-Label" --target 10.0.0.5 --var gtin=4006381333930 --var charge=LOT-42
zplcloud profiles apply 42 --target 10.0.0.5 --vars-file vars.json

# Send ZPL directly
zplcloud send --target 10.0.0.5 --zpl "^XA^FO50,50^A0N,50^FDHello^FS^XZ"

# Start the remote agent
zplcloud proxy --agent "Warehouse Berlin"

# Address a USB printer
zplcloud usb list
zplcloud profiles apply 42 --usb --serial-port /dev/ttyACM0