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

WhereHowReads
Your laptopcredvane login and approve in the browserEvery credential you hold, for 12 hours
A script, cron job or agentAn exchange token you create in the web appYour credentials for the specs you list
A CI job or a pod--oidc: the job's own identity tokenWhat 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-cli
cosign 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 SHA256SUMS

Or build it with Go 1.26 or later; Go's checksum database checks the source instead:

go install credvane.dev/cli/cmd/credvane@latest

The 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-browser does 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  no

AVAILABLE 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. run never 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=info
credvane run --config app.env -- ./serve

When 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
SettingFlagEnvironment
Credvane's address--urlCREDVANE_URL
The exchange token--token-file FILECREDVANE_TOKEN
Where login keeps its fileCREDVANE_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 ***.

--oidcPlatformMasking
githubGitHub, Gitea and Forgejo ActionsYes
gitlabGitLab CI, from the job's id_tokensNo: use run to keep values out of the log
buildkiteBuildkite agentsYes
file:PATH, env:VARKubernetes projected tokens, any other issuer–
autoWhichever of these the environment showsAs 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 log

GitLab 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.sh

Kubernetes

# A projected service account token at /var/run/secrets/credvane/token
credvane run --url https://credvane.example.com --oidc auto github-packages -- ./serve

When 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.

MessageWhat to do
Credvane did not accept the tokenThe 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 tokenAdd permissions: id-token: write; pull requests from forks get none
X is already set in the environmentUnset it, map to another name, or pass --override