bbctl

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README

bbctl

bbctl is a CLI tool for managing repositories and automation in Bitbucket Server / Data Center environments.
It provides streamlined support for repository creation, manifest management

✨ Features

  • Management multiple repositories from YAML config
  • All commands are run in the project context
  • Parallel processing for high-performance bulk operations
  • YAML input/output for full GitOps compatibility
  • Easy configuration via .env file

Configuration

Add .env properties file like below or provide command line keys. For details see --help

BITBUCKET_URL=https://bitbucket-server.local
BITBUCKET_TOKEN=<token>

Examples

  1. List repos
$ bbctl get repos -p PROJECT1
name
my-repo-4
my-repo-1
my-repo-2
my-repo-3

$ get repo my-repo-1 -p PROJECT1 --manifest-file manifest.json --template '{{.type}}'
name            type
my-repo-1       application

  1. Create repos
$ cat repos_to_create.yaml
repositories:
  - name: my-repo-1
    defaultBranch: trunk
    description: My test repo
  - name: my-repo-2
    description: My test repo
  - name: my-repo-3
    defaultBranch: master
    description: Description

$ bbctl create repos -p PROJECT1 -i repos_to_create.yaml
  1. Delete repos
$ cat repos_to_delete.yaml
repositories:
  - name: my-repo-1
  - name: my-repo-2
  - name: my-repo-3

$ bbctl delete repos -p PROJECT1 -i repos_to_delete.yaml
  1. Update repos
$ cat repos_to_update.yaml
repositories:
  - name: my-repo-1
    defaultBranch: trunk
    description: My test repo new
  - name: my-repo-2
    description: My test repo new
  - name: my-repo-3
    defaultBranch: master
    description: Description

$ bbctl apply repos -p PROJECT1 -i repos_to_update.yaml

💰 Support the project

Donate on Boosty

Donate TON via NowPayments

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
get
cmd/get/repo.go
cmd/get/repo.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL