Skip to content

A tool to synchronize a VS Code workspace with directories in a source repositories folder. It can add new directories and optionally remove directories that no longer exist.

License

Notifications You must be signed in to change notification settings

h0uter/code-workspace-sync

Repository files navigation

VS Code Workspace Synchronizer

A script to synchronize a VS Code workspace with directories in a source repositories folder. It can add new directories and optionally remove directories that no longer exist.

uv tool install code-workspace-sync

For help and available commands, run: code-workspace-sync --help:

usage: code-workspace-sync [-h] [--src-repos SRC_REPOS]
                           [--workspace WORKSPACE] [--remove-missing]
                           [--dry-run] [--verbose]

Synchronize VS Code workspace with src_repos directories

options:
  -h, --help            show this help message and exit
  --src-repos SRC_REPOS
                        Path to the source repositories directory (default:
                        src_repos)
  --workspace WORKSPACE
                        Path to the VS Code workspace file (default: auto-
                        detect in current directory)
  --remove-missing      Remove directories from workspace that no longer exist
                        in src_repos
  --dry-run             Show what would be changed without making any
                        modifications
  --verbose, -v         Enable verbose output

Examples:
  # Basic sync (add missing directories)
  code-workspace-sync

  # Sync with custom paths
  code-workspace-sync --src-repos ./repositories --workspace my-workspace.code-workspace

  # Sync and remove missing directories
  code-workspace-sync --remove-missing

  # Dry run to see what would change
  code-workspace-sync --dry-run --verbose

  # Full sync with verbose output
  code-workspace-sync --remove-missing --verbose

About

A tool to synchronize a VS Code workspace with directories in a source repositories folder. It can add new directories and optionally remove directories that no longer exist.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published