Skip to main content
closient is the command-line client for the Closient API. It logs in through your browser, resolves GTINs through the GS1 Digital Link resolver, and exports printable label sheets. It works the same for a person at a terminal and for an agent or CI job: when its output is not a terminal it prints JSON and never prompts.

Install

Every release is published at github.com/closient/cli/releases: one archive per platform (macOS on Apple silicon and Intel, Linux on x86_64 and arm64, Windows on x86_64) and a SHA256SUMS file. Both install scripts check the download against SHA256SUMS and stop with nothing installed if it does not match. The Linux binaries are statically linked, so they run on any distribution. The install scripts read three optional environment variables:

Update

How you update depends on how you installed:
closient update downloads the latest release for your platform, checks it against SHA256SUMS, and replaces the installed binary in one step, so an interrupted update leaves the old version working. On a copy that Homebrew installed it changes nothing and tells you to run brew upgrade closient instead, so Homebrew stays in charge of its own files.

The update notice

At most once a day, a command run at a terminal prints a line to stderr when a newer release exists:
The check runs in the background and never slows down or fails the command you ran; if it cannot reach the releases page, you see nothing. It is never shown in JSON output, when stderr is not a terminal (a pipe, a script, an agent), or when the CI environment variable is set. To turn it off, set:

Uninstall

On Windows, delete %LOCALAPPDATA%\Programs\closient and remove it from your user PATH. Your login and settings live in the configuration directory (~/.config/closient, or %APPDATA%\closient on Windows); run closient auth logout first to revoke the login on the server.

Log in

The CLI shows a one-time code and opens the approval page in your browser, using the OAuth 2.0 device authorization grant. Check that the code matches, allow access, and the CLI stores the login in your system keychain. Use --no-browser to print the link instead of opening it, for example over SSH. For CI and agents, create an organization API key in the dashboard and set it in the environment; it takes precedence over any stored login:
See Authentication for how API keys and OAuth logins differ.

Commands

Every public API operation has a command. The ones below are written by hand and linked to their request and response reference; every other operation is a generated command. Global flags: --base-url (default https://www.closient.com), --format json|table, and --timeout SECS. Run closient <command> --help for every option.

Generated commands

Every other operation in the API reference is closient <resource> <verb>. The resource is the operation’s group in kebab-case (products, api-keys, epcis), and the verb is list, view, create, edit, delete, or the operation’s own action (products upload-image). closient --help lists the resources, closient products --help their verbs, and closient products upload-image --help the flags.

Output and errors

Results go to stdout and errors to stderr. At a terminal the output is a table; otherwise, or with --format json, it is JSON with a fixed key order. An error in JSON mode is one object with a stable code, a message, and the exit_code the process exits with, so a script can branch on either: When the API sends an error code, the CLI passes it through as code; those are listed in Errors.