Where the Hell Do I Put This Token? Syncing Claude Code Secrets to 3 Macs with the 1Password CLI
📰 Dev.to · Kohei Aoki
Sync API tokens across multiple Macs using 1Password CLI to keep secrets secure and easily rotatable
Action Steps
- Install the 1Password CLI on each Mac
- Create a 1Password vault to store API tokens and secrets
- Configure the op CLI to sync secrets to each Mac
- Update config files to reference environment variables instead of plaintext secrets
- Rotate API tokens in one place using 1Password
Who Needs to Know This
Developers and DevOps teams can benefit from this approach to securely manage API tokens and secrets across multiple machines
Key Insight
💡 Use 1Password CLI to keep API tokens and secrets secure and easily rotatable across multiple machines
Share This
💡 Sync API tokens securely across multiple Macs with 1Password CLI!
Key Takeaways
Sync API tokens across multiple Macs using 1Password CLI to keep secrets secure and easily rotatable
Full Article
I run Claude Code on three Macs and got tired of pasting API tokens into .mcp.json on each one. Here's the dead-simple two-script setup I landed on: keep every secret in 1Password, sync it to each Mac with the op CLI, and let config files reference env vars only. No plaintext in git, no copy-pasting, one place to rotate.
DeepCamp AI