Skip to main content

AlmaForge CLI Reference

This page covers the two AlmaForge command-line binaries:

  • alma is the user CLI. Use it for login, resource access, configuration, admin tasks, and audit workflows. RBAC determines what each user can see and do.
  • almad is the server daemon. It runs the Auth, Proxy, and resource services.

For installation, sign-in, shell completion, and the kubectl-style day-to-day workflow, see the CLI guide. This page is the reference for common commands and their flags. Use alma <command> --help for the complete list in your installed version.

alma​

alma is the user-facing CLI for day-to-day cluster access and administration. The flags below are accepted by every alma subcommand. Subcommand-specific flags are documented alongside each command.

Global flags​

FlagDescription
--proxyProxy address.
--ttlMinutes-to-live for the issued session.
-i, --identityIdentity file to use instead of the local profile.
-d, --debugVerbose logging to stdout.
--auth-serverAddress of the Auth Service to connect to directly, bypassing the Proxy. Uses the local admin identity from --data-dir, which has a default path.
--data-dirPath to the data directory holding the local admin identity (default /var/lib/almaforge).

Authentication​

alma login​

Log in to a cluster and receive a certificate.

text
alma login [flags] [cluster]
FlagDescription
-o, --outWrite identity to file instead of the local profile
-f, --formatIdentity format: file, openssh, kubernetes
--overwriteOverwrite existing identity file
--ca-pinsha256:<hex> pin of the CA the Proxy presents, such as its self-signed certificate. Repeatable. The Proxy is trusted when that CA matches a pin, and the profile keeps the pins for later commands. Env: ALMA_CA_PIN.
--request-rolesRequest one or more extra roles
--request-reasonReason for requesting additional roles
--request-reviewersSuggested reviewers for role request
--request-nowaitFinish without waiting for request resolution
--request-idLogin with the roles requested in the given request, named by ID or a unique prefix
--browserOpen a browser during login (default). Use --no-browser to print a sign-in URL for another device. This is a Boolean flag. A following value is treated as the cluster name.
--breakglassCreate a one-time recovery link with the local admin identity. Must run on an Auth host. Ignores every other login flag.
--kube-clusterName of the Kubernetes cluster to login to
-v, --verboseShow extra status information

alma logout​

Log out of the current cluster, removing local certificates.

text
alma logout

alma status​

Show the current session and cluster status.

text
alma status [flags]
FlagDefaultDescription
-f, --formattextOutput format: text, json, yaml
-v, --verboseShow extra detail

Resource Access​

alma ssh​

Start an SSH session or run a command on a remote node.

text
alma ssh [flags] [user@]host [command...]
FlagDescription
-l, --loginRemote host login
-p, --portSSH port on the remote host
-A, --forward-agentForward SSH agent
-L, --forwardLocal port forwarding (local:remote)
-D, --dynamic-forwardSOCKS5 dynamic forwarding
-t, --ttyForce TTY allocation
--localExecute command on localhost after connecting to SSH node
-N, --no-remote-execNo remote command (port forwarding only)
-c, --clusterTarget cluster
-X, --x11-untrustedUntrusted X11 forwarding
-Y, --x11-trustedTrusted X11 forwarding
--x11-untrusted-timeoutTimeout for untrusted X11 forwarding
--request-reasonReason for automatic access request
--disable-access-requestDisable automatic resource access requests
--log-dirDirectory for per-node command output logs

alma scp​

Copy files to or from a remote node.

text
alma scp [flags] src dest
FlagDescription
-l, --loginRemote host login
-r, --recursiveRecursive copy
-P, --portRemote port
-p, --preservePreserve timestamps
-q, --quietQuiet mode
-c, --clusterTarget cluster

alma node ls​

List SSH nodes.

text
alma node ls [flags] [labels]

Alias: alma node list

alma app​

Application access commands.

CommandDescription
alma app lsList applications
alma app login <app>Get short-lived app certificate
alma app logout [app]Remove app certificate
alma app configPrint app connection info

