divekit distribute

Distribute group projects based on a configuration

Synopsis

Create and configure individualized repositories in target systems (e.g. GitLab).

This command reads a distribution configuration and creates personalized repositories for each member. It handles project creation, content individualization, and member assignment automatically.

WHAT HAPPENS:

  1. Reads distribution config from .divekit/distributions/<name>/
  2. Creates target group and projects on GitLab (or other provider)
  3. Individualizes content using variation tokens
  4. Assigns members to their respective projects
  5. Creates remotes.json and individuals.json to track distributed repositories

Usage

divekit distribute [flags]

Examples

# Distribute with interactive distribution selection
divekit distribute

# Distribute a specific distribution
divekit distribute -d ST2M4

# Distribute with members from a file
divekit distribute -d ST2M4 --members-file members.txt

# Create 100 repositories
divekit distribute -d ST2M4 --count 100

# Start fresh (reset remotes.json and individuals.json)
divekit distribute -d ST2M4 --fresh

# Add new members to an existing distribution
divekit distribute -d ST2M4 --add --members-file new-members.txt

# Create repositories after adding members with 'divekit members add'
divekit distribute -d ST2M4 --add

# Replace configured members with a new file
divekit distribute -d ST2M4 --members-file replacement.txt --replace-members

# Control concurrency for large distributions
divekit distribute -d ST2M4 --workers 5 --rate-limit 10

# Dry-run to preview distribution
divekit distribute -d ST2M4 --dry-run

# Force delete existing projects (use with caution!)
divekit distribute -d ST2M4 --dangerously-delete-group-projects

Flags

-a, --add                                 Add missing configured members to an existing distribution
      --count int                           Generate this many synthetic groups instead of reading member names (on GitLab, implies --no-member-assignment)
      --dangerously-delete-group-projects   [DANGEROUS] Force deletion of existing projects in target groups; non-interactive will not prompt
  -d, --distribution string                 Distribution name
  -n, --dry-run                             Preview changes without creating projects (alias for --provider simulated)
  -f, --fresh                               Delete remotes.json/individuals.json before distributing
      --languages string                    Comma-separated language packs (overrides config)
      --members-file string                 Path to a file with member names (one per line)
  -m, --message string                      Commit message
      --no-member-assignment                Create repositories without assigning members
  -p, --provider string                     Provider to use: gitlab (default), local (filesystem), simulated (dry-run)
      --rate-limit float                    Maximum tasks per second (0 = unlimited)
  -r, --remote string                       Remote repository URL (e.g. GitLab instance)
      --replace-members                     Replace existing configured members instead of merging new input
      --task-timeout duration               Maximum time per task (0 = use preset)
  -t, --token string                        GitLab token or token file path (file:///...)
      --warn-unresolved-tokens string       Warn about unresolved tokens: auto|true|false (auto follows the legacy originRepositoryConfig.json warning setting) (default "auto")
  -w, --workers int                         Number of concurrent workers (0 = use preset)

Inherited Flags

-l, --loglevel string   log level (debug, info, warn, error, fatal) (default "info")
      --no-index          skip project index update
      --non-interactive   run in non-interactive mode (fails if interactive input is required)
  -y, --yes               assume yes/default for all prompts (non-interactive with automatic defaults)