To enable remote caching using this project, follow these four steps to configure your Turborepo workspace with signature validation, environment variables, and dotenv-cli for command execution.
1. Enable Signature Validation
Update your turbo.json at the project root to include the signature option. This ensures artifact integrity and authenticity.
2. Install dotenv-cli
Install dotenv-cli as a development dependency. If you are in a monorepo, you may need to use the -W flag to install it at the workspace root.
3. Configure Environment Variables
Create a .env file at your project root. You must provide the following variables:
TURBO_API: Your API URL. Important: Do not include a trailing slash.TURBO_TEAM: Your team name. Important: Must begin with the prefix team_.TURBO_TOKEN: A valid Bearer auth token.TURBO_REMOTE_CACHE_SIGNATURE_KEY: Your secret key for signature verification.
Note: Add .env to your .gitignore. If using CI (e.g., GitHub Actions), ensure these variables are configured in your CI environment settings.
4. Update Scripts to use dotenv
Prefix your Turbo commands with dotenv -- to ensure the environment variables are loaded before execution. Update your package.json scripts accordingly.
{
"remoteCache": { "signature": true }
}