alma db​

Database access commands.

CommandDescription
alma db lsList databases
alma db login <db>Retrieve database credentials
alma db logout [db]Remove database credentials
alma db envPrint database environment variables
alma db configPrint database connection info
alma db connect <db>Connect to a database
FlagDescription
-c, --clusterTarget cluster

alma kube​

Kubernetes access commands.

CommandDescription
alma kube lsList Kubernetes clusters
alma kube login <cluster>Log in to a Kubernetes cluster
alma kube credentialsGet kubectl credentials (exec plugin)
alma kube sessionsList active Kubernetes sessions

alma proxy​

Start a local TLS proxy for tunneled access.

CommandDescription
alma proxy sshLocal proxy for SSH
alma proxy dbLocal proxy for database connections
alma proxy appLocal proxy for application connections
alma proxy kubeLocal proxy for Kubernetes

alma request​

Manage access requests.

CommandDescription
alma request lsList access requests
alma request show <id>Show request details
alma request createCreate an access request
alma request review <id>Review an access request
alma request searchSearch for requestable resources
alma request dropDrop access requests from current identity
alma request assume <id>Assume an approved access request

For recurring credential delivery to files or Kubernetes Secrets, use alma export -c <file>. See Credential Export.

Resource filtering​

Listing commands such as alma node ls, alma db ls, alma app ls, and alma kube ls accept --search and --query flags to filter results.

--search runs a fuzzy match against resource fields. For example, --search=mac matches any resource containing mac.

--query accepts a predicate expression for precise filtering on labels and fields.

You can combine both with a trailing comma-separated label selector.

Terminal
# List all nodesalma node ls
# List nodes by labelalma node ls env=staging,os=mac
# Fuzzy search across fieldsalma node ls --search=staging,mac
# Predicate query on labelsalma node ls --query='labels["env"] == "staging" && equals(labels["os"], "mac")'

Resource Configuration (CRUD)​

These commands follow kubectl conventions and work across resource types. RBAC determines which resources each user can manage.

alma get​

List resources or show one resource.

text
alma get <kind> [name] [flags]
alma get <kind>/<name> [flags]
alma get all
FlagDefaultDescription
-o, --formattextOutput format: text, yaml, json
-v, --verboseFull label output
--with-secretsfalseInclude secrets (CAs, connectors)
--searchFuzzy search keywords
--queryPredicate language filter

Supported resource types include role, user, node, app, db, kube, token, lock, session (active sessions), recording (finished sessions, the same set as alma recording ls, with a single recording read using alma recording play), connector (auth connectors), AuthConfig, NetworkConfig, RecordingConfig, alert, bot, and more. Run alma get --help for the full list.

alma apply​

Create or update a resource, like kubectl apply.

text
alma apply -f resource.yaml
alma apply resource.yaml # positional filename also accepted
FlagDescription
-f, --filenameResource definition file (stdin if omitted)

The filename can be passed as a positional argument or with -f.

alma update​

Patch resource metadata fields.

text
alma update <kind>/<name> [flags]
FlagDescription
--set-labelsReplace labels with a comma-separated key=value list
--set-ttlSet resource TTL

alma create​

Create a resource. The command fails if the resource already exists. Use apply to overwrite an existing resource.

From a file:

text
alma create -f resource.yaml

Imperative shortcuts:

CommandDescription
alma create token --services=<services>Create an invitation token
alma create bot <name> --roles=<roles>Create a certificate renewal bot

alma delete​

Delete a resource.

text
alma delete <kind> <name>
alma delete <kind>/<name>

Aliases: alma rm, alma del

alma edit​

Open a resource in $EDITOR and apply changes on save.

text
alma edit <kind>/<name>

Audit​

alma audit​

List audit events, newest first. Use --type to select an event type. Repeat the flag to include multiple types.

Terminal
alma audit --last=1h --type=UserLoginalma audit -f -o json

alma recording​

Session recording commands.

