/borzoi

make polyrepos easy

Primary LanguageGoGNU Affero General Public License v3.0AGPL-3.0

logo

borzoi

Make polyrepos easy!

Polyrepos are as cool as monorepos, if managed well.

Docs

Installation

go install github.com/automation-co/borzoi@latest

Getting Started

Borzoi helps you to easily replicate and share file structure.

You can use the borzoi command to run the borzoi command line tool.

Borzoi is a tool that makes it easy to manage your codebase.

It helps you a simple interface to standardize your git repos in the same manner.

For more information, please visit
https://github.com/automation-co/borzoi

Usage:
  borzoi [command]

Available Commands:
  clone       Clones the repos
  completion  Generate the autocompletion script for the specified shell
  freeze      Generates borzoi-lock.json
  generate    Generates the config file
  help        Help about any command

Flags:
  -h, --help     help for borzoi
  -t, --toggle   Help message for toggle

Use "borzoi [command] --help" for more information about a command.

Authentication

If you want to use borzoi with a private repository, you can use the --access flag to authenticate. Pass the access token as the value of the flag.

Make sure the personal access token has repo scope.

If you need help, creating the personal access token, please visit the GitHub API documentation

If you don't have a global git username or you want to use a different username, you can use the --username flag to authenticate. Pass the username as the value of the flag.

borzoi clone --access <access_token> --username <username>

Ignore

If you want to exclude certain directories when using the generate command, you can add a .borzoiignore file which can have a list of subdirectories whose path you wish to exclude.

Freeze

If you wish to save the current configuration of your multirepo you can use the freeze command to generate borzoi-lock.json which will have other crucial information regarding the commit, such as it's ID and branch other than the path and repo url. Here's an example borzoi-lock.json file :

// borzoi-lock.json
{
  "borzoi": {
    "repo": "https://github.com/automation-co/borzoi",
    "branch": "main",
    "commit": "3656b59d7951db4c38fca0a60c86c59cb8e7b92f"
  }
}

Example

// borzoi.json
{
  "automation-co/borzoi": "https://github.com/automation-co/borzoi.git",
  "automation-co/husky": "https://github.com/automation-co/husky.git",
  "dependencies/air": "https://github.com/cosmtrek/air.git",
  "dependencies/go-git": "https://github.com/go-git/go-git.git"
}

borzoi clone using this config file will result in

.
├── automation-co
│   ├── borzoi
│   └── husky
├── borzoi.json
└── dependencies
    ├── air
    └── go-git

Developed by @automation-co