The repos-validate plugin checks your repos.yaml file for correctness,
verifies repository accessibility, and can synchronize GitHub topics with local
tags.
- Configuration Syntax Validation: Confirms that
repos.yamlis properly formatted and parseable. - Repository Connectivity Check: Verifies that each repository exists and is accessible.
- Topic Synchronization: Synchronizes GitHub topics with config tags, adding
missing topics from GitHub to your local config and prefixing them with
gh:. - Automatic Backup: Creates timestamped backups before modifying
repos.yaml.
The plugin is installed as part of the repos workspace. You can build it from
the root of the project:
cargo build --releaseThe binary will be located at target/release/repos-validate. Ensure this
location is in your PATH, or move the binary to a directory like
/usr/local/bin.
repos validate [OPTIONS]This command performs several levels of validation:
- Syntax Validation (Default): By default,
repos validateonly parses therepos.yamlfile to ensure it is well-formed. No network calls are made. - Connectivity Check: When the
--connectflag is added, it performs the syntax check and also attempts to connect to the Git remote URL for each repository. This verifies that the repository exists and that you have the necessary access permissions. - GitHub Topic Synchronization: The
--sync-topicsoption (which requires--connect) compares the tags in yourrepos.yamlwith the repository topics on GitHub. It will suggest adding missing topics as tags (with agh:prefix) to your configuration. By itself, this option only shows a diff of the suggested changes.
This command is essential for ensuring your configuration is correct before
running bulk operations like clone or run.
-c, --config <CONFIG>: Specifies the path to the configuration file. Defaults torepos.yaml.--connect: Checks network connectivity by attempting to connect to each repository's remote URL.--sync-topics: Must be used with--connect. Compares repository topics on GitHub with local tags inrepos.yamland suggests changes. It will prefix tags sourced from GitHub withgh:. This option only prints a diff of the suggested changes; it does not modify the file.--apply: Must be used with--sync-topics. Applies the suggested topic synchronization changes directly to yourrepos.yamlfile. A backup of the originalrepos.yamlwill be created before changes are written.-h, --help: Prints help information.
This is the default behavior. It runs quickly and performs no network operations.
repos validateExample output:
✅ repos.yaml syntax is valid.
42 repositories in config
15 unique tags: api, backend, cli, deprecated, frontend, gh:automation, gh:cli, gh:rust, java, javascript, microservice, python, rust, typescript, web
Validation finished successfully.This will check the config file and also verify that every repository URL is accessible.
repos validate --connectExample output:
✅ repos.yaml syntax is valid.
42 repositories in config
15 unique tags: api, backend, cli, deprecated, frontend, gh:automation, gh:cli, gh:rust, java, javascript, microservice, python, rust, typescript, web
Validating repository connectivity...
✅ codcod/repos: Accessible.
✅ another/project: Accessible.
Validation finished successfully.This will check connectivity and show you which topics are on GitHub but are
missing from the tags in your repos.yaml. No files will be changed.
repos validate --connect --sync-topicsExample output:
✅ repos.yaml syntax is valid.
42 repositories in config
15 unique tags: api, backend, cli, deprecated, frontend, gh:automation, gh:cli, gh:rust, java, javascript, microservice, python, rust, typescript, web
Validating repository connectivity...
✅ codcod/repos: Accessible.
- Would add: ["gh:cli", "gh:rust", "gh:automation"]
✅ another/project: Accessible.
- Topics already synchronized
Validation finished successfully.This will check connectivity, find missing topics, and automatically add them as
tags (with a gh: prefix) to your repos.yaml.
repos validate --connect --sync-topics --applyExample output:
✅ repos.yaml syntax is valid.
42 repositories in config
15 unique tags: api, backend, cli, deprecated, frontend, gh:automation, gh:cli, gh:rust, java, javascript, microservice, python, rust, typescript, web
Validating repository connectivity...
✅ codcod/repos: Accessible.
- Topics to add: ["gh:cli", "gh:rust", "gh:automation"]
✅ another/project: Accessible.
- Topics already synchronized
Validation finished successfully.
Applying topic synchronization to repos.yaml...
✅ Created backup: "repos.yaml.backup.20251111_143022"
✅ Successfully updated repos.yaml
1 repositories were synchronizedWhen using --apply, the plugin automatically creates a backup before modifying
your configuration. Backup files are named with a timestamp pattern:
repos.yaml.backup.YYYYMMDD_HHMMSSYou can restore from a backup at any time:
cp repos.yaml.backup.20251111_143022 repos.yamlFor private repositories or to avoid rate limiting, set your GitHub token:
export GITHUB_TOKEN=your_github_personal_access_token
repos validate --connect0: All checks passed successfully.1: One or more validation checks failed.
- SSH:
git@github.com:owner/repo.git - HTTPS:
https://github.com/owner/repo.git