CLI reference/Team and access/identities
clavis identities create
Create a machine or workload identity and its first token
sh
clavis identities create NAME [flags]Create a machine identity and print its first token (shown once), or set up keyless OIDC trust.
Examples
Token for a deploy server
sh
clavis identities create deploy-bot --role Developer --project web-app --identity-env prodGitHub Actions, no stored token
sh
clavis identities create github-actions \
--oidc github --repo acme/web --branch main --gh-environment production \
--role Developer --project web-app --identity-env prodGitLab CI
sh
clavis identities create gitlab-ci \
--oidc gitlab --repo group/project --branch main --audience clavisKubernetes service account
sh
clavis identities create k8s-deployer \
--oidc kubernetes --issuer https://kubernetes.default.svc.cluster.local \
--audience clavis --k8s-namespace apps --k8s-service-account deployerAWS IAM role
sh
clavis identities create aws-ci --aws-account 123456789012 \
--aws-arn 'arn:aws:iam::123456789012:role/github-*' \
--project web-app --identity-env devGoogle Cloud service account
sh
clavis identities create gcp-deployer \
--oidc gcp --gcp-service-account deployer@project.iam.gserviceaccount.comAny OIDC issuer
sh
clavis identities create ci \
--oidc generic --issuer https://idp.example.com --audience clavis \
--claim ref=refs/heads/mainFlags
--audience string- OIDC audience (default clavis for GitHub/GitLab)
--aws-account string- AWS account ID for SigV4 trust
--aws-arn string- AWS ARN glob for SigV4 trust
--aws-user-id string- AWS user ID glob for SigV4 trust
--branch string- branch claim
--claim stringArray- additional OIDC claim condition key=value
--expires-in-days int- token lifetime (agents default to 1 day, max 7)
--gcp-service-account string- GCP service account email claim
--gh-environment string- GitHub environment claim
--identity-env string- environment glob scope
--issuer string- OIDC issuer URL
--k8s-namespace string- Kubernetes namespace for service account auth
--k8s-service-account string- Kubernetes service account name
--oidc string- oidc provider preset: github, gitlab, kubernetes, gcp, or generic
--repo string- repository claim (GitHub owner/name or GitLab project path)
--role string- role granted to a machine identity (agents always get read-names + use)
--type string- machine or agent Default:
machine
Details
With OIDC, the pipeline exchanges its own token at POST /api/v1/auth/oidc (AWS: a signed STS GetCallerIdentity request at /api/v1/auth/aws) for a short-lived Clavis token.
Global flags
These work with every command.
--debug- enable debug logging
--env string- environment slug
--json- output machine-readable JSON
--org string- organization slug
--overlay string- tenant/region overlay slug
--path string- folder path (default /)
--project string- project slug
--server string- Clavis server URL (default: from .clavis.yaml or saved login)
-h, --help- help for any command