add Command
What It’s For
Section titled “What It’s For”Bring another repository under workspace management.
What It Does
Section titled “What It Does”- Adds a repository URL to Arashi workspace configuration.
- Reconciles managed ignore rules before config and repository materialization.
- Clones or connects the repository into the workspace structure.
- Makes the repository available for create, pull, sync, and setup operations.
arashi add <git-url> [options]Key Options
Section titled “Key Options”-n, --name <name>override the auto-derived repository name.--create-setupcreate a setup template when no setup script is found.-f, --forceskip confirmation prompts.--jsonoutput machine-readable results.
Examples
Section titled “Examples”# Add a repository using SSHarashi add git@github.com:your-org/api.git
# Add with a custom workspace namearashi add https://github.com/your-org/web.git --name frontend
# Emit JSON output for scriptsarashi add git@github.com:your-org/data.git --jsonaddrequires configured mode because it persists child repositories. In standalone mode, run ordinaryarashi initto upgrade; see the Standalone Repository workflow for the mode boundary.- Run
arashi initfirst so workspace config exists. adddetects the default branch and tracks setup scripts when present.- Arashi asks Git for effective tracked, repository-local, and global rules before writing. Missing safe managed paths use the clone’s stored scope or the repository-local default; scope
nonewarns without changing ignore files. - Config, clone-local preference, ignore-file, and clone changes share the command’s rollback boundary. If cloning fails and config/filesystem state is restored,
addalso attempts to roll back reconciliation; a surviving repository keeps the rule needed to hide its managed path. - Arashi changes only its owned ignore block and never writes global Git configuration.
- JSON output includes managed ignore sources, warnings or unsafe skips, applied changes, and final
changed/restoredstate when rollback is involved.
Agent Notes
Section titled “Agent Notes”- Surface scope
noneand unsafe-path warnings rather than silently adding manual rules. - On failure, use the reported final state to determine whether config, clone, and reconciliation changes remain; do not infer rollback from the exit code alone.