A shell function that lists your recent Claude Code project directories and lets you jump into one by typing a number.
$ ptsd
1) my-app ~/projects/my-app
2) another-project ~/projects/another-project
3) old-project ~/projects/old-project
Select project (1-3): 2
→ /Users/you/projects/another-project
Launch Claude here? (y/n):
Project names are shown in bold with paths dimmed beside them. If only one project matches, it's auto-selected.
ptsd # List projects, newest first
ptsd -a # Sort alphabetically by project name
ptsd -o # Sort oldest first
ptsd myapp # Filter by substring (case-insensitive)
ptsd -a myapp # Combine sort + filter
Requirements: jq (brew install jq or apt install jq)
- Clone or download
ptsd.zsh - Add to your
~/.zshrc:
source "/path/to/ptsd/ptsd.zsh"- Open a new terminal (or
source ~/.zshrc)
Requirements: jq (brew install jq, apt install jq, or download from jqlang.github.io)
- Clone or download
ptsd.bash - Add to your
~/.bashrc:
source "/path/to/ptsd/ptsd.bash"- Open a new terminal (or
source ~/.bashrc)
No external dependencies — uses PowerShell's built-in ConvertFrom-Json.
- Clone or download
ptsd.ps1 - Add to your PowerShell profile (
$PROFILE):
. "C:\path\to\ptsd\ptsd.ps1"- Open a new terminal (or
. $PROFILE)
If you get an execution policy error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Claude Code stores session data in ~/.claude/projects/. Each project directory contains JSONL files with the working directory (cwd) of each session. ptsd reads these, deduplicates by path, sorts by most recently used, and presents a numbered list.
You can also use ptsd as a Claude Code slash command. Copy ptsd.md to ~/.claude/commands/ptsd.md and use /ptsd inside any Claude Code session.
MIT