CommandDescription
alma recording lsList recordings
alma get recordingsList recordings, same set as recording ls
alma recording play <id>Replay a recorded session

The audit and recording listing commands share these options:

FlagDescription
-f, --followKeep watching for new results until interrupted.
-o, --formatOutput format: text, json, or yaml. Defaults to text.
--from-utcStart date in YYYY-MM-DD format, at midnight UTC. Defaults to 24 hours ago.
--to-utcEnd date in YYYY-MM-DD format, at midnight UTC. Defaults to the current time.
--lastLook back by a duration such as 1h30m. Cannot be combined with date bounds.
--limitMaximum number of initial results. Defaults to 50.

Both commands list the most recent results first. The initial range cannot exceed 365 days or include future dates. With --follow, omit --to-utc. The command prints up to --limit initial results and then continues with new arrivals. Use --limit=0 to follow without printing existing history.

Terminal
alma recording ls --last=1h -o jsonalma recording ls -f --limit=0

Following checks for new results every five seconds, including records that arrive late. JSON output consists of successive arrays, one per batch. YAML output uses separate documents. Query work and memory grow with the number of records in the selected range.


Admin​

Tokens​

Invitation tokens for enrolling agents.

CommandDescription
alma create token --services=<services>Create an invitation token
alma get tokenList tokens
alma delete token/<name>Remove a token

Bots​

Certificate renewal bots.

CommandDescription
alma create bot <name> --roles=<roles>Create a bot and print its enrollment command
alma get botList bots with the user and roles behind each one
alma delete bot/<name>Remove a bot, along with the role created with it

alma create lock​

Create a new cluster lock to disable a user, role, login, request, or server.

text
alma create lock [flags]
FlagDescription
--target-userUser to disable
--roleRole to disable
--target-loginLocal UNIX user to disable
--access-requestAccess request UUID to disable
--server-idServer UUID to disable
--messageMessage for locked-out users
--expiresLock expiry (RFC3339)
--lock-ttlLock TTL duration

alma auth​

Certificate authority operations.

CommandDescription
alma auth exportExport public CA keys
alma auth signCreate identity file(s) for a user
alma auth rotateRotate certificate authorities
alma auth lsList connected auth servers
alma auth crlExport certificate revocation list
alma auth pinPrint the CA pins used to verify the Auth Service during a join

alma get instance​

CommandDescription
alma get instanceList the instances registered with the cluster

alma alert​

Cluster alert management.

CommandDescription
alma alert lsList alerts (alias: alma alert list)
alma alert create <message>Create a cluster alert
alma alert ack <id>Acknowledge an alert
alma alert ack lsList acknowledged alerts

alma get cluster​

Show the cluster you are connected to.

text
alma get cluster [flags]
FlagDefaultDescription
-o, --formattextOutput format: text, yaml, json

Misc​

alma version​

Print the client and server version.

text
alma version [flags]
FlagDefaultDescription
-f, --formattextOutput format: text, json, yaml
--clientClient version only (no server required)

alma get license​

Show license status and current usage.

text
alma get license

almad​

almad is the AlmaForge server daemon. One binary runs every cluster service: Auth, Proxy, SSH Node, Database, Application, Kubernetes, and the built-in access-request plugins. Role flags, environment variables, and resource files decide which services start.

almad does not have process-wide global flags. Each subcommand defines its own flags. almad start carries the longest flag list. Run almad <command> --help to inspect the exact flags for a subcommand.

Commands​

CommandPurpose
almad startRun almad in the foreground with services selected by service flags, environment variables, or resource files.
almad statusPrint the active SSH session metadata when invoked from inside an almad SSH session.
almad versionPrint the binary version. Add --raw for the bare version string.
almad install systemdRender a systemd unit file for almad.
almad install scriptRender a shell script that installs an agent on a fresh node.
almad join opensshEnroll an existing OpenSSH server into the cluster without running the daemon.

Run almad <command> --help for the full flag list of any subcommand.

