Introduction
ZCLI (ZEDEDA CLI) is a Docker-based command-line interface for interacting with Edge Infrastructure Services. It provides the same management capabilities as the console GUI and supports scripting and automation for routine operations. ZCLI is one of three user agents available for Edge Infrastructure Services. The others are the console GUI and the ZEDEDA API.Prerequisites
- Docker Desktop installed and running.
- A ZEDEDA user account.
Start ZCLI
ZCLI runs as a Docker container. The first time you start it, Docker pulls the required images from the ZEDEDA registry. This might take a few moments.Authenticate
Authenticate with your ZEDEDA credentials
- Run the configure command to start the authentication prompt.
-
Specify the server address. The default is
zedcontrol.zededa.net. -
Answer
nwhen prompted with Login with token?(y/n) [n]:. - Enter your Username and Password.
-
Specify the Output format for command responses, either
textorjson. The default istext. - Log in.
Authenticate with a session token
- Log in to the ZEDEDA console.
- Select the Profile avatar in the header and select Profile Settings.
- In the Session Information section, copy your session token.
- Run the configure command.
- Specify the server address.
-
Answer
ywhen prompted with Login with token?(y/n) [n]:. - Paste the session token and press Enter.
-
Specify the Output format for command responses, either
textorjson. The default istext. - Log in.
zcli configure again, ZCLI shows each current value in brackets. Press Enter to keep a value.
Configure without prompts
To configure ZCLI in a script, pass the values as options. ZCLI prompts only for values that you do not provide.Authenticate with environment variables
If ZCLI has not been configured, it can log in with credentials from environment variables instead. Set all three of the following variables when you start the container:ZSERVER: the server address.ZEDUSER: your username.ZEDPASSWORD: your password.
zcli configure or zcli login. ZCLI uses the environment variables only when no configuration exists. After you run zcli configure, ZCLI uses the saved configuration and ignores the variables.
Log Out
To end your session, run:zcli login to start a new session.
Work With Local Files
Some commands read files from your computer, such as hardware model manifests, adapter network configurations, and PCR template files. ZCLI runs inside a container, so you must make those files available inside the container first. The container’s working directory is/home/zcli.
Mount a local directory
Start ZCLI with the-v option to mount a local directory into the container. The following example mounts the current directory at /home/zcli/files:
files/manifest.json. Files that ZCLI writes to the mounted directory, such as exported manifests, also appear on your computer.
Copy a file into a running container
If ZCLI is already running, copy the file from another terminal on your computer.- Find the container ID.
- Copy the file into the container.
Available Commands
To see all available commands, runzcli without arguments. For a description of every command group and a link to its procedures, see Command Index.
Command Help
To see options and required parameters for a specific command, add--help to the command. For example, to see the options for the datastore command:
- Items within angle brackets are your own specific variables, such as
<name>. - Items within square brackets are optional, such as
[--title=<title>]. - Items that contain a pipe are choices, such as between true or false in
[--clear-text=<true|false>].
--dstype option:
Man Pages
To view the manual page for a specific command, prefix the command name withzcli-. For example, to view the manual page for edge-node:
Next Steps
Overview
All ZCLI command procedures, organized by resource type.
ZEDEDA API Overview
Introduction to available ZEDEDA API services and versioning.
Edge Infrastructure Services Overview
Introduction to Edge Infrastructure Services capabilities and service areas.
Onboard Nodes
Enroll edge nodes in Edge Infrastructure Services.