Skip to content

Commands

Cloninator provides two main commands: clone and generate.

clone

Clone all repositories defined in your configuration.

Usage

cloninator clone [-v]

Options

  • -v, --verbose: Increase verbosity (can be stacked: -vv, -vvv)

Behavior

The clone command:

  1. Reads configuration from ~/.config/cloninator/config.yaml
  2. Merges additional configs from ~/.config/cloninator/config.yaml.d/*.yaml
  3. For each configured repository:
  4. Skips if the directory already exists and is non-empty
  5. Creates the directory structure based on the configuration
  6. Clones using the first remote as origin
  7. Adds additional remotes (if configured)
  8. Runs post-checkout commands (if configured)

Examples

Basic usage:

cloninator clone

With verbose output:

cloninator clone -v

Extra verbose with full tracebacks:

cloninator clone -vvv

generate

Scan existing cloned repositories and generate configuration.

Usage

cloninator generate [-v]

Options

  • -v, --verbose: Increase verbosity (can be stacked: -vv, -vvv)

Behavior

The generate command:

  1. Scans the configured root directory for .git directories
  2. Extracts remote information using git config
  3. Compares against existing config to find missing repos
  4. Outputs a repos.yaml file with nested directory structure

Note

You must manually merge the generated output into your main configuration file.

Example Workflow

# Generate config for existing repos
cloninator generate

# Review the output
cat repos.yaml

# Manually merge into ~/.config/cloninator/config.yaml

Global Options

These options work with any command:

  • --version: Print the version number
  • -v, --verbose: Increase verbosity level

Exit Codes

  • 0: Success
  • 1: Error (invalid configuration, network issues, etc.)