> ## 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.

# capy rotate: Rotate Managed Credentials

> Rotate credentials linked with capy connect and sync the resulting values.

## Synopsis

```bash theme={null}
capy rotate API_KEY
capy rotate --all --yes
capy rotate API_KEY --provider stripe --yes
```

## Description

`capy rotate` rotates a credential already managed through `capy connect`. With no variable name, it prompts for one. `--all` rotates every managed credential on the active branch and ignores a positional variable when both are supplied.

For an unmanaged value, Capy can first link it to a credential provider and then rotate it. In non-interactive use, specify `--provider` when Capy cannot determine the provider. A successful rotation updates `.env`, syncs by default, and can continue to deploy when run unattended.

## Flags

| Flag | Description |
| - | - |
| `--all` | Rotate every managed credential on the active branch. |
| `--no-push` | Update `.env` without syncing. |
| `-y, --yes` | Skip prompts and run rotate, sync, and deploy unattended. |
| `--skip-prompts` | Alias for `--yes`. |
| `--non-tty` | Never prompt; resolve choices from flags or fail. |
| `--provider <name>` | Provider to use when promoting an unmanaged variable. |

## See also

* [`capy connect`](/docs/cli/connect)
* [`capy list`](/docs/cli/list)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.