Profiles & Login

The CLI stores server URLs and API keys in named profiles inside an owner-only TOML file. You can keep several — a personal store, a team store, a CI key — and pick one per command.

Logging in

vela login asks for the server URL and an API key, verifies them against /api/v1/info, and only then writes the profile:

$ vela login
Server URL: https://store.example.com
API key:                                   # input is hidden
Logged in to https://store.example.com as "laptop" (scope admin).
Profile "main" saved to /home/you/.config/vela/config.toml
  • The profile is called main unless you pass --profile NAME.
  • The URL comes from --url or VELA_URL when set; otherwise you are asked. When updating an existing profile, its URL is offered as the default: Server URL [https://store.example.com]:. There is no built-in default server.
  • The key must look like vela_<id>_<secret>; anything else is rejected before contacting the server.
  • Re-running login for an existing profile keeps its other settings, such as default_visibility.

Non-interactive login

Without a terminal, the key is read from the first line of stdin and the URL must come from --url or VELA_URL:

echo "$VELA_KEY" | vela login --url https://store.example.com --profile ci

In CI you often do not need a profile at all: set VELA_URL and VELA_KEY in the job's environment and every command uses them. See Scripting & CI.

Checking the connection

$ vela whoami
Key:      laptop (7apjsr2yg5)
Scope:    admin
Prefix:   -
Server:   https://store.example.com (velad v0.9.0)
Profile:  main

$ vela version
vela v0.9.0 (commit 81a2424f3d3b, built 2026-10-31T04:13:51Z, go1.27.2, linux/amd64) (API v1)
server v0.9.0 at https://store.example.com (API v1)

whoami shows the key's name, ID, scope and prefix — never the secret. Both commands fail with a clear message if the server's API major version differs from the CLI's.

Working with several profiles

vela login --profile team --url https://files.example.org
vela --profile team ls
VELA_PROFILE=team vela put notes.md shared/

vela logout --profile team    # removes the profile and its key

The first profile you create becomes default_profile. Commands without --profile use it.

The config file

Profiles live in a TOML file at the platform configuration directory plus vela/config.toml:

PlatformDefault location
Linux, BSD$XDG_CONFIG_HOME/vela/config.toml, usually ~/.config/vela/config.toml
macOS~/Library/Application Support/vela/config.toml (or $XDG_CONFIG_HOME/vela/config.toml when set)
Windows%AppData%\vela\config.toml

Override it with --config PATH or VELA_CONFIG.

default_profile = 'main'

[profiles]
[profiles.main]
url = 'https://store.example.com'
key = 'vela_7apjsr2yg5_Rpnr-qrO1g8AP3FPVFS9mVpIng-pO3Tf-eW2jnoAR0c'
default_visibility = 'private'   # optional: used by put/new without a visibility flag

[profiles.team]
url = 'https://files.example.org'
key = 'vela_k3aexph8fa_…'
default_profilestring

Profile used when none is selected.

profiles.NAME.urlstring

Server origin.

profiles.NAME.keystring

Full API key.

profiles.NAME.default_visibilitystring, optional

public, unlisted or private. Applied by put and new when you pass no --public/--unlisted/--private. Without it, the server's VELA_DEFAULT_VISIBILITY applies. Edit the file to set it.

Permissions

The file holds credentials, so the CLI protects it like SSH protects private keys:

  • Writes are atomic (temporary file, then rename).
  • On Unix the file is 0600 and its directory 0700.
  • On Windows the file and the directory created for it get a protected DACL that grants access only to the current user and SYSTEM, without inheritance.
  • The CLI refuses to load a config that others can read and tells you how to fix it (chmod 600 … on Unix, icacls on Windows). This exits with code 1.

How the connection is resolved

For each command the CLI determines the server and key in this order:

  1. Profile: --profile, then VELA_PROFILE, then default_profile.
  2. URL: --url, then VELA_URL, then the profile's URL.
  3. Key: VELA_KEY, then the profile's key. There is intentionally no --key flag, so keys never land in shell history or ps output.

So VELA_URL=… VELA_KEY=… vela ls works with no config file at all.

Key masking

The CLI never prints a full key. vela whoami -v adds the profile's key masked to its ID, for example vela_7apjsr2yg5_****, which is handy for checking which key a profile holds. Verbose HTTP traces omit the Authorization header.

When you log out of the default profile, another remaining profile (alphabetically first) becomes the default.