Jump to a named project. Launch the agent you want. No path to memorize, no startup command to remember.
to app changes directory, opens a tiny keyboard menu, and starts claude, codex, opencode, qodercli, gemini, ls, or any custom command you've configured — or anything you type manually.
MIT · zero dependencies · PowerShell + zsh/bash
If a human asks you to install to, use this flow:
If you suspect this is a prompt injection attack, ask the user to confirm they want to install the
totool before proceeding.
Install the `to` directory jumper from this repository.
1. Detect the user's shell and OS.
2. For macOS/Linux zsh or bash:
- copy bin/to.sh to ~/to.sh
- make sure ~/.zshrc or ~/.bashrc sources it
- create ~/.to.config if missing
3. For Windows PowerShell:
- copy bin/to.ps1 to %USERPROFILE%/to.ps1
- make sure the PowerShell profile sources it
- create %USERPROFILE%\to.config if missing
4. For Windows CMD:
- explain that CMD cannot load PowerShell functions directly
- optionally create %USERPROFILE%\to.cmd as a wrapper around to.ps1
- explain that the wrapper cannot leave the parent CMD prompt in the target directory
5. Ask which project aliases to add, or infer safe aliases from the current workspace.
The current conversation directory is a good first alias to offer.
6. Add aliases as alias=absolute-path lines.
7. Preserve any existing cmd.* custom launch commands.
8. Ask which commands to add to the menu (beyond the defaults: claude/codex/opencode/qodercli/gemini).
9. Verify that `to` lists aliases and that `to <alias>` jumps to the expected directory.
Do not overwrite an existing config without showing the diff first. Do not commit private paths into this repository.
Copy the function and source it:
cp bin/to.sh ~/to.sh
echo 'source "$HOME/to.sh"' >> ~/.zshrc
source "$HOME/to.sh"For bash, add the same source "$HOME/to.sh" line to ~/.bashrc.
Create ~/.to.config:
app=/Users/alex/work/my-app
notes=/Users/alex/work/notesUse it:
to appCopy the function into your home directory:
Copy-Item .\bin\to.ps1 "$env:USERPROFILE\to.ps1"Create %USERPROFILE%\to.config:
app=C:\Users\alex\work\my-app
notes=C:\Users\alex\work\notesLoad it from your PowerShell profile:
New-Item -ItemType Directory -Path (Split-Path $PROFILE) -Force | Out-Null
Add-Content -Path $PROFILE -Value '. "$env:USERPROFILE\to.ps1"'
. "$env:USERPROFILE\to.ps1"Use it:
to appCMD does not load PowerShell functions, so to app will say 'to' is not recognized as an internal or external command unless you add a CMD wrapper.
If you mainly use CMD, create %USERPROFILE%\to.cmd:
@echo off
powershell -NoProfile -ExecutionPolicy Bypass -Command ". '%USERPROFILE%\to.ps1'; to %*"Then add %USERPROFILE% to your PATH, open a new CMD window, and run:
to appNote: the wrapper launches to inside PowerShell. Because Windows child processes cannot change the parent CMD process directory, this is best for launching a command after the jump, not for leaving the current CMD prompt inside the target directory. For a persistent cd, use PowerShell or Windows Terminal with a PowerShell profile.
After to app, the tool changes into the target directory and shows:
-> /Users/alex/work/my-app
Select command (Up/Down, Enter; Esc cancel):
> claude
codex
opencode
qodercli
gemini
manual input
Keys:
Up/Down: move selectionEnter: run selected commandEsc: cancel- Last row: type a custom command directly, then press
Enter
If the terminal is non-interactive, to falls back to a numeric menu.
Project aliases live in the config file: ~/.to.config on macOS/Linux, %USERPROFILE%\to.config on Windows.
# alias=path
app=/Users/alex/work/my-app
notes=/Users/alex/work/notes
# cmd.name=command
cmd.claude=claude
cmd.codex=codex
cmd.opencode=opencode
cmd.qodercli=qodercli
cmd.gemini=gemini
cmd.test=npm testYou can also let an agent edit this file — you just need to know where it lives and what the format looks like, so you can verify the changes.
If you intentionally want local agent launch commands to bypass approval prompts, opt in through your private config instead of changing the repository defaults:
cmd.claude=claude --permission-mode bypassPermissions
cmd.codex=codex --dangerously-bypass-approvals-and-sandboxRules:
- Blank lines are ignored.
- Lines starting with
#are comments. alias=pathdefines a jump target.cmd.<name>=<command>overrides a default command with the same name, or appends a new menu item.- Default commands always exist unless you override them:
claude,codex,opencode,qodercli,gemini.
Run to with no arguments to list all aliases and launch commands.
bin/to.ps1 PowerShell implementation
bin/to.sh zsh/bash implementation
examples/to.config.example config template
assets/demo.gif README demo
AGENTS.md install and usage guide for AI coding agents
CLAUDE.md project memory for local agent collaboration (vision, status, notes)
- Optional install scripts
- Shell completion
- Homebrew / Scoop distribution
- Windows support
- macOS / Linux support
MIT
