Turbo-Thorschten/shell-highlight
shell-highlight
⟦Bash 및 ⟦PowerShell 도구 호출의 명령을 구문 강조로 그리는 Claude Code mod입니다.
이 mod 소개
Claude Code mod로, Bash와 PowerShell 도구 호출을 구문 강조된 명령으로 표시합니다.
Claude Code 자체 하이라이터로 각 shell 호출에 색을 입히고 heredoc, here-string, 따옴표로 묶은 인수 안의 임베디드 언어(JavaScript/TypeScript, Python, Ruby, Perl, PHP, SQL, bash, PowerShell, batch)를 감지하며 각 호출 아래에 출력의 첫 줄을 보여 줍니다. 연속된 호출은 기본으로 접히고 한 번 클릭해 펼칠 수 있으며, 마우스를 올리면 하나의 호출이 강조됩니다. 상태 점은 실행 중, 성공, 실패 또는 중단 상태를 표시합니다. Claude Code 2.1.287 이상이 필요합니다. 저장소를 clone하고 claude --plugin-dir ./shell-highlight를 실행하거나 폴더를 CLAUDE_CODE_PLUGIN_DIRS에 추가해 설치합니다. mod는 상태를 보관하지 않고 파일을 읽지 않으며 프로세스를 시작하거나 네트워크를 호출하지 않습니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add Turbo-Thorschten/shell-highlight claude plugin install shell-highlight
원문 / README
shell-highlight
A Claude Code mod that draws Bash and PowerShell tool calls with syntax-highlighted commands.
Claude Code prints a shell command in one colour and folds a run of them into a count line (Ran 4 shell commands). This mod draws each call as its command, coloured by Claude Code's own highlighter, with the first lines of its output underneath.
Features
-
Highlighted commands.
Bashcalls are coloured as bash,PowerShellcalls as PowerShell. -
Embedded languages. A script handed to an interpreter is coloured in its own language, whether it sits in a heredoc, a PowerShell here-string or a quoted argument:
| Written as | Coloured as | | --- | --- | |
node -e '…',node <<'EOF',bun,deno,tsx| JavaScript / TypeScript | |python -c '…',python3 <<'EOF',py| Python | |ruby -e,perl -e,php -r| Ruby, Perl, PHP | |psql,sqlite3,mysqlwith a heredoc | SQL | |bash -c '…',sh -c,zsh -ic '…'| bash | |pwsh -Command '…',powershell -c| PowerShell | |cmd /c "…"| batch | |cat > script.py <<'EOF',@'…'@ \| Set-Content data.json| by the file's extension | -
Folded by default, one click to unfold. A call shows up to 10 lines of its command and 5 lines of its output, then
… +N lines (click to expand). A click anywhere on the run of calls unfolds every command and every line of output; a second click folds them again. -
Hover per call. The pointer lights up the description and output of the call under it, not the whole run.
-
Wrapping that keeps the colours. An inline script wider than the terminal is wrapped at a space outside string literals, so every wrapped line is still highlighted. Wide characters (CJK, emoji) count as two cells.
-
Status at a glance. The dot is dim while a call runs, green when it succeeded, red when it failed or was interrupted. A running call says
Running…, an interrupted oneInterrupted, a silent one(no output). -
Clean output. Colour codes and control characters are removed from the output; in a command they are shown as visible symbols (
␛). -
Everything else stays native. Other tools keep Claude Code's rows. A run that mixes shell calls with other tools keeps its count line (
Read 1 file, ran 2 shell commands) above the shell calls and unfolds into the engine's own rows.
Where the output comes from
| View | Command | Output |
| --- | --- | --- |
| Fullscreen transcript, folded | this mod | this mod, 5 lines |
| Fullscreen transcript, unfolded by a click | this mod | this mod, all lines |
| Detailed transcript (ctrl+o) | this mod | Claude Code, all lines (this mod for a run unfolded before) |
| Classic (non-fullscreen) transcript | this mod | Claude Code, folded, ctrl+o to expand |
The fold belongs to Claude Code: a click unfolds the run of consecutive calls it sits in, and the state lasts as long as Claude Code keeps it.
Requirements
Claude Code 2.1.287 or newer, the first version with mods (function hooks). The mods API is early access and may change between releases.
Install
git clone https://github.com/Turbo-Thorschten/shell-highlight.git
claude --plugin-dir ./shell-highlight
To load it in every session, name the folder in CLAUDE_CODE_PLUGIN_DIRS, either in your environment or in the env block of ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_PLUGIN_DIRS": "~/path/to/shell-highlight"
}
}
The variable is a list. To keep other mods, append the folder with your platform's path-list separator: ; on Windows, : on Linux and macOS.
Open /plugin to check: the header reads N mods active · shell-highlight, ….
How it works
Two files: hooks/text.ts splits a command into pieces and their languages, and hooks/register.ts draws them from three ui.render hooks.
ToolGroup, a run of calls. Folded, the hook draws each shell call itself. Unfolded, it hands the run to Claude Code, which draws every call as a row.ToolUse, one row. For a shell call the hook draws the highlighted command. A row of an unfolded run also draws its output, because Claude Code draws none there.ToolResult, the result block under a row. Left to Claude Code, except where the row already drew the output.
The mod changes how rows are drawn and nothing else: the command that runs, its permission prompt and its result are untouched. It keeps no state, reads no files, starts no processes and makes no network calls. claude plugin validate reports one engine call, $.ui.resolve.
It runs next to other mods. For a shell row it returns its own drawing, so a mod loaded beneath it does not draw that row.
Tested
Every behaviour above was checked on a real screen, on Claude Code 2.1.287:
- Windows 11 in WezTerm,
BashandPowerShelltools - Linux (Ubuntu under WSL 2) in tmux, fullscreen and classic mode, at 110 and 50 columns
- pointer hover and clicks, the
ctrl+otranscript, a running, a failed, an interrupted and a not yet approved call, 3,000 lines of output, a second mod loaded alongside
claude plugin test runs 57 tests of the splitting, wrapping and drawing on the terminal and desktop surfaces.
Development
claude plugin validate . # what the module hooks and calls, and anything the engine would refuse
claude plugin test . # runs tests/*.test.ts
npx -p typescript tsc -p . # type-check; needs .claude-plugin/types/, which Claude Code writes when it loads the mod
