camp clone
Clone a campaign with full submodule setup
Synopsis
Clone a campaign repository and initialize all submodules.
This command provides a single-step setup for new devices:
CLONE REPOSITORY Clones the campaign repository with recursive submodules.
SYNCHRONIZE URLs Copies URLs from .gitmodules to .git/config, ensuring URL consistency across all submodules.
UPDATE SUBMODULES Fetches and checks out the correct commits for all submodules.
VALIDATE SETUP Verifies all submodules are initialized, at correct commits, and have matching URLs.
REGISTER CAMPAIGN If .campaign/campaign.yaml exists, registers the campaign in the global registry for navigation and discovery.
EXIT CODES: 0 Success 1 Clone failed (no campaign created) 2 Partial success (some submodules failed) 3 Validation failed 4 Invalid arguments
EXAMPLES:
Clone a campaign (default: SSH)
camp clone git@github.com:Obedience-Corp/obey-campaign.git
Clone with HTTPS
camp clone https://github.com/Obedience-Corp/obey-campaign.git
Clone to a specific directory
camp clone git@github.com:org/repo.git my-campaign
Clone a specific branch
camp clone git@github.com:org/repo.git --branch develop
Shallow clone (latest commit only)
camp clone git@github.com:org/repo.git --depth 1
Clone without submodules
camp clone git@github.com:org/repo.git --no-submodules
Clone without validation
camp clone git@github.com:org/repo.git --no-validate
Clone without auto-registration
camp clone git@github.com:org/repo.git --no-register
JSON output for scripting
camp clone git@github.com:org/repo.git --json
camp clone <url> [directory] [flags]
Options
-b, --branch string Clone specific branch (default: repository default branch)
--depth int Shallow clone depth (0 = full history)
-h, --help help for clone
--json Output results as JSON for scripting
--no-register Skip auto-registration in global campaign registry
--no-submodules Skip submodule initialization
--no-validate Skip post-clone validation
-p, --parallel int Number of parallel submodule initializations (default 4)
-v, --verbose Show detailed output for each operation
Options inherited from parent commands
--config string config file (default: ~/.obey/campaign/config.yaml)
--no-color disable colored output
SEE ALSO
- camp - Campaign management CLI for multi-project AI workspaces