divekit fetch
Fetch repositories for a distribution into the cache
Synopsis
Download distributed repositories to a local cache for offline access.
Fetches all or selected repositories from a distribution into a local cache directory. Cached repositories can then be used by other commands like ‘run’ or ‘passcheck’ without requiring network access.
WHAT HAPPENS:
- Reads distribution config and remotes.json
- Connects to GitLab and syncs repositories via git clone/pull
- Downloads additional artifacts (currently pages/export.json)
- Stores data in .divekit/distributions/<distribution>/.cache/
Usage
divekit fetch [flags]
Examples
# Fetch all repositories for a distribution
divekit fetch -d ST2M4
# Fetch only specific repositories by UUID
divekit fetch -d ST2M4 --uuid abc123 --uuid def456
# Fetch repositories for specific users
divekit fetch -d ST2M4 --user alice --user bob
# Fetch only specific file types
divekit fetch -d ST2M4 --files "*.java" --files "*.md"
# Preview what would be downloaded
divekit fetch -d ST2M4 --dry-run
# Control download concurrency
divekit fetch -d ST2M4 --workers 3 --rate-limit 5
# Fetch to a custom directory
divekit fetch -d ST2M4 --output-dir ./repos
Flags
-d, --distribution string Distribution name
-n, --dry-run Show what would be downloaded without downloading
--files strings Specific files to download (glob patterns)
-o, --output-dir string Custom output directory (default: use local-data GitLab store)
--rate-limit float Maximum downloads per second (0 = unlimited)
-r, --remote string Remote repository URL (e.g. GitLab instance)
--task-timeout duration Maximum time per download task (0 = use preset)
-t, --token string GitLab token or token file path (file:///...)
--user strings Only fetch repositories for these usernames (repeatable)
--uuid strings Only fetch repositories with these UUIDs (repeatable)
-w, --workers int Number of concurrent downloads (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)