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
- Homebrew (macOS, Linux)
- Install script (macOS, Linux)
- Windows (PowerShell)
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:CI environment variable is set. To turn it off, set:
Uninstall
%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
--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:
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 isclosient <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.