Connect from the environment
Set the credential in the environment of the process running Mirage, including on the server when your CLI connects remotely:mirage daemon restart after
exporting the token. The next workspace creation inherits the updated environment.
Restarting discards existing workspaces. See daemon commands.
workspace.yaml
mirage workspace delete credentials-demo.
The same pointer format works in credential fields for registered virtual CLIs.
Pointer fields
The
env source uses only key, with no ref. A source needing settings is
declared under secrets, and pointers use that instance’s name in from.
Read a dotenv file
Python needs thedotenv extra in the environment running Mirage. For the
uv tool CLI, run uv tool install 'mirage-ai[dotenv]'. In a Python
project, use uv add 'mirage-ai[dotenv]' and run its CLI with uv run mirage.
The Node package includes dotenv support.
.env
workspace.yaml
ref overrides the source’s configured path.
Other credential sources
Use these values in place of
from, ref and key in the mount pointer above.
Install source dependencies in the same environment that runs Mirage, using
the tool or project installation method described for dotenv.
AWS reads SecretString, not SecretBinary. A JSON object with string values
exposes its field names as keys; other text is available under key: value.
A 1Password field reference fetches that field. An item reference such as
op://Engineering/Slack lets key select a field by its label.
Source declarations accept source and optional config. Pointers inside a
source’s config can read only from env or dotenv. Custom sources must be
registered in the same process that creates the workspace.