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 / Option | Type | Description |
|---|---|---|
-p, --project <id_or_name> | string | Target project ID or slug to link or query, bypassing interactive selection |
-e, --env <name>(--environment <name>) | string | Target environment name (e.g. development, staging, production) to read or modify |
-s, --scope <path> | string | Subdirectory 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>) | string | Filter secret keys by case-insensitive substring match (e.g. --search DB_) |
--reveal | boolean | Display plaintext secret values in the terminal table instead of masking characters |
-b, --base(-t, --team) | boolean | Fetch canonical team environment secrets, ignoring personal workstation overrides (recommended for CI/CD) |
--offline | boolean | Run using encrypted local disk cache without connecting to the remote Ray Secrets API server |
--ci | boolean | Optimize execution for headless CI/CD runners (disables spinners, prompts, colors, and update checks) |
-q, --quiet | boolean | Silence banners, progress spinners, and status output; only print process output and critical errors |
--json | boolean | Format 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 list2. List secrets for a specific environment
Queries secrets from an explicit environment rather than the active workspace default.
ray list --env production3. Display plaintext values across all secrets in terminal
Reveals unmasked values for all secrets after an interactive confirmation prompt.
ray list --reveal4. 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 --jsonExit Codes
| Code | Meaning | Recommended Action |
|---|---|---|
| 0 | Success. The command completed with no errors. | None required. |
| 1 | Runtime or execution failure. A child process returned non-zero status or a general error occurred. | Inspect process output or run with --verbose. |
| 2 | Authentication failed. Token is missing, expired, or invalid. | Run `ray login` or update `RAY_TOKEN`. |
| 3 | Configuration or binding error. Project or environment context was not found. | Run `ray init` or specify `--project` and `--env`. |
| 4 | Network 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.