Skip to Content
RcmadeDocs
Ray SecretsReferenceCLI ReferenceSystem

ray doctor

Run a pragmatic security and health audit on your repository, secrets, and configuration

Run a pragmatic security and health audit on your repository, secrets, and configuration

Synopsis

ray doctor [options]

Flags & Options

Flag / OptionTypeDescription
--fixbooleanAutomatically apply safe remediation fixes for detected configuration or security issues
-y, --yes(--force)booleanAutomatically answer yes to all confirmation prompts (ideal for automated CI/CD scripts)
--strict(--exit-code)booleanAbort execution immediately with an exit code if any required secret is missing, empty, or drifting
--verbosebooleanEnable debug logging showing environment resolution, injected key names, and execution metadata
--offlinebooleanRun using encrypted local disk cache without connecting to the remote Ray Secrets API server
-q, --quietbooleanSilence banners, progress spinners, and status output; only print process output and critical errors
--cibooleanOptimize execution for headless CI/CD runners (disables spinners, prompts, colors, and update checks)

Common Examples

1. Run comprehensive security and health audit

Scans your workspace repository for tracked secret files, insecure permissions, template drift, placeholder values, and API connectivity.

ray doctor

2. Automatically heal Git hygiene and template drift issues

Remediates detected issues: untracks accidental .env files from Git, updates .gitignore rules, fixes file permissions, and reconciles template drift.

ray doctor --fix

3. Auto-remediate issues non-interactively

Bypasses interactive confirmation prompts with -y when applying automatic fixes.

ray doctor --fix --yes

4. Fail-fast CI/CD pipeline gate

Exits with non-zero exit code 1 if any warning, security flaw, or configuration drift is detected, enforcing strict quality in automated pipelines.

ray doctor --strict --ci

5. Display detailed diagnostic trace for all checks

Outputs verbose diagnostic information including check timings, skipped checks, and system metadata.

ray doctor --verbose

6. Perform local repository and permission checks without network calls

Runs offline diagnostics strictly against local files and Git history, bypassing remote API connectivity checks.

ray doctor --offline

7. Emit structured JSON audit report for compliance

Outputs raw JSON diagnostic report including check statuses, warnings, and remediation suggestions for automated ingestion.

ray doctor

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.