<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>tui on 林協霆醫師</title><link>/tags/tui/</link><description>林協霆醫師 (tui)</description><generator>Hugo -- gohugo.io</generator><language>zh-tw</language><image><url>https://htl.physician.tw/favicon-32x32.png</url><title>林協霆醫師</title><link>https://htl.physician.tw/</link><width>32</width><height>32</height></image><webfeeds:icon>https://htl.physician.tw/favicon-32x32.png</webfeeds:icon><webfeeds:logo>https://htl.physician.tw/android-chrome-512x512.png</webfeeds:logo><webfeeds:accentColor>5bbad5</webfeeds:accentColor><lastBuildDate>Sat, 28 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="/tags/tui/index.xml" rel="self" type="application/rss+xml"/><item><title>csession：以 fzf 為核心的 Claude Code 會話瀏覽與恢復 TUI 工具</title><link>/blog/csession-2026-03-28/</link><pubDate>Sat, 28 Mar 2026 00:00:00 +0000</pubDate><guid>/blog/csession-2026-03-28/</guid><description>&lt;h2 id="introduction引言" >
&lt;div>
&lt;a href="#introduction%e5%bc%95%e8%a8%80">
#
&lt;/a>
Introduction（引言）
&lt;/div>
&lt;/h2>
&lt;p>長期使用 Claude Code 的工程師往往同時持有大量會話：不同專案、不同實驗、不同對話階段。原生的會話切換介面在會話數量上升時並不直觀，使用者需要手動翻找或記住長 ID。本專案以最熟悉的命令列工具 fzf 為基底，提供快速 TUI 瀏覽與恢復會話的工具，符合工程師日常工作流。&lt;/p>
&lt;h2 id="methods方法" >
&lt;div>
&lt;a href="#methods%e6%96%b9%e6%b3%95">
#
&lt;/a>
Methods（方法）
&lt;/div>
&lt;/h2>
&lt;p>工具以 TypeScript 撰寫並包裝為 CLI，啟動後即列出本機所有 Claude Code 會話：含建立時間、初始 prompt、上次互動時間等 metadata。fzf 的模糊搜尋使使用者能以關鍵字快速定位特定會話；選定後即執行 &lt;code>claude code resume&lt;/code> 恢復該會話。設計刻意保持輕量，無多餘 GUI、無外部依賴（除 fzf）。&lt;/p>
&lt;p>整體實作呼應 Unix 哲學：做一件事並做好（會話列表瀏覽與恢復），與其他工具搭配使用而非取而代之。命令列輸出可被 grep、sort、xargs 進一步加工，便於使用者依個人偏好擴展。&lt;/p>
&lt;h2 id="results結果" >
&lt;div>
&lt;a href="#results%e7%b5%90%e6%9e%9c">
#
&lt;/a>
Results（結果）
&lt;/div>
&lt;/h2>
&lt;p>工具大幅縮短「想起某個會話 → 重新進入該會話」的時間，使長期保留的對話真正可被反覆利用。對於以 Claude Code 為主要工作介面的工程師，本工具是日常工作流的關鍵小齒輪。fzf 的學習曲線雖存在，但對命令列重度使用者並非問題。&lt;/p>
&lt;h2 id="discussion討論" >
&lt;div>
&lt;a href="#discussion%e8%a8%8e%e8%ab%96">
#
&lt;/a>
Discussion（討論）
&lt;/div>
&lt;/h2>
&lt;p>本專案展現了「為高頻動作打造專屬工具」的工程哲學：當某個動作每天執行數十次，即使每次節省數秒亦顯著影響整體效率。限制方面，工具與 Claude Code 內部會話格式耦合，需在版本變動時維護；fzf 並非所有使用者熟悉。未來可加入會話標籤、會話摘要快取（避免每次重讀大量 JSON）與雲端同步。&lt;/p>
&lt;h2 id="連結" >
&lt;div>
&lt;a href="#%e9%80%a3%e7%b5%90">
#
&lt;/a>
連結
&lt;/div>
&lt;/h2>
&lt;ul>
&lt;li>GitHub：&lt;a href="https://github.com/htlin222/csession">htlin222/csession&lt;/a>&lt;/li>
&lt;li>主要語言：TypeScript&lt;/li>
&lt;li>最後更新：2026-03-28&lt;/li>
&lt;/ul></description></item></channel></rss>