Skip to content

Repository files navigation

MIT licensed NPM Version Donation Donation Donation

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-kit configuration 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-kit

Or run directly with npx:

npx repo-starter-kit --repo owner/name --package @your/package

Usage

Basic example:

repo-starter-kit --repo daiyam/temp --package @daiyam/default --keep-labels

Options

  • -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 a repo-starter-kit configuration file to apply.
  • --keep: Do not delete missing items. Defaults to false.
  • -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 -k

Configuration package

The configuration package need to be prefixed:

  • --package @daiyam/default will load the package @daiyam/repo-starter-kit-default

At its root, it needs to have one of the following file:

  • repo-starter-kit.yml
  • repo-starter-kit.yaml
  • repo-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: 1

Examples

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.

Ko-fi ko-fi.com/daiyam
Liberapay liberapay.com/daiyam/donate
PayPal paypal.me/daiyam99

License

Copyright © 2025-present Baptiste Augrain

Licensed under the MIT license.

About

CLI to bootstrap and sync repository labels, issues and config.

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages