Shimmer
Reflect your shell prompt into Claude Code's status line.
shimmer /ˈʃɪmər/ — shell + mirror. Your prompt, reflected.
Purpose
Your terminal prompt is your digital signature - the face you've crafted for your command line. Shimmer reflects that identity into Claude Code, keeping your environment consistent and familiar.
Usage
bash
# Parse a PS1 string and generate statusLine config python scripts/shim.py parse "\u@\h:\w\$" # Auto-detect from common shell config locations python scripts/shim.py detect # Detect from a specific file python scripts/shim.py detect --file ~/.bashrc # Preview what the statusLine would look like python scripts/shim.py preview "\u@\h:\w" # Apply directly to Claude Code settings python scripts/shim.py apply --preview python scripts/shim.py apply --confirm
Supported Shells
Bash PS1
| Escape | Meaning | StatusLine |
|---|---|---|
\u | Username | {user} |
\h | Hostname (short) | {hostname} |
\H | Hostname (full) | {hostname} |
\w | Working directory | {cwd} |
\W | Basename only | {cwd_basename} |
\$ | $ or # | $ |
\t | Time (24h) | {time} |
\T | Time (12h) | {time_12} |
\d | Date | {date} |
Zsh PROMPT
| Escape | Meaning | StatusLine |
|---|---|---|
%n | Username | {user} |
%m | Hostname (short) | {hostname} |
%~ | Working directory | {cwd} |
%. | Basename only | {cwd_basename} |
%# | % or # | $ |
%T | Time (24h) | {time} |
%t | Time (12h) | {time_12} |
Fish
Fish prompts are functions. Shimmer detects common patterns:
| Pattern | StatusLine |
|---|---|
$USER, whoami | {user} |
$hostname, hostname | {hostname} |
$PWD, pwd, prompt_pwd | {cwd} |
basename $PWD | {cwd_basename} |
date | {time} |
Config locations checked:
- •
~/.config/fish/functions/fish_prompt.fish - •
~/.config/fish/config.fish
PowerShell
| Pattern | StatusLine |
|---|---|
$env:USERNAME | {user} |
$env:COMPUTERNAME | {hostname} |
Get-Location, $PWD | {cwd} |
Examples
bash
# Bash
$ python scripts/shim.py parse "\u@\h:\w\$ "
{user}@{hostname}:{cwd}$
# Zsh
$ python scripts/shim.py parse --zsh "%n@%m:%~%# "
{user}@{hostname}:{cwd}$
# Fish (auto-detected)
$ python scripts/shim.py detect --file ~/.config/fish/functions/fish_prompt.fish
{user}@{hostname}:{cwd}$
# Preview with your actual values
$ python scripts/shim.py preview "\u@\h:\w"
alice@wonderland:~/projects
Integration
After generating your statusLine format, add it to .claude/settings.local.json:
json
{
"statusLine": "{user}@{hostname}:{cwd}$ "
}
Or use apply --confirm to do this automatically.
Alias
For convenience, alias shimmer to shim:
bash
alias shim="python /path/to/shimmer/scripts/shim.py"