Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Install the CLI

Weik.io 2026.2

Install the weikio CLI, a native binary for Linux and Windows on x64, and sign in to your Weik.io installation. Product page · Video

Watch: Connecting the Weik.io CLI, 2:59

The video installs the weikio CLI and signs in to an installation through the browser, then switches between two contexts.

On this page

You and your pipelines work with your Weik.io installation through the weikio CLI, whose commands are HTTP calls to the installation’s API.

Install it#

The install scripts download the newest release and check the file against the release’s SHA256SUMS. They run the CLI once before they put it in place.

On Linux (x64):

Terminal
$ curl -fsSL https://weik.io/install.sh | sh

The line needs curl and ca-certificates. Minimal images such as debian:12 don’t have them, so install them there first with apt-get update && apt-get install -y curl ca-certificates.

The script installs the CLI as ~/.local/bin/weikio without prompts and without changing your shell profiles. When ~/.local/bin isn’t on your PATH, the script prints the line to add. When another weikio comes first on your PATH, the script warns you.

On Windows (x64), in Windows PowerShell 5.1 or PowerShell 7:

Terminal
irm https://weik.io/install.ps1 | iex

The script installs %LOCALAPPDATA%\Programs\weikio\weikio.exe without administrator rights and adds its folder to your user PATH once.

Adafy Oy signs the Windows CLI.

To install one release, such as the one a pipeline is pinned to, set WEIKIO_CLI_VERSION:

Terminal
$ curl -fsSL https://weik.io/install.sh | WEIKIO_CLI_VERSION=2026.2.4 sh

The download page has the CLI files of each release with their checksums.

Check the version#

Terminal
$ weikio version
You see
weikio 2026.2.2 (linux/x64)
server: https://hub.example 2026.2.2

The second line is the installation’s release. Before you sign in, it says server: not logged in.

Sign in#

Terminal
$ weikio login https://hub.example --project sandbox --env devtest

On a machine with a browser, the CLI opens the installation’s approval page. When you approve the request there, the CLI gets a new key with the rights and expiry the page shows.

When WEIKIO_API_KEY has a key, or you pipe one in, the CLI uses that key as it is.

Without a browser, type an API key at the hidden prompt:

You see
API key: ********
Context 'hub.example' saved and made current (server https://hub.example, project sandbox, environment devtest).

The CLI keeps the key in your system’s keyring, or in the Credential Manager on Windows. Where there is no keyring, the key goes into a file only you can read, next to the CLI’s configuration.

Contexts#

A context keeps an installation’s address and a key, and optionally a default project and environment. weikio login creates a context named after the host in the address, unless you give it another name with --name.

Terminal
$ weikio context list
You see
NAME          SERVER                PROJECT   ENVIRONMENT   CURRENT
hub.example   https://hub.example   sandbox   devtest       *
ops           https://hub.example   -         -

weikio context use ops switches to another context.

weikio context set --env production changes the current context and warns that a write to production still needs --env production, as Environments and promotion explains.

Who you are#

Exit code 3 means the key may not run the command. Run weikio whoami to see what the key may do. It prints the installation the call went to and the key’s details:

  • The key’s id and the user it belongs to
  • Whether it’s a platform administrator’s key
  • The key’s grants, each with its project and role and what the grant is limited to

Output formats#

Commands print a table by default and accept -o json or -o yaml for scripts. With those, standard output has only the records, so you can pipe it to jq:

Terminal
$ WEIKIO_API_KEY="$CI_KEY" weikio get environments --server https://hub.example -o json | jq -r '.items[].name'
You see
devtest
production

You can shorten the output with a flag:

Flag What it does
-q Prints only the name of each record
--no-headers Leaves out the header row

The CLI prints times in UTC.

In a pipeline#

A pipeline sets the context with environment variables instead of a login:

Variable What it sets
WEIKIO_SERVER The installation’s address
WEIKIO_API_KEY The API key
WEIKIO_PROJECT The project
WEIKIO_ENV The environment
WEIKIO_REASON The reason the audit log records for each change

A flag wins over its variable, which 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:

Terminal
$ source <(weikio completion bash)

weikio --help lists the commands under nine headings. weikio <command> --help prints the help of one command. The CLI reference has every command with its flags.

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo