<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: hiroshi yata</title>
    <description>The latest articles on DEV Community by hiroshi yata (@wondercoms).</description>
    <link>https://dev.to/wondercoms</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3667723%2F03f65d80-1e07-4ca7-945d-3e9894247cdb.jpeg</url>
      <title>DEV Community: hiroshi yata</title>
      <link>https://dev.to/wondercoms</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wondercoms"/>
    <language>en</language>
    <item>
      <title>Built CLI Tools to Browse AI Coding Assistant Logs (Claude Code &amp; Codex CLI)</title>
      <dc:creator>hiroshi yata</dc:creator>
      <pubDate>Thu, 18 Dec 2025 23:58:05 +0000</pubDate>
      <link>https://dev.to/wondercoms/built-cli-tools-to-browse-ai-coding-assistant-logs-claude-code-codex-cli-cik</link>
      <guid>https://dev.to/wondercoms/built-cli-tools-to-browse-ai-coding-assistant-logs-claude-code-codex-cli-cik</guid>
      <description>&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;If you're using AI coding assistants like Claude Code or OpenAI Codex CLI, you've probably had this experience:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What was that solution Claude suggested last week?"&lt;br&gt;
"How did I phrase that prompt that worked so well?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Both tools store conversation logs locally, but finding past sessions is painful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Claude Code logs
~/.claude/projects/&amp;lt;project-hash&amp;gt;/*.jsonl

# Codex CLI logs  
~/.codex/sessions/YYYY/MM/DD/*.jsonl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Navigating these nested directories manually? No thanks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;I built two simple shell scripts that use fzf for interactive log browsing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/wondercoms/claude-logs" rel="noopener noreferrer"&gt;claude-logs&lt;/a&gt;&lt;/strong&gt; - for Claude Code&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/wondercoms/codex-logs" rel="noopener noreferrer"&gt;codex-logs&lt;/a&gt;&lt;/strong&gt; - for OpenAI Codex CLI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each is a single file (~200 lines), requires only &lt;code&gt;fzf&lt;/code&gt; and &lt;code&gt;jq&lt;/code&gt;, and works out of the box.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;p&gt;Both tools share the same command structure:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;(no args)&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Interactive mode - browse with fzf&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Show all projects/months&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;latest&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;View the most recent session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;tail&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Watch active session in real-time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;status&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Check if CLI is running&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Quick Demo
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Interactive Mode
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;claude-logs
&lt;span class="c"&gt;# → Select project with fzf&lt;/span&gt;
&lt;span class="c"&gt;# → Select session with fzf&lt;/span&gt;
&lt;span class="c"&gt;# → View formatted conversation&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Real-time Monitoring
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;claude-logs &lt;span class="nb"&gt;tail&lt;/span&gt;
&lt;span class="c"&gt;# → Watch the active session live (Ctrl+C to exit)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Status Check
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;claude-logs status
Claude Code is running &lt;span class="o"&gt;(&lt;/span&gt;PID: 12345&lt;span class="o"&gt;)&lt;/span&gt;

Recent sessions:
  2025-12-18 15:30 - my-project
  2025-12-18 14:00 - another-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Output Format
&lt;/h2&gt;

&lt;p&gt;Raw JSONL logs are transformed into readable conversations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;━━━━━━━━━━ USER ━━━━━━━━━━
Fix the bug in this function

━━━━━━━━━━ CLAUDE ━━━━━━━━━━
I found the issue. The problem is...

🔧 [Tool: Edit file]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Codex CLI, you also get project path and git branch info:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=== rollout-xxx.jsonl ===
Project: /Users/me/my-project | Branch: main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew &lt;span class="nb"&gt;install &lt;/span&gt;fzf jq
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install claude-logs
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/wondercoms/claude-logs.git
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x claude-logs/claude-logs
&lt;span class="nb"&gt;cp &lt;/span&gt;claude-logs/claude-logs ~/.local/bin/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install codex-logs
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/wondercoms/codex-logs.git
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x codex-logs/codex-logs
&lt;span class="nb"&gt;cp &lt;/span&gt;codex-logs/codex-logs ~/.local/bin/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Make sure &lt;code&gt;~/.local/bin&lt;/code&gt; is in your PATH.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The tools are straightforward:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scan&lt;/strong&gt; the log directory structure&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parse&lt;/strong&gt; JSONL files with &lt;code&gt;jq&lt;/code&gt; to extract messages&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Display&lt;/strong&gt; options with &lt;code&gt;fzf&lt;/code&gt; (with preview!)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Format&lt;/strong&gt; output with ANSI colors&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The fzf preview feature is key - you can see conversation snippets before opening:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fzf &lt;span class="nt"&gt;--preview&lt;/span&gt; &lt;span class="s1"&gt;'head -20 {} | jq -r "..."'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Use Cases
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Reference Past Solutions
&lt;/h3&gt;

&lt;p&gt;Find how you solved a similar problem before.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Reuse Effective Prompts
&lt;/h3&gt;

&lt;p&gt;Discover prompts that worked well and adapt them.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Daily Review
&lt;/h3&gt;

&lt;p&gt;Review what you accomplished with AI assistance today.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Debugging
&lt;/h3&gt;

&lt;p&gt;Check logs when the AI CLI behaves unexpectedly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Current Limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;macOS only (uses &lt;code&gt;stat -f&lt;/code&gt; for timestamps)&lt;/li&gt;
&lt;li&gt;Linux support would need &lt;code&gt;stat --format&lt;/code&gt; - PRs welcome!&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;claude-logs&lt;/strong&gt;: &lt;a href="https://github.com/wondercoms/claude-logs" rel="noopener noreferrer"&gt;github.com/wondercoms/claude-logs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;codex-logs&lt;/strong&gt;: &lt;a href="https://github.com/wondercoms/codex-logs" rel="noopener noreferrer"&gt;github.com/wondercoms/codex-logs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;If you're a heavy user of Claude Code or Codex CLI, give these tools a try. They're simple, dependency-light, and solve a real annoyance.&lt;/p&gt;

&lt;p&gt;Found a bug? Want Linux support? Issues and PRs are welcome!&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What tools do you use to manage your AI coding assistant workflows? Let me know in the comments!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>webdev</category>
      <category>ai</category>
      <category>cli</category>
    </item>
  </channel>
</rss>