Starting a cluster​

Set environment variables or place resource files under /etc/almaforge/almad.d, run the daemon, and optionally wire it into systemd. Use this flow to bring up a new Auth/Proxy or run almad as a long-lived service on any node.

almad start​

almad start runs in the foreground and exits when interrupted. For production deployments, put resource files in /etc/almaforge/almad.d and set daemon defaults in the environment. The CLI flags below are most useful for bootstrapping and one-off invocations.

General

FlagDefaultDescription
-d, --debugVerbose stderr logging. Env: ALMA_DEBUG.
--log-levelinfoLog severity: debug, info, warn, error. Env: ALMA_LOG_LEVEL.
--log-outputstderrLog destination: stderr, stdout, syslog, or a file path. Env: ALMA_LOG_OUTPUT.
--log-formattextLog line format: text for human-readable output, json for one JSON object per line. Env: ALMA_LOG_FORMAT.
--config-dir/etc/almaforge/almad.dPath to the config directory or file. Loaded on every start to apply typed resources (StorageConfig, roles, tokens, etc.). Env: ALMA_CONFIG_DIR.
--data-dir/var/lib/almaforgeDirectory for local state and the embedded SQLite store. Env: ALMA_DATA_DIR.
--pid-fileWrite the process PID to this path.
-t, --testResolve the configuration and exit without starting any service.
--license-filePath to the AlmaForge license file. Env: ALMA_LICENSE_FILE.
--permit-user-envRead environment variables from ~/.ssh/environment, the OpenSSH PermitUserEnvironment file, when starting a session.

Services

FlagDescription
--auth-serviceRun the Auth service. --no-auth-service turns it off. Env: ALMA_AUTH_SERVICE.
--proxy-serviceRun the Proxy service. --no-proxy-service turns it off. Env: ALMA_PROXY_SERVICE.
--ssh-serviceRun the SSH Node service. --no-ssh-service turns it off. Env: ALMA_SSH_SERVICE.
--database-serviceRun the Database service. --no-database-service turns it off. Env: ALMA_DATABASE_SERVICE.
--app-serviceRun the Application service. --no-app-service turns it off. Env: ALMA_APP_SERVICE.
--kubernetes-serviceRun the Kubernetes service. --no-kubernetes-service turns it off. Env: ALMA_KUBERNETES_SERVICE.
--jira-serviceRun the built-in Jira access-request plugin. --no-jira-service turns it off. Env: ALMA_JIRA_SERVICE.
--slack-serviceRun the built-in Slack access-request plugin. --no-slack-service turns it off. Env: ALMA_SLACK_SERVICE.
--pagerduty-serviceRun the built-in PagerDuty plugin. --no-pagerduty-service turns it off. Env: ALMA_PAGERDUTY_SERVICE.
--telegram-serviceRun the built-in Telegram plugin. --no-telegram-service turns it off. Env: ALMA_TELEGRAM_SERVICE.

Cluster join

