shell Command
What It’s For
Section titled “What It’s For”Enable aw switch to change the current shell directory through an installed wrapper, and manage startup activation for both the wrapper and native completion. Supported integration enables both installed executable names while documented workflows use aw.
aw shell <subcommand>Subcommands
Section titled “Subcommands”init <bash|zsh|fish>print shell wrapper code for manual setup.installdetect the active shell and update the matching startup file.uninstallinspect and remove an exact managed shell block.-j, --jsonrequest a structured result when the selected shell action supports JSON mode.
Managed Installation
Section titled “Managed Installation”# Install integration for the active shellaw shell install
# Check installation behavior from automationaw shell install --jsonaw shell install owns both activation lines in one managed block: the parent-shell wrapper and completion sourcing. That block enables parent-shell behavior and native completion for both executable names. Repeated installation replaces the block idempotently instead of adding duplicate lines. Restart your shell or source the updated startup file afterward.
Manual Setup
Section titled “Manual Setup”aw shell init <shell> remains wrapper-only, so source completion separately. Manual setup can enable either feature independently.
eval "$(command aw shell init bash)"source <(command aw completion bash)eval "$(command aw shell init zsh)"source <(command aw completion zsh)command aw shell init fish | sourcecommand aw completion fish | sourceUse command aw in startup files to bypass the wrapper while generating wrapper or completion code.
- Shell integration remains limited to Bash, Zsh, and Fish. This release separately adds PowerShell support to
aw completion; it does not add PowerShell support toaw shell initoraw shell install. - If install cannot determine a writable startup file, Arashi tells you to use manual setup instead.
- Shell integration enables explicit
aw switch --cd, configuredmode: "cd", and the parent-shellcdfallback for configuredmode: "auto". Auto considers this fallback only after no managed context is strictly detected. aw shell init <shell>normally writes shell wrapper code to stdout, so JSON mode returns a structured unsupported-mode error instead of mixing shell code with JSON.- Completion is generated by the separate
aw completion <shell>command. - An unrelated
awalias or function is preserved instead of being overwritten. Deliberately remove it and re-source the managed integration when you want the supportedawwrapper.
Agent Notes
Section titled “Agent Notes”- Do not run
aw shell installunless the user explicitly asks you to change their shell startup files. - For inspection, run
command aw shell init <shell>andcommand aw completion <shell>separately so the user can review both scripts without mutation. - Expect JSON mode to be unsupported for shell-code output because stdout is reserved for the wrapper script.
Uninstall Shell Integration
Section titled “Uninstall Shell Integration”Use aw shell uninstall to remove shell integration while keeping the Arashi installation and project data.
aw shell uninstall [options]-n, --dry-runinspects the shell-file plan without prompting or writing.-y, --yesconsents to the preflighted plan without an interactive prompt.
Inspect first with aw shell uninstall --dry-run. Interactive removal defaults to no, and non-interactive removal requires aw shell uninstall --yes.
The command uses the same deterministic startup-file policy as aw shell install. It removes exactly one complete managed shell block and preserves every byte outside that block. Missing managed markers are a no-op. Malformed or ambiguous markers—including orphaned, reversed, nested, overlapping, or duplicate markers—cause refusal before any write.
Shell-only removal preserves executable files, PATH, manifests, workspaces, repositories, worktrees, project files, configuration, .arashi.yaml, and Git metadata. It does not scan arbitrary files or remove manually added shell code.
Shell uninstall does not support --json or --force. For full product removal, see aw uninstall.