Commands¶
Cloninator provides two main commands: clone and generate.
clone¶
Clone all repositories defined in your configuration.
Usage¶
Options¶
-v, --verbose: Increase verbosity (can be stacked:-vv,-vvv)
Behavior¶
The clone command:
- Reads configuration from
~/.config/cloninator/config.yaml - Merges additional configs from
~/.config/cloninator/config.yaml.d/*.yaml - For each configured repository:
- Skips if the directory already exists and is non-empty
- Creates the directory structure based on the configuration
- Clones using the first remote as origin
- Adds additional remotes (if configured)
- Runs post-checkout commands (if configured)
Examples¶
Basic usage:
With verbose output:
Extra verbose with full tracebacks:
generate¶
Scan existing cloned repositories and generate configuration.
Usage¶
Options¶
-v, --verbose: Increase verbosity (can be stacked:-vv,-vvv)
Behavior¶
The generate command:
- Scans the configured root directory for
.gitdirectories - Extracts remote information using
git config - Compares against existing config to find missing repos
- Outputs a
repos.yamlfile 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: Success1: Error (invalid configuration, network issues, etc.)