Documentation · Usage · Reading credentials
The command line
The credvane command line reads credentials and hands them to the programs that need them, on a laptop, in a script or in a pipeline. It only reads: specs, identities and policies stay in the web app or Terraform.
Three ways to sign in
| Where | How | Reads |
|---|---|---|
| Your laptop | credvane login and approve in the browser | Every credential you hold, for 12 hours |
| A script, cron job or agent | An exchange token you create in the web app | Your credentials for the specs you list |
| A CI job or a pod | --oidc: the job's own identity token | What the identity's trust policy allows |
Every read goes through the same credentials API as any application, so every read is audited.
Install
Download the archive for your system from the releases of credvane-cli: Linux, macOS and Windows, on amd64 and arm64. Check it against SHA256SUMS from the same release.
sha256sum --ignore-missing -c SHA256SUMS
tar -xzf credvane_v0.1.0_linux_amd64.tar.gz
install credvane_v0.1.0_linux_amd64/credvane ~/.local/bin/Each release is signed and has a build provenance attestation, both made by the release workflow with its GitHub identity (Sigstore; there is no key to download). Check either one before you trust the checksums, with the GitHub CLI or with cosign:
gh attestation verify credvane_v0.1.0_linux_amd64.tar.gz -R commitwisedev/credvane-clicosign verify-blob --bundle SHA256SUMS.bundle \
--certificate-identity-regexp '^https://github\.com/commitwisedev/credvane-cli/\.github/workflows/release\.yaml@' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com SHA256SUMSOr build it with Go 1.26 or later; Go's checksum database checks the source instead:
go install credvane.dev/cli/cmd/credvane@latestThe CLI and the CI integrations are open source under the Apache-2.0 licence, in commitwisedev/credvane-cli.
Sign in on your laptop
credvane login opens Credvane in your browser. Check the machine name and choose Approve. The session is kept in the system keychain (macOS, Windows, or the Secret Service on Linux), or a file only you can read where there is none.
$ credvane login --url https://credvane.example.com
Opening Credvane in your browser to sign in. If it does not open, visit:
https://credvane.example.com/cli-login?challenge=...
Waiting for you to approve the login…
Logged in to https://credvane.example.com as [email protected] until 2026-12-03 09:47 UTC.
You hold 3 credentials; saved in the Secret Service keyring.- Over SSH or without a browser, it prints a link instead: approve on any machine and paste the code it shows.
--no-browserdoes this on purpose. The code works once, for five minutes, and only for the CLI that asked. - Sessions end after 12 hours, with
credvane logout, from Exchange tokens → CLI sessions in the web app, or as soon as your account is deactivated.
$ credvane ls
KEY NAME SOURCE AVAILABLE
github-packages GitHub packages (read) github yes
openai-api OpenAI API apikey:openai noAVAILABLE is no when you hold no active credential for the spec: add one on the Credentials page.
Run a program with its credentials
credvane run reads the credentials, sets them as environment variables, and becomes the program after --, so signals and the exit code go straight to it. The variable name is the spec key in capitals, or the name you give with spec-key=NAME.
credvane run github-packages -- ./deploy.sh --env staging # sees GITHUB_PACKAGES
credvane run github-packages=NPM_TOKEN -c openai-api=OPENAI_KEY -- npm publish- All or nothing. If any read fails, the program does not start.
- No silent shadowing. A variable already set stops the run, unless you pass
--override. - Nothing printed.
runnever writes a value to the terminal or a file, and does not pass its own token on.
Keep the mapping next to the program in a dotenv file. credvane:// values are read from Credvane; the rest pass through.
# app.env: safe to commit, it holds no secrets
NPM_TOKEN=credvane://github-packages
OPENAI_API_KEY=credvane://openai-api
LOG_LEVEL=infocredvane run --config app.env -- ./serveWhen a tool needs a value or a file
get prints one value, env prints several or writes a file created readable only by you, and inject fills a configuration template. Prefer run where you can: a value in your shell or on disk stays there.
curl -H "Authorization: Bearer $(credvane get openai-api)" https://api.example.com/v1/me
eval "$(credvane env github-packages=NPM_TOKEN)" # export lines for sh, bash, zsh
credvane env --config app.env --format dotenv --out .env.local # a file only you can read
credvane inject -i config.yaml.tmpl -o config.yaml # fills {{ credvane://spec-key }}Scripts and agents
Where no one is there to approve a browser login, create one on Exchange tokens → Create token: name the program, pick only the specs it needs, and set an expiry. Give it to the program as CREDVANE_TOKEN, or save it once:
op read op://Private/credvane/token | credvane login --url https://credvane.example.com| Setting | Flag | Environment |
|---|---|---|
| Credvane's address | --url | CREDVANE_URL |
| The exchange token | --token-file FILE | CREDVANE_TOKEN |
Where login keeps its file | CREDVANE_CONFIG |
The CLI sends a token only over HTTPS (or plain HTTP to localhost), never follows a redirect, and never prints a token.
In CI and pods
Pass --oidc and the CLI reads with the identity token the platform gives the job, matched against a trust policy. Nothing is stored with the workload. Before a value is used, it is registered with the platform's log masking, so a value printed by a later step shows as ***.
--oidc | Platform | Masking |
|---|---|---|
github | GitHub, Gitea and Forgejo Actions | Yes |
gitlab | GitLab CI, from the job's id_tokens | No: use run to keep values out of the log |
buildkite | Buildkite agents | Yes |
file:PATH, env:VAR | Kubernetes projected tokens, any other issuer | – |
auto | Whichever of these the environment shows | As found |
Where the CLI asks the platform for a token, give the identity's id with --identity; the audience is then set for you.
In GitHub, Forgejo and Gitea Actions, Buildkite and GitLab CI, the CI integrations do this in one step. Use the CLI directly when you want run, or on another platform.
GitHub Actions
permissions:
id-token: write
steps:
- env:
CREDVANE_URL: https://credvane.example.com
CREDVANE_IDENTITY: 0f3b6c1e-...
run: credvane env --oidc github github-packages=NPM_TOKEN --format github-env
- run: npm publish # sees NPM_TOKEN; the value is masked in the logGitLab CI
deploy:
id_tokens:
CREDVANE_ID_TOKEN:
aud: https://credvane.example.com/w/0f3b6c1e-...
script:
- credvane run --url https://credvane.example.com --oidc gitlab github-packages -- ./deploy.shKubernetes
# A projected service account token at /var/run/secrets/credvane/token
credvane run --url https://credvane.example.com --oidc auto github-packages -- ./serveWhen something goes wrong
Exit code 0 is success, 1 means Credvane refused or could not be reached, 2 a mistake on the command line; run exits with the program's own code. Messages never contain a value or a token.
| Message | What to do |
|---|---|
Credvane did not accept the token | The token or session expired or was revoked: log in again |
this token may not read "x" | Check the key with credvane ls; create a token that includes it |
no active credential for "x" | Add or fix it on the Credentials page |
no trust policy lets this token read "x" | Compare the claims the message lists with the policy |
this job has no OIDC token | Add permissions: id-token: write; pull requests from forks get none |
X is already set in the environment | Unset it, map to another name, or pass --override |