FlagDescription
--auth-serverAddress of the Auth Service, for a Proxy joining an Auth fleet. An agent cannot use it: agents open no port and are reached through a tunnel they hold to a Proxy. Env: ALMA_AUTH_SERVER.
--proxyAddress of the Proxy Service. What every agent joins with. Env: ALMA_PROXY.
--client-idResource name (metadata.name) of the provisioning Token, or a path to a file containing it. Env: ALMA_CLIENT_ID.
ALMA_CLIENT_SECRETPlaintext shared secret for the static join method. Environment-only (no CLI flag), keeping the value out of command-line arguments.
--ca-pinsha256:<hex> pin of the Auth Server CA. Repeatable. Used on first join. Env: ALMA_CA_PIN.
--join-methodJoin method: static, aws, ec2, kubernetes, azure, gcp, github, gitlab, circleci, spacelift. Env: ALMA_JOIN_METHOD.
--nodenameOverride the node name (defaults to the host's hostname). Env: ALMA_NODE_NAME.
--labelsComma-separated key=value static labels for this node. Env: ALMA_LABELS.

Networking

--listen is the shared TLS listener: one TLS port that serves every proxy protocol via SNI/ALPN. It is the only listener bound by default. Dedicated listener flags can add an entry point or move a protocol to another port. See how dedicated ports change access.

Each listener is paired with its advertise flag immediately below it.

FlagDefaultDescription
--listen0.0.0.0:443Shared TLS listener. Bound when the Proxy Service or Auth Service is enabled. Env: ALMA_LISTEN.
--advertiseCanonical endpoint advertised to clients (alma.example.com:443). Used for SSO redirects, ACME, and as the fallback for every --*-advertise override. Env: ALMA_ADVERTISE.
--kube-listenOptional dedicated kube SNI port. The kube SNI route on the shared TLS listener is on by default. Set this only to add a separate listener. Env: ALMA_KUBE_LISTEN.
--kube-advertiseOverride for alma kube login config server URL. Env: ALMA_KUBE_ADVERTISE.
--tunnel-listenOptional dedicated reverse tunnel port. Env: ALMA_TUNNEL_LISTEN.
--tunnel-advertiseOverride for agent reverse-tunnel reconnect URL. Env: ALMA_TUNNEL_ADVERTISE.
--mysql-listenOptional native MySQL wire-protocol port. Env: ALMA_MYSQL_LISTEN.
--mysql-advertiseOverride for MySQL client connection display. Env: ALMA_MYSQL_ADVERTISE.
--postgres-listenOptional native Postgres wire-protocol port. Env: ALMA_POSTGRES_LISTEN.
--postgres-advertiseOverride for Postgres client connection display. Env: ALMA_POSTGRES_ADVERTISE.
--mongo-listenOptional native Mongo wire-protocol port. Env: ALMA_MONGO_LISTEN.
--mongo-advertiseOverride for Mongo client connection display. Env: ALMA_MONGO_ADVERTISE.
--ssh-listenOptional dedicated proxy SSH port (alma ssh raw-SSH path). Configures the Proxy Service ingress, not the SSH Node service. Env: ALMA_SSH_LISTEN.
--ssh-advertiseOverride for the proxy's SSH ingress public address. Env: ALMA_SSH_ADVERTISE.
--peer-listenProxy-to-proxy peering listener for HA proxy clusters. Env: ALMA_PEER_LISTEN.
--peer-advertiseAddress this proxy advertises to peer proxies. Env: ALMA_PEER_ADVERTISE.
--diag-listenDiagnostics endpoint (/healthz, /readyz, plus /debug/pprof/* under --debug). Also serves /metrics while --metrics-listen is unset. Operator-only. No advertise. Env: ALMA_DIAG_LISTEN.
--metrics-listenPrometheus metrics endpoint (/metrics). Operator-only. No advertise. Env: ALMA_METRICS_LISTEN.
--metrics-tls-certCertificate the metrics listener presents. Env: ALMA_METRICS_TLS_CERT.
--metrics-tls-keyPrivate key for --metrics-tls-cert. Env: ALMA_METRICS_TLS_KEY.
--metrics-client-caCA a scraper must present a certificate from. The metrics listener serves mutual TLS or plaintext, so these three go together with --metrics-listen and a subset fails at startup. Env: ALMA_METRICS_CLIENT_CA.
--real-ip-fromNetworks a client-supplied source address is believed from (comma-separated CIDRs or bare IPs). Empty believes none. Env: ALMA_REAL_IP_FROM.
--real-ip-headerproxy_protocolThe one channel a trusted proxy may use to give the client address (proxy_protocol / X-Forwarded-For / X-Real-IP / off). Env: ALMA_REAL_IP_HEADER.
--proxy-protocolWhether a PROXY protocol header is required on the multiplex listener (on / off). Unset allows one without requiring it. Believing the address it carries is controlled by --real-ip-from and --real-ip-header. Env: ALMA_PROXY_PROTOCOL.
--tls-certPath to a TLS certificate for the Proxy. Env: ALMA_TLS_CERT.
--tls-keyPath to the matching TLS private key. Set both or neither. Half a pair fails at startup. Without a supplied pair or ACME, the Proxy uses a self-signed certificate. Env: ALMA_TLS_KEY.
--tls-reload-intervalHow often the Proxy re-reads --tls-cert, for example 1h. Set it to pick up a renewal issued out of band without restarting. Unset loads the certificate once at startup. Env: ALMA_TLS_RELOAD_INTERVAL.
--acmeEnable ACME / Let's Encrypt certificate provisioning on the Proxy. Env: ALMA_ACME_ENABLED.
--acme-emailRegistration email for ACME. Env: ALMA_ACME_EMAIL.
--acme-uriLet's Encrypt productionACME directory to use. Point it at a staging directory while testing so experiments do not consume the production rate limit, or at a private CA. Env: ALMA_ACME_URI.

Storage backends

Each flag holds a single URI parsed into a typed StorageConfig. The URI grammar (schemes, query keys) is documented in Storage backends → URI format.

FlagDescription
--state-uriCluster state backend URI. Examples: sqlite:///var/lib/almaforge/backend, postgres://user@host/db, dynamodb://table?region=us-east-1. Env: ALMA_STATE_URI.
--audit-uriAudit events sink URI. Examples: dynamodb://events?region=us-east-1, postgres://user@host/audit, file:///var/log/almaforge/audit. Env: ALMA_AUDIT_URI.
--recordings-uriSession recordings storage URI. Examples: s3://bucket/prefix?region=us-east-1, gs://bucket/prefix, file:///var/lib/almaforge/records. Env: ALMA_RECORDINGS_URI.

For multi-sink audit fan-out, use typed StorageConfig documents under --config-dir instead of the single-URI flag.

CA keystore

Where the Auth Service keeps its CA private keys. Name the driver explicitly: settings for a driver you did not select are a startup error rather than a silent fall back to software keys.

FlagDefaultDescription
--ca-keystoresoftwareKeystore driver: software, pkcs11 or gcp_kms. Env: ALMA_CA_KEYSTORE.
--pkcs11-modulePath to the PKCS#11 module. Required for pkcs11. Env: ALMA_PKCS11_MODULE.
--pkcs11-slotSlot number holding the token. Give this or --pkcs11-token-label. Env: ALMA_PKCS11_SLOT.
--pkcs11-token-labelLabel of the token to use. Give this or --pkcs11-slot. Env: ALMA_PKCS11_TOKEN_LABEL.
--pkcs11-pinPIN for the token. An absolute path is read as a file holding the PIN, which keeps it out of the process environment. Env: ALMA_PKCS11_PIN.
--gcp-kms-keyringFully qualified GCP KMS keyring name. Required for gcp_kms. Env: ALMA_GCP_KMS_KEYRING.
--gcp-kms-protection-levelSOFTWAREGCP KMS protection level: HSM or SOFTWARE. Env: ALMA_GCP_KMS_PROTECTION_LEVEL.

Tracing

FlagDefaultDescription
--traces-otlp-uriOTLP endpoint traces are exported to. Naming an endpoint is what turns tracing on. Env: ALMA_TRACES_OTLP_URI.
--traces-sampling-rate1.0Fraction of traces recorded, from 0.0 to 1.0. Requires --traces-otlp-uri. Env: ALMA_TRACES_SAMPLING_RATE.

Application service

Run almad start --app-service and define AppTarget resources under /etc/almaforge/almad.d.

The flags below describe a single application on the command line instead, which is what the join command printed by alma create token --services=app uses. --app-name is required as soon as any of the others is set.

FlagDescription
--app-nameName of the application to serve.
--app-uriInternal address the application is reachable at.
--app-advertiseDNS name clients reach the application by. Routing is by name on the web proxy port, so a port or a literal IP is rejected.

Database service

Run almad start --database-service and define DatabaseTarget resources under /etc/almaforge/almad.d.

The flags below describe a single database on the command line instead, which is what the join command printed by alma create token --services=database uses. --db-name is what turns them on: without it the rest are ignored and the service starts with no database.

FlagDescription
--db-nameName of the proxied database.
--db-protocolWire protocol: postgres, mysql, mongodb, cockroachdb, redis, snowflake, cassandra, elasticsearch, opensearch, dynamodb, clickhouse or clickhouse-http.
--db-uriAddress the database is reachable at.
--db-ca-certPath to the CA certificate the database's own certificate is checked against.
--db-aws-regionAWS region the database runs in. Required for RDS and Aurora.

Kubernetes service

FlagDescription
--kubeconfigPath to a kubeconfig used to register external Kubernetes clusters. Env: ALMA_KUBECONFIG.

Resource matching

FlagDescription
--match-labelsLabel matcher for dynamically registered databases, applications, and Kubernetes clusters. Env: ALMA_MATCH_LABELS.

Examples

Terminal
# Single-node cluster (auth + proxy + node).sudo almad start
# SSH Node joining an existing cluster.sudo ALMA_CLIENT_SECRET=/etc/almaforge/client-secret \ almad start \ --ssh-service \ --no-auth-service \ --no-proxy-service \ --proxy=proxy.example.com:443 \ --client-id=db-prod-1 \ --labels=env=prod,role=db
# App agent joining an existing cluster. The apps it serves come# from AppTarget resources, not from flags.sudo ALMA_CLIENT_SECRET=/etc/almaforge/client-secret \ almad start \ --app-service \ --no-auth-service \ --no-proxy-service \ --proxy=proxy.example.com:443 \ --client-id=billing-app

almad install systemd​

Render a systemd unit file for almad. Defaults match the package layout.

FlagDescription
--env-filePath to the environment file.
--fd-limitMaximum open file descriptors.
--binaryFull path to the almad binary.
-o, --outputOutput destination (stdout, file:///path).
--data-dirData directory embedded in the unit.

almad install script​

Render a shell script that installs and joins an agent on a fresh node. The script is written to almaforge.sh in the current directory. Use -o stdout to write it to standard output instead, or -o file:///path to choose another location.

Joining a cluster​

Helpers for adding a new node, agent, or service to an existing cluster.

almad join openssh​

Enroll an existing OpenSSH server into the cluster without running the almad daemon. The command writes credentials, updates sshd_config, and (by default) restarts sshd.

FlagDescription
--proxyAddress of the Proxy Service.
--client-idToken resource name on the cluster (literal or file path). Pair with ALMA_CLIENT_SECRET for the static method.
--join-methodstatic, aws, ec2, kubernetes, azure, gcp, github, gitlab, circleci, or spacelift.
--openssh-configPath to the sshd config (default /etc/ssh/sshd_config).
--data-dirDirectory for local state.
--restart-sshdRestart sshd after writing config (default true).
--sshd-check-commandCommand used to validate the new sshd config.
--sshd-restart-commandCommand used to restart OpenSSH. Defaults to systemctl restart on the unit the host installs, sshd.service or ssh.service.
--labelsComma-separated key=value labels for the OpenSSH node.
--addressIP address of this OpenSSH node.
--additional-principalsExtra principals to include on the certificate.

Misc​

almad status​

When invoked from inside a session opened by an almad SSH Node, prints the session metadata: cluster, user, roles, and certificate expiration. Useful for debugging RBAC and join behavior.

almad version​

Print the binary version. Add --raw for the bare version string (useful in scripts).

Query Examples​

Resource-listing commands accept --query. The flag takes a predicate expression that is evaluated against each resource. Resources for which the expression evaluates to true are returned.

Examples:

Terminal
alma node ls --query 'labels["env"] == "prod"'alma db ls --query 'contains(labels["team"], "platform")'alma app ls --query 'hasPrefix(name, "billing-")'