init Command
What It’s For
Set up a workspace so Arashi can track repositories and worktrees.
What It Does
- Creates Arashi configuration in the current project.
- Offers to bootstrap a Git repository when you run it from a non-repository directory in an interactive terminal.
- Prepares workspace metadata used by other commands.
- Makes the workspace ready for repository registration.
Usage
arashi init [options]Key Options
--repos-dir <path>set a custom repos directory (default./repos).--worktrees-dir <path>set a custom worktree base directory (default.arashi/worktrees).--forceoverwrite an existing Arashi config (with backup).--no-discoverskip automatic repository discovery.--dry-runpreview changes without writing files.--verboseprint detailed initialization steps.
Examples
# Standard initializationarashi init
# Run from a parent directory, then enter '.' at the prompt to initialize the current directoryarashi init
# Run from a parent directory, then enter 'my-arashi-repo' at the prompt to create a child repoarashi init
# Use a custom repositories directoryarashi init --repos-dir ../workspace-repos
# Use a custom worktree base directoryarashi init --worktrees-dir ../workspace-worktrees
# Reinitialize safely and preview file changesarashi init --force --dry-runNotes
- Run this command inside an existing Git repository root, or from a parent directory in an interactive terminal when you want Arashi to create the repository for you.
- In bootstrap mode, the repository target prompt accepts only
.or a direct child directory name such asmy-arashi-repo. - If
initis run outside a Git repository without an interactive terminal, it exits with guidance instead of prompting. initcreates.arashi/config.jsonand hook templates under.arashi/hooks/.initsetsworktreesDirto.arashi/worktreesby default.- It updates
.gitignoreto exclude the configured repositories directory. - It also adds the normalized managed worktree directory entry to
.gitignorewhen the location is default or a safe repository-relative subdirectory. - Broad locations (
././) and parent-traversal locations (../variants) are not auto-added to.gitignore.