Skip to content

Shell integration

A child process can’t change its parent shell’s directory. The shell wrapper fixes that: whenever devflow emits a DEVFLOW_CD=<path> line (switching to a worktree, devflow init <dir>, …), the wrapper cds your shell there automatically.

Add to your shell profile:

Terminal window
eval "$(devflow shell-init)" # auto-detects your shell
eval "$(devflow shell-init bash)" # ~/.bashrc
eval "$(devflow shell-init zsh)" # ~/.zshrc
devflow shell-init fish | source # ~/.config/fish/config.fish

This defines a devflow shell function that wraps the real binary, watches its output for DEVFLOW_CD=, and changes directory when it sees one.

Terminal window
devflow switch -c feature/auth
# Created worktree for 'feature/auth' at ../myapp.feature_auth_fc659bd73585
# Changed directory to: ../myapp.feature_auth_fc659bd73585 ← the wrapper did this

Without the wrapper, devflow prints the worktree path and a manual cd hint instead.

Pressing o in the TUI exits and prints the selected workspace’s worktree path. cd there manually (or use devflow switch <name> from your wrapped shell, which auto-cds).