Skip to content

Universal tool for synchronizing ~/.secrets/ across multiple machines

License

Notifications You must be signed in to change notification settings

sobol-mo/secrets-sync-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Secrets Sync Manager

Universal tool for synchronizing ~/.secrets/ directory across multiple machines

Version License Platform


πŸ“‹ Overview

Secrets Sync Manager is a project-agnostic tool that helps you keep your secrets (API tokens, credentials, configuration files) synchronized across multiple machines using rsync over SSH.

✨ Features

  • πŸš€ Project-Agnostic: Works with Terraform, Docker Compose, Python, or any project
  • πŸ–₯️ Multi-Machine Support: Sync to/from multiple machines (desktop, laptops, VPS)
  • 🎨 Interactive GUI: Beautiful terminal UI with menu-driven interface
  • 🐧 Linux Integration: Desktop launcher for Linux Mint/Ubuntu
  • πŸ”„ Bidirectional Sync: Push (β†’) or Pull (←) secrets
  • πŸ” Dry-Run Mode: Preview changes before syncing
  • πŸ“¦ Batch Operations: Sync to all machines at once
  • πŸ”’ Secure: Uses SSH keys for authentication

🎯 Use Cases

Terraform

Keep terraform.tfvars synced across machines:

~/.secrets/projects/myapp/terraform/terraform.tfvars

Docker Compose

Sync .env files:

~/.secrets/projects/myapp/.env

API Keys

Centralize all credentials:

~/.secrets/api_keys/openai.txt
~/.secrets/api_keys/github_token.txt

πŸš€ Quick Start

Installation

# Clone repository
git clone https://github.com/sobol-mo/secrets-sync-manager.git
cd secrets-sync-manager

# Run installer
./install.sh

Configuration

Edit ~/.config/secrets-sync/machines.conf:

# Format: NAME|USER|HOST
LAPTOP|maxim|192.168.1.20
VPS|root|example.com

Usage

# Launch interactive mode
secrets-sync-tool

# Or use from application menu
# Menu β†’ System β†’ Secrets Sync Manager

πŸ“– Documentation


πŸ› οΈ How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Desktop    β”‚  1. Edit secrets locally
β”‚  ~/.secrets/β”‚  2. Run: secrets-sync-tool
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜  3. Select "Push" and target machine
       β”‚
       β”‚ rsync -avz ~/.secrets/ user@remote:~/.secrets/
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  VPS        β”‚  4. Secrets synced to remote
β”‚  ~/.secrets/β”‚  5. Ready to use!
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’‘ Example Workflow

Scenario: Update Terraform Secrets

# 1. Edit secrets on desktop
nano ~/.secrets/projects/myapp/terraform/terraform.tfvars

# 2. Launch sync manager
secrets-sync-tool

# 3. Select "Push secrets"
# 4. Select "All machines"
# 5. βœ… Secrets synced to all machines!

πŸ”§ Requirements

  • OS: Linux (Ubuntu, Debian, Linux Mint, etc.)
  • Shell: Bash
  • Tools: rsync, ssh
  • Optional: Desktop environment for menu integration

πŸ“ Directory Structure

~/bin/secrets-sync/
β”œβ”€β”€ secrets-sync              # Main executable
β”œβ”€β”€ install.sh                # Installation script
β”œβ”€β”€ uninstall.sh              # Uninstallation script
β”œβ”€β”€ README.md                 # Full documentation
β”œβ”€β”€ DIRECTORY.md              # Directory overview
└── config/
    └── machines.conf.example # Configuration template

πŸ”’ Security Best Practices

βœ… Do This

  • Use SSH keys (not passwords)
  • Set chmod 700 ~/.secrets
  • Set chmod 600 on secret files
  • Use different credentials for dev/staging/prod
  • Regularly backup ~/.secrets/ (encrypted)

❌ Don't Do This

  • Don't commit secrets to Git
  • Don't sync over unsecured networks
  • Don't share SSH keys between machines
  • Don't use root unless necessary

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

# Clone repository
git clone https://github.com/sobol-mo/secrets-sync-manager.git
cd secrets-sync-manager

# Make changes
nano secrets-sync

# Test locally
./secrets-sync

# Commit changes
git add .
git commit -m "feat: your feature description"
git push origin main

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Built for managing secrets across multiple development machines
  • Inspired by the need for simple, project-agnostic secret management
  • Created as part of DevOps teaching materials

πŸ“ž Support


πŸ—ΊοΈ Roadmap

v1.0.0 (Current)

  • βœ… Interactive terminal UI
  • βœ… Multi-machine support
  • βœ… Push/Pull operations
  • βœ… Dry-run mode
  • βœ… Desktop launcher

v1.1.0 (Planned)

  • Conflict detection and resolution
  • GPG encryption at rest
  • Backup before sync (with rollback)
  • Sync history and logs

v2.0.0 (Future)

  • GUI application (GTK/Qt)
  • Webhook notifications
  • Scheduled automatic syncs
  • Multi-directional sync (mesh)

⭐ Star History

If you find this tool useful, please consider giving it a star on GitHub!


Made with ❀️ by Maxim

Last Updated: 2026-01-27
Version: 1.0.0

About

Universal tool for synchronizing ~/.secrets/ across multiple machines

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages