CLI & SDKs
Read secrets from your terminal, application code, CI pipelines, and Kubernetes.
On this page
Install#
Install the adera CLI with Go 1.26 or newer, on macOS, Linux or Windows:
go install github.com/MATII-Technologies/matii-sc/go/cmd/adera@latest
adera version
go install puts adera in $(go env GOPATH)/bin (usually ~/go/bin, or
%USERPROFILE%\go\bin on Windows); add that folder to your PATH if adera
is not found. Pin a release with @v1.0.1 instead of @latest. If your
administrator mirrors the release binaries, the Get started page also shows
a one-line installer for this deployment.
Sign in#
adera auth login --host https://secrets.example.com
The CLI opens this console in your browser. Confirm the code shown in the
terminal, choose the organisation, and the CLI receives a personal access
token for your account, stored in ~/.config/adera/credentials.json (mode
0600; the platform's user configuration folder on macOS and Windows).
adera auth logout deletes the token on the server and locally.
In pipelines, set ADERA_HOST and ADERA_TOKEN (a service account token), or
use workload identity (ADERA_SERVICE_ACCOUNT_ID with ADERA_OIDC_TOKEN_FILE
or ADERA_OIDC_PROVIDER=github-actions).
Commands#
adera secrets list --app Payments --env production [--path /backend]
adera secrets get DATABASE_URL --app Payments --env production
adera secrets export --app Payments --env production --format dotenv|json|shell
adera run --app Payments --env production -- ./server
adera dynamic lease deploy --app Payments --env production --ttl 30m # temporary AWS credentials
adera run --app Payments --env production --dynamic deploy -- ./deploy.sh
adera run starts the program with the secrets in its environment and returns
the program's exit code. Other exit codes: 1 error, 2 usage, 3 not signed in
or not allowed.
Containers#
Install the CLI with go install in a build stage and run your program
through it:
FROM golang:1.26 AS adera
RUN CGO_ENABLED=0 go install github.com/MATII-Technologies/matii-sc/go/cmd/adera@v1.0.1
FROM your-app-image
COPY --from=adera /go/bin/adera /usr/local/bin/adera
ENTRYPOINT ["adera", "run", "--app", "Payments", "--env", "production", "--"]
CMD ["./server"]
Pass ADERA_HOST and ADERA_TOKEN at runtime, never at build time.
Kubernetes#
The Matii operator keeps a Kubernetes Secret in step with an environment,
authenticating with the pod's Kubernetes service account token (configure a
Kubernetes OIDC identity on the Matii service account):
apiVersion: secrets.matii.io/v1alpha1
kind: MatiiSecret
metadata: { name: payments, namespace: payments }
spec:
serviceAccountId: <Matii service account id>
kubernetesServiceAccount: payments-reader
app: Payments
env: production
secretName: payments-secrets
refreshSeconds: 60
rolloutRestart:
- { kind: Deployment, name: payments-api }
SDKs#
- Go:
github.com/MATII-Technologies/matii-sc/go/matii - TypeScript / Node.js:
@matii/secrets - Python:
matii-secrets(Client(host=…, token=…).secrets(app=…, env=…)) - GitHub Actions:
MATII-Technologies/matii-sc/action@v1(GitHub OIDC, no stored token) - Terraform / OpenTofu: provider
matii-org/matii(data "matii_secrets",resource "matii_secret") - Kubernetes CSI: mount secrets as files without Kubernetes Secrets (Secrets Store CSI Driver provider)