Skip to content
SYS.DOCS // DOCS

Edka CLI

edka is the command line for Edka. It deploys, follows logs, diagnoses failures, and manages clusters, apps and databases from a terminal, a script or a coding agent. It calls the same API as the console, with the permissions of your role in the organization. The source is on GitHub.

Terminal window
$ edka login
Authorize Edka CLI in your browser
…
✓ Signed in to Acme as you@example.com
Next: edka link
$ edka link --cluster production --deployment api
✓ Linked this directory
Cluster: production
Deployment: api
Context: /home/you/api/.edka.json
Next: edka status
$ edka up --wait
Deployment submitted. Waiting for generation 3…
Applying generation 3…
Rolling out: 1/2 updated, 2/2 ready
Rolling out: 2/2 updated, 2/2 ready
✓ api is running generation 3
  • An Edka account. Sign up if you have none.
  • macOS, Linux or Windows, on amd64 or arm64.
Terminal window
curl -fsSL https://edka.io/install.sh | sh

The script downloads the latest release for your system, checks it against the SHA-256 in the release’s checksums.txt, and puts edka in ~/.local/bin. When that directory isn’t on your PATH, it prints the line to add to ~/.zshrc or ~/.bashrc.

Terminal window
brew install edkadigital/tap/edka

In PowerShell:

Terminal window
irm https://edka.io/install.ps1 | iex

The script checks the download the same way, puts edka.exe in %LOCALAPPDATA%\Programs\edka, and adds that directory to your PATH. Terminals that were open before need a restart to find edka.

With Go 1.26 or newer:

Terminal window
go install github.com/edkadigital/cli/cmd/edka@latest

go install puts edka in $(go env GOPATH)/bin, unless GOBIN is set.

Check the installation:

Terminal window
edka version

Both install scripts read these variables:

VariableSets
EDKA_VERSIONA release to install, such as v1.2.3, instead of the latest
EDKA_INSTALL_DIRThe directory of the binary. install.ps1 then leaves PATH alone
EDKA_RELEASES_URLA mirror of https://github.com/edkadigital/cli/releases
Terminal window
curl -fsSL https://edka.io/install.sh | EDKA_VERSION=v1.2.3 sh

Each release also has the archives, named edka_<version>_<os>_<arch>, for macOS (darwin), Linux and Windows on amd64 and arm64, and checksums.txt with the SHA-256 of each. To build from source, clone the repository and run make install. A binary built from source has the version dev, and edka upgrade leaves it alone.

  1. Start the sign-in:

    Terminal window
    edka login

    The browser opens Edka’s consent page. It shows your organization, your email, and the access the CLI asks for. Write access, to create, deploy, update and delete, is optional. Untick it, or run edka login --read-only, to give the CLI read access only.

  2. Select Authorize. The terminal prints the organization and the email you signed in with.

  3. Check who you are signed in as:

    Terminal window
    edka whoami

The CLI acts with your role in the organization, and the cluster permissions of your account apply to every request. A sign-in is bound to one organization. To work in another one, select it in the console and sign in again with a separate profile, as Scripts and CI describes.

Credentials go into the system keyring: Keychain on macOS, Credential Manager on Windows, and the Secret Service on Linux. edka logout revokes them and deletes them. To revoke a sign-in from another computer, open Settings > Security in the console and select Revoke next to the Edka CLI under Authorized applications.

edka login --no-browser prints the authorization URL instead of opening it. The browser then has to reach the CLI’s callback on the server, which listens on 127.0.0.1 only, so forward the port over SSH:

  1. On your computer, connect with a port forward:

    Terminal window
    ssh -L 43871:127.0.0.1:43871 you@server
  2. On the server, start the sign-in on that port:

    Terminal window
    edka login --no-browser --callback-port 43871
  3. Open the printed URL in your browser and select Authorize.

The CLI waits five minutes for the authorization.

A link saves a cluster, and optionally a deployment, for the commands you run in a directory. edka logs, edka up and the other commands then need no --cluster or --deployment.

  1. In the project directory, run:

    Terminal window
    edka link

    A picker lists your clusters. Press / to filter the list, and Enter to choose. A second picker lists the deployments of that cluster. Choose Cluster only to link the cluster alone.

  2. Check the link:

    Terminal window
    edka status

    status shows the linked deployment with its replicas and pods, or the linked cluster.

To link without a picker, name the cluster and the deployment:

Terminal window
edka link --cluster production --deployment api

link writes .edka.json with the IDs of the cluster and the deployment, the profile and the API address. It holds no credentials. Commands find the nearest .edka.json in the current directory or its parents, up to the root of the Git repository. Add it to .gitignore to keep it out of the repository. edka unlink removes it.

Terminal window
edka upgrade

upgrade downloads the latest release for your system, checks it against the release’s checksums.txt, and replaces the binary. A download that doesn’t match replaces nothing. edka upgrade --check reports the latest release and installs nothing.

A binary from Homebrew is Homebrew’s to replace, so upgrade it with brew upgrade edka. edka upgrade names that command and replaces nothing.

Once a day, while a command runs in a terminal, the CLI looks for a newer release and prints a notice after the output, with the command that installs it. The lookup sends no token and installs nothing. It doesn’t run in CI, in scripts, or with EDKA_NO_UPDATE_CHECK=1.

Tab completes commands, flags, and the names of clusters, deployments, databases, cron jobs, apps, add-ons and profiles.

Terminal window
# zsh: add ~/.zsh/completions to fpath before compinit
mkdir -p ~/.zsh/completions
edka completion zsh > ~/.zsh/completions/_edka
# bash
source <(edka completion bash)
# fish
edka completion fish > ~/.config/fish/completions/edka.fish

edka --help lists every command, and edka <command> --help shows its flags and examples.

TaskCommandsPage
Deploy, read logs, change variablesup, build, logs, env, restart, scale, rollbackDeploy from the terminal
Find out why something failsdiagnose, doctorDiagnose problems
Create clusters, node pools, domainsclusters, nodepools, domains, registries, secretsClusters and infrastructure
Install apps and add-onsapps, addonsApps and add-ons
Back up databases, run cron jobsdatabases, cronjobsDatabases and cron jobs
Call any endpoint of the APIapiAPI commands
Script, run in CI, switch accounts--json, profile, run, contextScripts and CI

Something doesn’t work and the error doesn’t say why. Run edka doctor. It checks the configuration and profile, the project link, the API and its sign-in discovery, your identity, and the cluster in context, and prints the reason for each check that fails.

macOS refuses to open edka. A browser marks a file it downloads as quarantined, and tar passes the mark on to edka. macOS then blocks the binary, which isn’t notarized. Remove the mark from the binary you unpacked:

Terminal window
xattr -d com.apple.quarantine ~/.local/bin/edka

The install script and Homebrew download without the mark.

The keyring isn’t available. On a Linux server without the Secret Service, the CLI says it falls back to private files, readable only by you. --credential-store keyring fails instead of falling back, and --credential-store file uses the files directly.

browser login needs a terminal. edka login runs only in an interactive terminal. See Scripts and CI for automation.