Skip to content

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

CloudScale Claude Code Command History

A floating macOS panel that docks against iTerm2 and shows your Claude Code command history in real time.

Features at a glance

  • Live command history from the active Claude Code session
  • Queued commands (typed while Claude is working) shown in order
  • Double-click any command to search for it in the terminal
  • Auto Yes — automatically approves Claude's permission dialogs
  • Back-to-Prompt button scrolls iTerm to the current input
  • Electric-pink title bar with inverted background colour matched to your terminal theme
  • Single-instance lock; auto-launches when iTerm opens

Screenshot

┌─────── Claude: ~/D/github/CloudScale Claude Code Extender ⬇ ↻ ─┐
│ 62: please check this into github and update all the docs        │
│ 61: before we finish this session. Write detailed documents…     │
│ 60: its better… can you test this with playwright?               │
│ 59: when i click on a command i need it to go to that command    │
│ …                                                                │
├──────────────────────────────────────────────────────────────────┤
│ AndrewBaker.Ninja                          Auto Yes: OFF         │
└──────────────────────────────────────────────────────────────────┘

Requirements

Requirement Notes
macOS Tested on macOS 15 Sequoia
iTerm2 Shell integration recommended for live path in title
Python 3.9+ With tkinter (brew install python-tk)
Claude Code CLI npm install -g @anthropic-ai/claude-code

Installation

git clone https://github.com/andrewbakercloudscale/cloudscale-claude-code-extender
cd "cloudscale-claude-code-extender"
bash install.sh

The installer:

  1. Detects Python 3 with tkinter
  2. Copies the panel to ~/.cloudscale-claude-extender/
  3. Registers a LaunchAgent (com.cloudscale.claude-history-panel)
  4. Installs an iTerm2 AutoLaunch script so the panel opens with iTerm
  5. Launches the panel immediately

Manual tkinter install (if needed)

brew install python-tk

Auto-launch with iTerm2

The installer places a script in:

~/Library/ApplicationSupport/iTerm2/Scripts/AutoLaunch/claude_history_launcher.py

Every time iTerm2 opens, it launches the panel. A PID lock file (~/.cloudscale-claude-extender/panel.lock) ensures only one instance runs.


Usage

Commands list

  • Commands are shown newest-first (most recent at top)
  • Each command has a sequential number (62:, 61:, …)
  • Both typed commands and queued commands (sent while Claude was busy) are shown in chronological order
  • Duplicate commands within 60 seconds are merged automatically

Double-click a command

Scrolls iTerm to the bottom, opens the Find bar (Cmd+F), and searches for the command text. Always searches from the most-recent end of the scrollback so going from a newer command to an older one works correctly.

⬇ Back to Prompt

Scrolls iTerm to the bottom and gives it focus so you can type immediately.

↻ Refresh

Force-reloads the command history from the JSONL file.

Auto Yes

Toggles automatic approval of Claude Code permission dialogs.

How it works (two-layer approach):

Dialog type Mechanism
Claude tool-use confirmations (Bash, Edit, Write…) Installs a PreToolUse hook in ~/.claude/settings.json that returns {"decision":"allow"} — dialog never appears
Multiline-paste confirmation (Tab to amend footer) Polls the terminal footer every 500 ms; sends Return when the dialog footer is detected

The setting persists across restarts (saved in ~/.cloudscale-claude-extender/config.json).

Warning: Auto Yes approves all Claude tool use. Only enable it in sessions where you trust the commands Claude will run.

Title path

Shows the project directory inferred from the most recently edited file in the session, not the raw session cwd. If you run Claude from a parent directory but work in a subdirectory, the title shows the subdirectory.


Project structure

CloudScale Claude Code Extender/
├── claude_history_panel.py      Main application
├── install.sh                   Installs LaunchAgent + iTerm AutoLaunch
├── uninstall.sh                 Removes all installed components
├── tests/
│   ├── test_commands.py         Unit tests — ordering, dedup, filtering
│   └── test_search_and_scroll.py  Tests — search text generation, scroll stability
├── LICENSE                      MIT
└── README.md                    This file

Running tests

python3 -m pytest tests/ -v

All 21 tests should pass.


How Claude Code history works

Claude Code stores every conversation as a JSONL file under ~/.claude/projects/. The project folder name is the session's working directory with / replaced by -.

Each JSONL file contains a mix of entry types:

Entry type What it is
type: "user", message.role: "user", content: string A command you typed when Claude was idle
type: "queue-operation", operation: "enqueue" A command you typed while Claude was working
type: "assistant" Claude's responses and tool calls (ignored by the panel)
type: "user", content: array of tool_result Tool output fed back to Claude (ignored)

The panel merges both user and queue-operation entries, sorts by timestamp, and deduplicates entries with the same text within a 60-second window (a queued message and its processed user-entry can otherwise both appear).


Uninstall

bash uninstall.sh

Roadmap

  • Session switcher — browse all past Claude Code sessions
  • Search/filter bar within the panel
  • Show assistant responses alongside commands
  • Support for VS Code terminal

License

MIT — see LICENSE

Built by Andrew Baker

Releases

Packages

Contributors

Languages