clone Command
What It’s For
Section titled “What It’s For”Recover missing local repositories without re-adding them to workspace configuration, or complete a partial coordinated worktree after creating only some child repositories.
What It Does
Section titled “What It Does”- Detects repositories already defined in
.arashi/config.jsonthat are missing on disk. - Lets you choose which missing repositories to clone in interactive mode.
- Clones all missing repositories in non-interactive mode with
--all. - Inside a coordinated worktree, adds missing child repositories as worktrees on the current branch when a local source repository is available.
- Falls back to normal remote clone behavior outside coordinated worktrees or when no source repository is available.
- Reconciles managed ignore rules before materializing a configured repository path.
- Skips repositories that are already present locally.
arashi clone [options]Key Options
Section titled “Key Options”--allclone all missing configured repositories without selection prompts.--jsonoutput machine-readable results for non-interactive clone runs.
Examples
Section titled “Examples”# Pick from missing repositories interactivelyarashi clone
# Clone every missing configured repositoryarashi clone --all
# Complete a partial coordinated worktree from inside itcd .arashi/worktrees/my-meta-feature-auth-refresharashi clone
# Clone every missing repository and emit JSONarashi clone --all --jsoncloneonly works on repositories already configured in the workspace.- If no repositories are missing, the command exits successfully with no clone action.
- From inside a coordinated worktree,
cloneuses the current branch for child worktrees so completed repositories stay aligned with the parent worktree. - If the matching source repository cannot be found locally,
cloneuses the configured remote URL instead. - If you’re in a non-interactive environment, use
--all. - JSON mode does not prompt; combine
--jsonwith explicit selection flags such as--all. - Before cloning, Arashi honors any effective tracked, repository-local, or global rule. If a safe managed path is still unignored, it uses the stored clone-local scope or the repository-local default; scope
nonewarns without writing. - Repeated reconciliation is idempotent. If no clone is retained after failure, ignore and preference changes are restored; when some selected repositories succeed, required reconciliation is retained and reported with the partial result.
- A fresh clone has no shared ignore preference because
arashi.ignoreScopeis clone-local. It therefore defaults to the common repository’s local exclude file and does not unexpectedly change tracked.gitignore.
Agent Notes
Section titled “Agent Notes”- Use
arashi status --jsonorarashi status --verboseto discover missing configured repositories before completing a partial workspace. - Prefer
arashi clone --all --jsonwhen automation should complete every missing child repository without prompts. - Inspect managed ignore warnings and final changed/restored state in JSON results instead of editing Git ignore files directly.
Related Commands
Section titled “Related Commands”clone requires configured mode and persisted child repositories. From standalone mode, run ordinary arashi init to upgrade; see the Standalone Repository workflow.