Codespaces Secret Sync

Sync user Codespaces secret repository access so multiple secrets match a base secret (defaults to first listed secret).

ekroon b4e349a 2 files · 7.2 KB Updated

File contents

Codespaces Secret Sync

Use this skill when you want multiple user Codespaces secrets to share the same selected-repository access as one base secret.

What it does

  • Reads the selected repositories from a base secret (--base-secret, or first listed secret by default).
  • Syncs other secrets to that same repo set.
  • Supports dry-run (default) and apply mode.

Prerequisites

  • gh CLI authenticated for the target account (gh auth status)
  • python3

Script

scripts/sync_codespaces_secret_repos.py

Usage

Dry-run all user Codespaces secrets except the base secret:

python3 scripts/sync_codespaces_secret_repos.py

Apply for all secrets:

python3 scripts/sync_codespaces_secret_repos.py --apply

Apply only for specific secrets:

python3 scripts/sync_codespaces_secret_repos.py --apply --secrets SECRET_A SECRET_B SECRET_C

Use a different base secret:

python3 scripts/sync_codespaces_secret_repos.py --apply --base-secret MY_BASE_SECRET

Add missing repos only (do not remove extras):

python3 scripts/sync_codespaces_secret_repos.py --apply --add-only

ekroon/agent-skills/tree/main/skills/codespaces-secret-sync commit b4e349a955

Frequently asked questions

npx skillmds@latest add ekroon/codespaces-secret-sync