Skip to main content

Private beta: Request private beta access

zenitya

CLI reference

Every zya command, option and example.

View as markdown

zya and zenitya are the same program. Every command prints its own help with --help; this page collects them.

Global options

OptionDescription
-h, --helpShow help for a command
-v, --verboseShow error details and stack traces
--versionPrint the CLI version

Environment

VariableDescription
ZENITYA_API_KEYMachine key; takes precedence over a saved login
ZENITYA_API_URLAPI origin (default: https://api.zenitya.com)
ZENITYA_CONFIG_FILEPath to zenitya.json
ZENITYA_HOMECredentials and the installed CLI (default: ~/.zenitya)
NO_COLORDisable color

Project

zya new

Create a project with an example tool

shell
zya new [directory]
ArgumentDescription
<directory>Where to create it (default: the current directory)
shell
# Create a project in ./my-tools
zya new my-tools

zya deploy

Upload the project's source and wait for the remote build to go live

shell
zya deploy [options]
OptionDescription
--jsonPrint the build result as JSON on stdout
--idempotency-key <key>Reuse the key a lost deploy printed, to resume it instead of building again
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# Deploy the project in this directory
zya deploy

# Get the build ID in a script
zya deploy --json | jq -r .buildId

Source is uploaded and built remotely; nothing is built on this machine. Hidden files such as .env are never uploaded; set project secrets instead.

zya exec

Run a tool on the active deployment, or from local source with --local

shell
zya exec <tool> [options]
ArgumentDescription
<tool>The tool's key, as zya tools list shows it
OptionDescription
-d, --data <json>JSON input for the tool (default: read from stdin)
-l, --localRun the source on this machine instead of the active deployment
--dotenv <path>With --local: load this env file instead of .env
--no-dotenvWith --local: do not load .env
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# Call echo on the active deployment
zya exec echo --data '{"message":"hi"}'

# Run echo from source on this machine
zya exec echo --local --data '{"message":"hi"}'

# Read the input from a file
zya exec echo < input.json

The tool's output is printed on stdout and its logs on stderr. Remote runs never read .env files and never fall back to running locally.

zya tools list

List the project's deployed tools that your credential can call

shell
zya tools list [options]
OptionDescription
--jsonPrint JSON on stdout instead of a table
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# Show the tools you can call in this project
zya tools list

# Only their keys
zya tools list --json | jq -r '.tools[].key'

zya builds list

List the project's builds, newest first

shell
zya builds list [options]
OptionDescription
--limit <count>How many builds to show, 1–100 (default: 10)
--jsonPrint JSON on stdout instead of a table
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# The five most recent builds
zya builds list --limit 5

zya builds view

Show a build's result and the steps it ran

shell
zya builds view <build-id> [options]
ArgumentDescription
<build-id>Build ID, as printed by deploy and builds list
OptionDescription
--jsonPrint JSON on stdout instead of a table
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# Steps, timings and the deployment a build produced
zya builds view <build-id>

zya builds logs

Print a build's output from dependency install, bundling and tool discovery

shell
zya builds logs <build-id> [options]
ArgumentDescription
<build-id>Build ID, as printed by deploy and builds list
OptionDescription
--phase <step>Only one step's output: install, bundle, describe
-f, --followKeep printing new output until the build finishes
--jsonPrint one JSON record per line on stdout
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# Everything the build printed
zya builds logs <build-id>

# Only dependency installation
zya builds logs <build-id> --phase install

# Keep printing while the build runs
zya builds logs <build-id> --follow

Configuration

zya secrets set

Create or replace a project secret

shell
zya secrets set <name> <value> [options]
zya secrets set <name> --stdin [options]
ArgumentDescription
<name>Secret name, e.g. API_TOKEN
<value>Secret text, kept exactly as given; omit it and use --stdin to keep it out of shell history
OptionDescription
--stdinRead the value from piped stdin
--jsonPrint metadata as JSON on stdout (never values)
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# Set a value
zya secrets set API_TOKEN "example-token"

# Read it from a file, out of shell history
zya secrets set PRIVATE_KEY --stdin < key.pem

Values are kept exactly as given, 1–16 KiB of UTF-8. Deployed tools read them as environment variables; exec --local does not.

zya secrets list

List the project's secret names and when each changed

shell
zya secrets list [options]
OptionDescription
--jsonPrint metadata as JSON on stdout (never values)
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# Names and when each changed; values are never shown
zya secrets list

zya secrets delete

Delete a project secret

shell
zya secrets delete <name> [options]
ArgumentDescription
<name>Secret name, e.g. API_TOKEN
OptionDescription
--jsonPrint metadata as JSON on stdout (never values)
--config-file <path>Use this zenitya.json (default: the nearest one from the current directory up)
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# Remove a secret
zya secrets delete API_TOKEN

Account

zya login

Sign in with your Zenitya account, or save a machine key for CI

shell
zya login [options]
OptionDescription
--no-browserPrint the sign-in link instead of opening a browser
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Save this machine key instead of signing in (or set ZENITYA_API_KEY)
shell
# Sign in in the browser and choose an organization
zya login

# Print the sign-in link to open yourself
zya login --no-browser

For CI, set ZENITYA_API_KEY to a machine key instead; it takes precedence over a saved login.

zya logout

Sign out: revoke this login's access and remove the saved credential

shell
zya logout [options]
OptionDescription
--localOnly remove the saved credential, without contacting the API (when offline)

zya whoami

Show the account and organization commands run as

shell
zya whoami [options]
OptionDescription
--jsonPrint JSON on stdout instead of a table
--api-url <url>Zenitya API origin (default: the saved login's, else https://api.zenitya.com)
--token <key>Machine key; prefer ZENITYA_API_KEY to keep it out of shell history
shell
# For scripts
zya whoami --json

Help

zya docs

Read the documentation for this version of the CLI

shell
zya docs [topic] [options]
ArgumentDescription
<topic>The page to print as markdown (default: list the pages)
OptionDescription
--jsonList the pages as JSON on stdout
shell
# List the pages
zya docs

# How an agent should use this CLI
zya docs agents

# From install to a deployed tool
zya docs quickstart

CLI

zya update

Update the CLI to the newest release

shell
zya update [options]
OptionDescription
--checkOnly report whether an update is available
--tag <tag>Install this cli-v<version> release instead of the newest
shell
# See whether a newer CLI is available
zya update --check

# Install it
zya update