Skip to Content
RcmadeDocs
Ray SecretsReferenceCLI ReferenceSecrets

ray list

Display all secret keys for an environment in a clean, masked table

Display all secret keys for an environment in a clean, masked table

Synopsis

ray list [options]

Flags & Options

Flag / OptionTypeDescription
-p, --project <id_or_name>stringTarget project ID or slug to link or query, bypassing interactive selection
-e, --env <name>(--environment <name>)stringTarget environment name (e.g. development, staging, production) to read or modify
-s, --scope <path>stringSubdirectory path or workspace scope to target instead of auto-detecting from the working directory (e.g. apps/web or packages/backend)
--search <query>(--query <query>)stringFilter secret keys by case-insensitive substring match (e.g. --search DB_)
--revealbooleanDisplay plaintext secret values in the terminal table instead of masking characters
-b, --base(-t, --team)booleanFetch canonical team environment secrets, ignoring personal workstation overrides (recommended for CI/CD)
--offlinebooleanRun using encrypted local disk cache without connecting to the remote Ray Secrets API server
--cibooleanOptimize execution for headless CI/CD runners (disables spinners, prompts, colors, and update checks)
-q, --quietbooleanSilence banners, progress spinners, and status output; only print process output and critical errors
--jsonbooleanFormat command output as structured JSON for scripting, automation, and piping

Common Examples

1. List all secret keys for the current environment

Displays a table of all keys, scopes, and masked values for the active workspace environment.

ray list

2. List secrets for a specific environment

Queries secrets from an explicit environment rather than the active workspace default.

ray list --env production

3. Display plaintext values across all secrets in terminal

Reveals unmasked values for all secrets after an interactive confirmation prompt.

ray list --reveal

4. Filter secret keys by case-insensitive query

Searches secret keys matching a substring to inspect only relevant configuration.

ray list --search DB_

5. Export all secrets formatted as structured JSON

Outputs the complete key-value dictionary as structured JSON for automation pipelines.

ray list --json

Exit Codes

CodeMeaningRecommended Action
0Success. The command completed with no errors.None required.
1Runtime or execution failure. A child process returned non-zero status or a general error occurred.Inspect process output or run with --verbose.
2Authentication failed. Token is missing, expired, or invalid.Run `ray login` or update `RAY_TOKEN`.
3Configuration or binding error. Project or environment context was not found.Run `ray init` or specify `--project` and `--env`.
4Network or API failure. Failed to reach the Ray Secrets vault.Check internet connection or run `ray doctor`.

Ready to eliminate plaintext secrets?

Create a workspace to organize environments, invite your team, and generate scoped Service Tokens for CI/CD.