logifai
Auto-capture development logs for Claude Code — stop copy-pasting terminal output.
https://github.com/user-attachments/assets/dadd679f-8cbd-4df1-931b-95d4cb981773

The Problem
When debugging with Claude Code, you're constantly doing this:
1. Run your dev server
2. Hit an error
3. Scroll through terminal output
4. Copy the error message
5. Paste it into Claude Code
6. Ask "what's this?"
logifai eliminates steps 3-5. Your logs are always there — just ask Claude.
1. npm run dev 2>&1 | logifai
2. Hit an error
3. Ask Claude Code "what went wrong?"
4. Claude automatically searches your logs and answers
Features
- Pipe & Capture —
command 2>&1 | logifai records everything
- Web UI — browser-based log viewer with live streaming, filtering, and search
- Smart Normalization — auto-detects JSON, infers log levels (ERROR/WARN/INFO/DEBUG), groups stack traces
- Automatic Redaction — API keys, tokens, passwords, and connection strings are masked before storage
- Claude Code Skill — Claude searches your logs automatically when you ask about errors
- Log References — select lines in the Web UI, click Copy Ref, paste into Claude — no more dumping hundreds of lines into your prompt
- NDJSON Storage — structured, greppable,
jq-friendly format
- Zero Runtime Dependencies — single binary, no runtime needed
- Self-Update —
logifai update checks GitHub Releases and updates in-place
Quick Start
1. Install
Homebrew (macOS / Linux)
brew install tomoyaf/logifai/logifai
macOS / Linux (shell script)
curl -fsSL https://raw.githubusercontent.com/tomoyaf/logifai/main/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/tomoyaf/logifai/main/install.ps1 | iex
Scoop (Windows)
scoop bucket add logifai https://github.com/tomoyaf/scoop-logifai
scoop install logifai
npm (all platforms — auto-downloads native binary)
npm i -g logifai
2. Capture logs
npm run dev 2>&1 | logifai
Output passes through to your terminal as normal — logifai records it in the background. A Web UI opens at http://127.0.0.1:3100 for live streaming and search.
To browse previously saved sessions without capturing:
logifai
3. Install the Claude Code Skill
Plugin (recommended)
/plugin marketplace add tomoyaf/logifai
/plugin install logifai@logifai-marketplace
Manual copy (alternative)
mkdir -p ~/.claude/skills/logifai
curl -fsSL https://raw.githubusercontent.com/tomoyaf/logifai/main/skills/logifai/SKILL.md \
-o ~/.claude/skills/logifai/SKILL.md
4. Ask Claude
Just ask Claude Code naturally:
- "What errors happened recently?"
- "Show me the stack trace from the last failure"
- "What went wrong with the API call?"
Claude automatically searches your captured logs and responds with context.
Log References — keep your prompts small
Instead of pasting hundreds of log lines into Claude, use log references:
- Select error lines in the Web UI
- Click Copy Ref — a compact URI like
logifai://a1b2c3d4:42,50-55 is copied
- Paste into Claude Code — Claude fetches only those lines automatically
This keeps your prompt small and your context window free for deeper analysis.
How It Works
stdin ──→ Normalizer ──→ Redactor ──→ NDJSON file
│ │
├─ JSON auto-detect └─ ~/.local/state/logifai/logs/
├─ Level inference ├─ session-*.ndjson
├─ Stack trace grouping └─ current.ndjson (symlink)
└─ CLF/Syslog parsing
──→ Web UI (http://127.0.0.1:3100)
├─ Live streaming via SSE
├─ Level filtering
└─ Keyword search
Each log line becomes a structured JSON entry:
{
"timestamp": "2026-02-08T10:30:45.123Z",
"level": "ERROR",
"message": "Module not found: @/components/Button",
"source": "npm-run-dev",
"project": "/home/user/my-app",
"session_id": "a1b2c3d4",
"git_branch": "feature/auth",
"git_commit": "e91d055",
"pid": 12345,
"raw": false,
"stack": "Error: Module not found\n at Object.<anonymous> ...",
"_original": null
}
The Claude Code Skill (installed via /plugin install or manually to ~/.claude/skills/logifai/SKILL.md) gives Claude the knowledge to search these files using grep, jq, and standard tools — no MCP server needed.
CLI Reference