repo-starter-kit
v0.7.1
Published
CLI to bootstrap and sync repository labels, issues, branch rulesets and config.
Maintainers
Readme
repo-starter-kit
Command-line helper to bootstrap and sync repository settings (labels, issues, branch rulesets and basic config) from a reusable package or local files.
Why use this tool?
- Reuse a central
repo-starter-kitconfiguration published as an npm package or provide local files to keep repositories consistent. - Manage issue templates and labels programmatically.
- Lightweight CLI with interactive prompts when needed.
Quick start
Install globally with npm:
npm install -g repo-starter-kitOr run directly with npx:
npx repo-starter-kit --repo owner/name --package @your/packageUsage
Basic example:
repo-starter-kit --repo daiyam/temp --package @daiyam/default --keep-labelsOptions
-r, --repo <owner/name>: Target repository (OWNER/NAME). Required.-c, --create: Create the repository if it does not exist-p, --package <name>: An npm package or a direct directory that includes arepo-starter-kitconfiguration file to apply.--keep: Do not delete missing items. Defaults tofalse.-o, --only <resources>: List of resources to only sync.-v, --version: Show version number.
Examples
- Apply a published starter package to a repository:
repo-starter-kit -r myuser/myrepo -p @myorg/myconfig- Apply local labels file and an issue template (do not remove existing labels):
repo-starter-kit -r myuser/myrepo -l labels.yml -i issue.md -kConfiguration package
The configuration package need to be prefixed:
--package @daiyam/defaultwill load the package@daiyam/repo-starter-kit-default
At its root, it needs to have one of the following file:
repo-starter-kit.ymlrepo-starter-kit.yamlrepo-starter-kit.json
With its content as:
labels: <path to labels file>
issue: <path to issue file>
rulesets: <path to branch rulesets file>Each <path> can be either a relative file path inside the package or an npm URL that references another published package (for example npm:@scope/reusable-kit/labels.yml).
For reference, please check https://github.com/daiyam/repo-starter-kit-default.
Branch rulesets
Each ruleset entry mirrors the payload accepted by the GitHub branch rulesets API. The file must contain an array of objects, for example:
- name: Protect main
enforcement: active
target: branch
conditions:
ref_name:
include:
- refs/heads/main
rules:
- type: pull_request
parameters:
required_approving_review_count: 1Examples
The examples/ directory in this repository contains ready-to-use folders showing how to bundle labels, issues, and branch rulesets. Use them directly:
npx repo-starter-kit --repo <owner/name> --package ./examples/basic/or publish one of the folders as an npm package (each folder already includes a repo-starter-kit.yml manifest) so you can pass --package @scope/name.
Donations
Support this project by becoming a financial contributor.
License
Copyright © 2025-present Baptiste Augrain
Licensed under the MIT license.
