Search docs

Jump to a BRB documentation page

Command reference

brb init

Register a local git repository with BRB and create or attach to its remote project record.

Reference
https://docs.brbgit.com/brb-init

Syntax

bash
brb init [--repo <name>] [--source <path>] [--base-url <url>]

What it does

  1. 1Resolves the git root for the provided source path or current directory.
  2. 2Finds or creates the remote BRB repo using the requested repo name.
  3. 3Creates or attaches that repo for the currently authenticated BRB user.
  4. 4Writes the local registry entry to ~/.brb/registry.json.

Parameters

ParameterDescriptionDefault
--repoRemote repo name to use. If omitted, BRB suggests the package.json name first and falls back to the git root directory name.
--sourceLocal repo path. Defaults to the current working directory.
--base-urlBRB service URL. Defaults to BRB_BASE_URL when present or https://app.brbgit.com otherwise.

Example

bash
cd ~/github/sample
brb init

Authentication

Login required

Run brb login before brb init. Repo creation is private and scoped to the authenticated owner.