Install the CLI
Weik.io 2026.2The weikio CLI is one native binary for Linux and Windows on x64, and every command it has is a call on the platform's API. Product page · Video
Watch: Connecting the Weik.io CLI, 2:54
The video installs the weikio CLI, signs in to an installation and lists its environments and agents.
On this page
The weikio CLI is how developers, pipelines and operators work with an installation. Every command is an HTTP call on the platform’s API, and the CLI does everything the admin UI does. weikio apply publishes a version, weikio deploy runs a version in an environment, and weikio run does both.
Install it#
The install scripts download the newest release, check the file against the release’s SHA256SUMS and run it once before they put it in place.
On Linux (x64):
$ curl -fsSL https://weik.io/install.sh | shThe line needs curl and ca-certificates, which minimal images such as debian:12 don’t have, so install them there first with apt-get install -y curl ca-certificates.
The script installs the CLI as ~/.local/bin/weikio. It asks nothing and leaves your shell profiles alone, prints the PATH line to add when ~/.local/bin isn’t on your PATH, and warns when another weikio comes first there.
On Windows (x64), in Windows PowerShell 5.1 or PowerShell 7:
irm https://weik.io/install.ps1 | iexThe script installs %LOCALAPPDATA%\Programs\weikio\weikio.exe without administrator rights and adds its folder to your user PATH once. The Windows CLI is signed by Adafy Oy.
To install one release, such as the one a pipeline is pinned to, set WEIKIO_CLI_VERSION:
$ curl -fsSL https://weik.io/install.sh | WEIKIO_CLI_VERSION=2026.2.1 shThe CLI files of every release, with their checksums, are on the download page.
Check the version#
$ weikio versionweikio 2026.2.1 (linux/x64)
server: https://hub.example 2026.2.1The second line is the installation’s release. Before you sign in, it says server: not logged in.
Sign in#
$ weikio login https://hub.example --project sandbox --env devtestOn a machine with a browser, the CLI opens the installation’s approval page. It shows the machine’s name, the address the request came from, the key’s rights and its expiry, and the Approve button sends the new key to the CLI. A key in WEIKIO_API_KEY or piped in is used as it is. Without a browser, the CLI asks for an API key with hidden input:
API key: ********
Context 'hub.example' saved and made current (server https://hub.example, project sandbox, environment devtest).
The key goes to your system’s keyring, or on Windows to the Credential Manager. Where there is no keyring, it goes into a file only you can read, next to the CLI’s configuration.
Contexts#
A context is a server, a key and an optional default project and environment. weikio login creates one named after the server’s host, and --name gives it another name.
$ weikio context listNAME SERVER PROJECT ENVIRONMENT CURRENT
hub.example https://hub.example sandbox devtest *
ops https://hub.example - -weikio context use ops switches to another context, and weikio context set --env production changes the current one. Setting a production environment warns that every write to it still needs --env production, because the CLI never uses a production environment from a context.
Who you are#
weikio whoami prints the server the call went to, the key’s id, the user it belongs to, whether it is a platform administrator’s key and a table of its grants: the project, the role, the environments and the integrations and APIs each grant covers. When a command is refused with exit code 3, weikio whoami shows what the key may do.
Output formats#
Every command prints a table by default and accepts -o json or -o yaml for scripts. With those, standard output has the records and nothing else, so you can pipe it to jq:
$ WEIKIO_API_KEY="$CI_KEY" weikio get environments --server https://hub.example -o json | jq -r '.items[].name'devtest
production-q prints names only and --no-headers leaves out the header row. Every time the CLI prints is in UTC and says so.
In a pipeline#
A pipeline sets the context with environment variables instead of a login: WEIKIO_SERVER, WEIKIO_API_KEY, WEIKIO_PROJECT and WEIKIO_ENV, and WEIKIO_REASON for the reason every change records in the audit log. A flag wins over the variable, and the variable wins over the context. Keep integrations in Git has complete workflow files.
Shell completion#
weikio completion prints the completion script for bash, zsh, fish or PowerShell. For bash, add this line to ~/.bashrc:
$ source <(weikio completion bash)weikio --help lists the commands under nine headings: Getting started, Develop, Deploy and run, Configuration, Events and data, APIs, Agents, Access and Administration. weikio <command> --help prints the help of one command, and the CLI reference has every command with its flags.