Real-time command viewer for Claude Code sessions with pedagogical flag decomposition.
During pair coding sessions with Claude Code, bashback intercepts every Bash command via the hook system and displays them in a clean interface with:
- Syntax-highlighted commands with operator tooltips
- Flag decomposition from
--helpparsing - Editable descriptions you can customize and save
- Privacy mode to mask sensitive data
- SSH command transparency (shows remote commands)
- Real-time WebSocket updates
Claude Code → bashback-hook.sh → /tmp/bashback.log → Node.js server → WebSocket → React UI
┌─────────────────┐ hook stdin ┌─────────────────┐
│ Claude Code │ ───────────────────▶ │ bashback-hook │
│ (terminal) │ │ (bash script) │
└─────────────────┘ └────────┬────────┘
│ append
▼
/tmp/bashback.log
│
│ fs.watch
▼
┌─────────────────┐ WebSocket ┌─────────────────┐
│ bashback UI │ ◀────────────────────│ bashback server│
│ (React) │ │ (Node.js) │
│ localhost:5173 │ │ localhost:3001 │
└─────────────────┘ └─────────────────┘
docker run -d \
--name bashback \
-p 3001:3001 \
-v /tmp/bashback.log:/tmp/bashback.log \
-v ~/.claude:/root/.claude \
--restart unless-stopped \
ghcr.io/geriwald/bashback:latest
# Open http://localhost:3001# Install dependencies
npm run install:all
# Start server + client
npm run dev
# Open http://localhost:5173Click the Install hook button in the bashback UI to open the step-by-step installer.
The installer will:
- Check that
jqis installed - Create the
~/.claude/hooks/directory - Copy the hook script
- Configure Claude Code settings
- Verify the installation
After installation, restart Claude Code to activate the hook.
See hook/README.md for manual setup instructions.
# One-liner: launch and open browser
./bashback.shTo add a desktop shortcut:
# Edit the Exec path in bashback.desktop to match your install location
cp bashback.desktop ~/.local/share/applications/- Place
bashback.batsomewhere accessible (e.g., Desktop) - Right-click → Pin to taskbar
- Click to start bashback — it opens
http://localhost:3001automatically
If you prefer using Docker Compose (requires cloning the repo or creating this file):
services:
bashback:
image: ghcr.io/geriwald/bashback:latest
ports:
- "3001:3001"
volumes:
- /tmp/bashback.log:/tmp/bashback.log
- ~/.claude:/root/.claude
restart: unless-stopped| Feature | Description |
|---|---|
| Real-time commands | WebSocket updates as Claude Code runs commands |
| Flag decomposition | Parses --help to explain every flag |
| Custom descriptions | Edit and save your own explanations |
| Privacy mode | Mask IPs, paths, and sensitive data |
| SSH transparency | Shows remote commands inside SSH sessions |
| Operator tooltips | Explains &&, ||, |, >, >>, etc. |
| Heredoc handling | Collapses heredoc content for readability |
| Inline code detection | Simplifies node -e '...' displays |
| Workspace detection | Identifies projects by git root; non-git directories shown in italics |
Mask IPs, credentials, tokens, home paths, and hostnames with a single click.
Note: bashback identifies project names from the git root directory. If Claude Code runs commands outside a git repository, the workspace name falls back to the current directory name and appears in italics in the UI.
- Frontend: React 18 + TypeScript + Vite + Tailwind CSS
- Backend: Node.js + Express + WebSocket
- Hook: Bash script + jq
- Deployment: Docker (multi-stage build)
- CI/CD: GitHub Actions → GHCR
# Clone and install
git clone https://github.com/geriwald/bashback.git
cd bashback
npm run install:all
# Development
npm run devMIT



