# CLI Guide

The `alma` CLI is how engineers connect to an **AlmaForge** cluster from their workstation. On Linux, it ships in the same package as the daemon. On macOS, it ships as a signed `.pkg` installer. Windows is supported through WSL.

## Install[​](#install "Direct link to Install")

* install.sh
* macOS
* Linux
* Windows

The [install.sh](https://get.almaforge.com/install.sh) script detects your platform (Linux amd64/arm64, or macOS amd64/arm64) and installs **AlmaForge** using the recommended method (package manager or signed binary). For binary downloads, SHA-256 verification requires `shasum` or `sha256sum`, and GPG verification requires both `gpg` and `gpgv`. Install those tools before running the script to enable both checks:

******Terminal

```bash
curl -fL https://get.almaforge.com/install.sh | sh
```

The script installs the full **AlmaForge** package, which includes both `almad` and `alma`. Operator workstations only run `alma`. The server binary is installed but remains stopped unless you start it.

Verify the installation:

******Terminal

```bash
alma version --client
Client Version: v2026.2.30+gc45932ada6
```

On macOS, **AlmaForge** is distributed as a signed `.pkg` installer:

* [Apple Silicon](https://get.almaforge.com/almaforge/v2026.2.30/almaforge-2026.2.30-darwin-arm64.pkg) (arm64)
* [Intel Macs](https://get.almaforge.com/almaforge/v2026.2.30/almaforge-2026.2.30-darwin-amd64.pkg) (amd64)

A quick shell snippet:

******Terminal

```bash
ARCH="$(uname -m)"
case "$ARCH" in \
    x86_64|amd64) ARCH=amd64 ;; \
    aarch64|arm64) ARCH=arm64 ;; \
    *) echo "Unsupported architecture: $ARCH" >&2; exit 1 ;; \
  esac
PKG="almaforge-2026.2.30-darwin-$ARCH.pkg"
cd ~/Downloads || cd /var/tmp
curl -fSL --retry 3 --retry-delay 2 -O "https://get.almaforge.com/almaforge/v2026.2.30/$PKG"
sudo installer -pkg "$PKG" -target /
```

Gatekeeper

The installer and binaries are signed with Apple Developer ID certificates, but macOS may still prompt the first time. If it blocks the installer, right-click the downloaded `.pkg` and choose **Open**, or go to **System Settings → Privacy & Security** and click **Open Anyway**.

Verify the installation:

******Terminal

```bash
alma version --client
Client Version: v2026.2.30+gc45932ada6
```

Downloadable artifacts

* [almaforge-2026.2.30-darwin-arm64.pkg](https://get.almaforge.com/almaforge/v2026.2.30/almaforge-2026.2.30-darwin-arm64.pkg)
* [almaforge-2026.2.30-darwin-arm64.pkg.sha256](https://get.almaforge.com/almaforge/v2026.2.30/almaforge-2026.2.30-darwin-arm64.pkg.sha256)
* [almaforge-2026.2.30-darwin-arm64.pkg.sha256.asc](https://get.almaforge.com/almaforge/v2026.2.30/almaforge-2026.2.30-darwin-arm64.pkg.sha256.asc)
* [almaforge-2026.2.30-darwin-amd64.pkg](https://get.almaforge.com/almaforge/v2026.2.30/almaforge-2026.2.30-darwin-amd64.pkg)
* [almaforge-2026.2.30-darwin-amd64.pkg.sha256](https://get.almaforge.com/almaforge/v2026.2.30/almaforge-2026.2.30-darwin-amd64.pkg.sha256)
* [almaforge-2026.2.30-darwin-amd64.pkg.sha256.asc](https://get.almaforge.com/almaforge/v2026.2.30/almaforge-2026.2.30-darwin-amd64.pkg.sha256.asc)
* [almaforge.gpg](https://get.almaforge.com/almaforge.gpg)

On Linux, the `alma` CLI ships in the same package as the **AlmaForge** daemon. Follow the [Linux deployment guide](https://almaforge.com/deployment/linux.md#step-1-install-the-package) for APT, YUM/DNF, or binary tarball install steps.

Verify the installation:

******Terminal

```bash
alma version --client
Client Version: v2026.2.30+gc45932ada6
```

Windows users are encouraged to use the [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/windows/wsl/) together with the [APT repository](https://almaforge.com/deployment/linux.md#step-1-install-the-package). Running `alma` inside WSL provides a Linux-compatible environment with the same behavior and tooling as a native Linux installation. To get started, follow Microsoft's official guide to [install and configure WSL](https://learn.microsoft.com/en-us/windows/wsl/install).

Native Windows binaries are not included in this release.

## Sign in[​](#sign-in "Direct link to Sign in")

Once `alma` is installed, sign in against a running cluster. Get the proxy address from your cluster operator. If you are standing up a cluster yourself, follow the [Standalone guide](https://almaforge.com/deployment/standalone.md) first.

******Terminal

```bash
alma login --proxy=almaforge.example.com:443
```

A browser opens to the cluster's login page. If the cluster has more than one SSO connector configured, you pick one from the list. Complete the SSO flow in the browser and the cluster issues a short-lived certificate that `alma` stores under `~/.config/almaforge/` (or `$XDG_CONFIG_HOME/almaforge/` when set). On headless workstations, add `--no-browser` and open the printed URL on another device.

The Proxy's TLS certificate must be trusted by your workstation. The default Let's Encrypt setup uses the existing system trust store. For a privately issued Proxy certificate, obtain its signing CA from your cluster operator and install it before signing in. See [operator-supplied certificates](https://almaforge.com/networking.md#operator-supplied-certificates). Keep certificate verification enabled when enrolling an identity.

Non-interactive login

CI runners, bots, and services authenticate without a browser through [workload identity](https://almaforge.com/workload-identity.md). The cluster issues short-lived certificates against a join method (GitHub OIDC, GitLab JWT, Kubernetes ServiceAccount, AWS IAM, and others) and the caller passes the resulting identity file with `-i`. No static credentials, no human in the loop.

## Shell completion[​](#shell-completion "Direct link to Shell completion")

`alma` and `almad` ship bash and zsh completion. Press `Tab` after the binary name to list subcommands. Press `Tab` after `--` to list flags.

Add to `~/.bashrc`:

\~/.bashrc

```bash
eval "$(alma --completion-script-bash)"
eval "$(almad --completion-script-bash)"
```

Add to `~/.zshrc`:

\~/.zshrc

```bash
autoload -Uz compinit
compinit
eval "$(alma --completion-script-zsh)"
eval "$(almad --completion-script-zsh)"
```

Reload your shell.

## Day-to-day[​](#day-to-day "Direct link to Day-to-day")

If you have used `kubectl`, the model is familiar. AlmaForge exposes its objects through the same CRUD verbs (`get`, `apply`, `edit`, `delete`) over the same `apiVersion` / `kind` / `metadata` / `spec` shape. Common kinds:

* **Targets:** `server` (SSH host), `kube` (Kubernetes cluster), `db` (database), `app` (HTTP application).
* **Identity and policy:** `role`, `user`, `token`, `connector`, `lock`.
* **Sessions:** `session` (live sessions).

See [resource manifests](https://almaforge.com/reference/configuration.md) for the full schema.

******Terminal

```bash
alma status                       # current identity, roles, expiry
alma get server                     # list reachable SSH hosts
alma get kube                     # list reachable Kubernetes clusters
alma get db                       # list reachable databases
alma get session                  # list live sessions
alma get role                     # list all roles
alma get role/devops -o yaml      # full YAML of one resource
alma apply -f role.yaml           # create or update from a manifest
alma edit role/devops             # open in $EDITOR, apply on save
alma delete role/devops           # remove
alma ssh <user>@<host>            # SSH to a managed host
alma kube login <name>            # kubeconfig for a Kubernetes target
alma db login <name>              # client cert for a database target
alma logout                       # discard the local identity
alma exec db/postgres -- -c 'select 1'
alma exec kube/prod -- get pods
alma port-forward db/postgres
```

The certificate expires automatically. Run `login` again when it does. The kubeconfig integration obtains credentials for `kubectl` through `alma` and can reuse an unexpired credential. See [Kubernetes access](https://almaforge.com/access/kubernetes.md).

For the full command tree, every subcommand, and every flag, see the [CLI reference](https://almaforge.com/reference/cli.md).

## Multiple clusters[​](#multiple-clusters "Direct link to Multiple clusters")

Each successful login writes a profile. Inspect the current profile or select a cluster for one command:

******Terminal

```bash
alma status
alma --proxy=almaforge.example.com:443 status
```

`alma` reads `current-profile` in the profile directory (`$XDG_CONFIG_HOME/almaforge/` or `~/.config/almaforge/`) to decide which cluster a bare command targets. Set the proxy explicitly to override for a single command.

## Next steps[​](#next-steps "Direct link to Next steps")

* [Server access](https://almaforge.com/access/servers.md): SSH to Linux hosts with short-lived certificates.
* [Kubernetes access](https://almaforge.com/access/kubernetes.md): `kubectl` against EKS, GKE, AKS, and self-hosted clusters.
* [Database access](https://almaforge.com/access/databases.md): PostgreSQL, MySQL, MongoDB, Redis, and more.
* [Application access](https://almaforge.com/access/applications.md): publish internal web apps and APIs.
* [Workload identity](https://almaforge.com/workload-identity.md): sign in from CI runners and bots without a browser.
