> ## Documentation Index
> Fetch the complete documentation index at: https://capy.sc/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Ruby & Rails Secrets Management with Capy

> End-to-end encrypted secrets for Ruby and Rails. Wrap bundle exec, rspec, or rails server with Capy — keep ENV["KEY"] working, drop dotenv plaintext.

Use `capy run` to decrypt `.env` and pass the plaintext values to your Ruby process. Your code reads env vars with `ENV["KEY"]` or gems like `dotenv`.

<Steps>
  <Step title="Install the CLI">
    <CodeGroup>
      ```bash brew theme={null}
      brew install capysc/tap/capy
      ```

      ```bash npm theme={null}
      npm install -g @capysc/cli
      ```

      ```bash bun theme={null}
      bun add -g @capysc/cli
      ```
    </CodeGroup>
  </Step>

  <Step title="Sync your secrets">
    ```bash theme={null}
    capy
    ```
  </Step>

  <Step title="Run your app">
    ```bash theme={null}
    capy run -- ruby app.rb
    capy run -- bundle exec rails server
    capy run -- bundle exec rspec
    ```

    Read env vars the standard way:

    ```ruby theme={null}
    db_url = ENV["DATABASE_URL"]
    ```
  </Step>

  <Step title="Invite a teammate">
    ```bash theme={null}
    capy invite teammate@example.com
    ```
  </Step>

  <Step title="Deploy">
    ```bash theme={null}
    capy deploy
    ```
  </Step>
</Steps>

## What's next

<Card title="Running your app" icon="play" href="/using/running-your-app" horizontal>
  The full story on `capy run`.
</Card>
