Skip to content

set/code-backup

Repository files navigation

VSCode Config Export πŸš€

License: MIT Platform VSCode

A powerful, cross-platform tool for exporting, sharing, and installing VSCode configurations. Perfect for developers who want to sync their setup across multiple machines or share their configuration with team members.

✨ Features

  • πŸ”„ Bidirectional Sync: Export and install VSCode configurations
  • 🌍 Cross-Platform: Works on macOS, Linux, and Windows
  • πŸ“¦ Complete Backup: Settings, keybindings, and extensions
  • πŸ›‘οΈ Safe Installation: Automatic backup before changes
  • πŸ“‹ Multiple Formats: Bash, Batch, and Python scripts
  • 🎯 Team Ready: Perfect for standardizing team environments
  • πŸ“Š Detailed Reports: Clear summaries of exports and installations

πŸš€ Quick Start

Export Your Configuration

Using Make (Recommended):

git clone https://github.com/your-username/vscode-config-export.git
cd vscode-config-export
make setup
make export

Manual Method:

# Bash (macOS/Linux)
chmod +x scripts/export.sh
./scripts/export.sh

# Python (Cross-platform)
python3 scripts/export.py

# Windows
scripts\export.bat

Install Configuration

# Clone your exported config
git clone YOUR_REPO_URL
cd vscode-config-export

# Install using Make
make install

# Or manually
chmod +x scripts/install.sh
./scripts/install.sh

πŸ’Ύ Backup System

All export and install operations automatically create backups that are stored in git for version control and team sharing:

# Manual backup management
make backup              # Create backup of current config
make list-backups        # List all available backups
make restore-backup      # Show restore options
make backup-stats        # Show backup statistics

# Restore from specific backup
make restore-from BACKUP=exports/backup-20250903-140530

# Cleanup old backups
make clean-old-backups   # Remove backups older than 30 days

Backup Storage: All backups are stored in the backups/ directory and tracked in git for version control, team sharing, and collaboration. ⚠️ Security Note: Review backups for sensitive information before committing.

πŸ“ What Gets Exported

Component Description File
Settings All VSCode preferences, themes, editor config settings.json
Keybindings Custom keyboard shortcuts keybindings.json
Extensions Installed extensions list extensions.txt
Versioned Extensions Extensions with specific versions extensions-with-versions.txt

πŸ“– Usage Examples

Individual Developer

# Export your setup
make export

# On new machine
git clone https://github.com/yourusername/my-vscode-config.git
cd my-vscode-config
make install

Team Standardization

# Team lead exports standardized config
make export
git add .
git commit -m "feat: team VSCode configuration"
git push

# Team members install
git clone TEAM_REPO_URL
cd vscode-config-export
make install

πŸ”§ Available Commands

Use make help to see all available commands:

make help          # Show all commands
make setup         # Set up development environment
make export        # Export current config
make install       # Install exported config
make test          # Run tests
make lint          # Check code quality
make clean         # Clean temporary files

πŸ›‘οΈ Security Best Practices

  • Review Before Sharing: Check settings.json for sensitive information
  • Remove Personal Data: Remove personal file paths and API keys
  • Create Clean Versions: Use sanitized configs for team sharing

Sanitization Example

# Remove sensitive settings
cp settings.json settings-clean.json
# Manually remove sensitive keys or use jq:
jq 'del(.["github.accessToken"])' settings.json > settings-clean.json

🚨 Troubleshooting

Common Issues

"code: command not found"

# Install VSCode CLI (macOS/Linux)
# In VSCode: Cmd/Ctrl + Shift + P β†’ "Shell Command: Install 'code' command in PATH"

"Permission denied"

make setup  # This will fix permissions
# Or manually:
chmod +x scripts/*.sh scripts/*.py

"Extensions fail to install"

# Test individual extensions
cat extensions.txt | while read extension; do
  echo "Installing $extension..."
  code --install-extension "$extension" || echo "Failed: $extension"
done

Getting Help

πŸ“Š Compatibility

Platform Export Install Status
macOS βœ… βœ… Fully Supported
Linux βœ… βœ… Fully Supported
Windows βœ… βœ… Fully Supported

πŸ“ Project Structure

vscode-config-export/
β”œβ”€β”€ πŸ“‹ settings.json              # VSCode settings
β”œβ”€β”€ ⌨️  keybindings.json          # Custom keybindings
β”œβ”€β”€ 🧩 extensions.txt             # Extension list
β”œβ”€β”€ 🧩 extensions-with-versions.txt # Versioned extensions
β”œβ”€β”€ πŸ“ scripts/                   # All executable scripts
β”‚   β”œβ”€β”€ export.sh                 # Export script (Bash)
β”‚   β”œβ”€β”€ export.bat                # Export script (Windows)
β”‚   β”œβ”€β”€ export.py                 # Export script (Python)
β”‚   └── install.sh                # Install script (Bash)
β”œβ”€β”€ πŸ“ tests/                     # Test suite
β”œβ”€β”€ πŸ“ docs/                      # Documentation
β”œβ”€β”€ πŸ“ .github/                   # GitHub templates and workflows
β”œβ”€β”€ πŸ“„ Makefile                   # Development commands
β”œβ”€β”€ πŸ“¦ package.json               # Project metadata
β”œβ”€β”€ πŸ“š CONTRIBUTING.md            # Contribution guidelines
β”œβ”€β”€ πŸ“„ LICENSE                    # MIT License
β”œβ”€β”€ πŸ”’ SECURITY.md                # Security policy
β”œβ”€β”€ πŸ“‹ CHANGELOG.md               # Version history
└── πŸ“– README.md                  # This file

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for detailed guidelines.

Quick Start for Contributors:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and test: make test
  4. Lint your code: make lint
  5. Commit with conventional commits: git commit -m 'feat: add amazing feature'
  6. Push and create a Pull Request

πŸ“œ License

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

🌟 Acknowledgments

  • Thanks to the VSCode team for creating an amazing editor
  • Inspired by the developer community's need for better configuration management
  • Built with ❀️ by contributors worldwide

⭐ Star this repository if you find it useful!

Made with ❀️ for the VSCode community

Last updated: September 3, 2025

About

Export, archive and install your VSCode settings

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published