Quickstart
Authenticate your workstation, link your project, and inject secrets into process memory in under 5 minutes.
Get up and running with Ray Secrets in under 5 minutes. By the end of this tutorial, your application will receive decrypted secrets injected directly into process memory without creating any plaintext .env files on disk.
Verify CLI Installation
Make sure the ray binary is installed and reachable in your current shell:
ray --versionIf the command is not found, follow the Installation Guide to install Ray CLI for your platform.
Interactive Terminal Mode: Ray CLI provides a zero-argument interactive experience. Running ray without subcommands opens a searchable menu that automatically inspects your authentication state and linked project, allowing you to run any workflow without memorizing flags:
rayAuthenticate Your Workstation
Authenticate the CLI against your Rcmade account:
ray loginThis opens a browser window to authorize your developer workstation. For headless containers or CI/CD pipelines, authenticate using a token:
ray login --token ray_pat_example_000000Verify your active session:
ray whoamiLink Your Project
Navigate to your application root directory and initialize the project link:
ray initThe interactive prompt lists your authorized workspaces and projects. Select your target project and default development environment.
This creates a .ray/workspace.json metadata file in your repository:
{
"workspaceId": "ws_01h8x4y2z9a7b6c5d4e3f210",
"projectId": "proj_9f8e7d6c5b4a",
"projectName": "my-application",
"defaultEnvironment": "development",
"environments": {
"development": "env_dev_01h8x4y2z9a7b6c5d4e3f211",
"staging": "env_stg_01h8x4y2z9a7b6c5d4e3f212",
"production": "env_prd_01h8x4y2z9a7b6c5d4e3f213"
}
}.ray/workspace.json contains only non-sensitive identifiers and should be committed to git. It tells ray which project secrets to load.
Configuration Tiers
Ray CLI distinguishes between project bindings, local overrides, and machine-level authentication:
.ray/workspace.json(Project Settings): Checked into version control. Maps project environments so every team member targets the same secret namespace..ray/local.json(Local Overrides): Machine-specific overrides.ray initautomatically adds this file to your.gitignore.~/.config/ray/config.json(User Session): Stored in your user home directory. Contains your personal session tokens and never touches project repositories.
Inject Secrets into Your Process
Launch your application through ray run. Place double-hyphens (--) before your command to separate CLI options from your program:
ray run -- npm run devray fetches your encrypted secrets, decrypts them directly in process memory, and passes them to your application as standard environment variables.
Verify In-Memory Injection
Confirm that environment variables are available to your process:
ray run -- sh -c 'echo "Database host: ${DATABASE_HOST:-configured}"'Check your project directory for .env files:
ls -la .env*No .env or .env.local files exist on disk. Secrets exist only in process memory while your application runs.
Next Steps
Now that your local development workflow is isolated from plaintext file storage, explore production automation and architectural details:
CI/CD with Service Tokens
Learn how to inject secrets into GitHub Actions, GitLab CI, and Docker runners with non-interactive tokens.
Zero-Disk Memory Injection
Explore the technical architecture of POSIX execve process boundary injection and ephemeral memory handling.
Ready to eliminate plaintext secrets?
Create a workspace to organize environments, invite your team, and generate scoped Service Tokens for CI/CD.