npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@steveh204/ailog

v1.4.0

Published

Automatic time tracking for AI coding assistants (Kiro CLI + Claude Code). Reports for freelance billing.

Readme

ailog

CI npm

Automatic time tracking for AI coding assistants. Passively scans session data from multiple AI CLI tools and reports active working time per project — perfect for freelance billing.

Supported Tools

| Tool | Data Source | What's Tracked | |------|-------------|----------------| | Kiro CLI | ~/.kiro/sessions/cli/ | Prompts, credits, cwd | | Claude Code | ~/.claude/history.jsonl + sessions/ | Prompts, cwd, multi-account | | OpenAI Codex | ~/.codex/state_5.sqlite | Threads, cwd, git branch | | Google Gemini | ~/.gemini/tmp/*/chats/ | Prompts, project mapping |

Install

# npm (recommended)
npm install -g @steveh204/ailog

# Homebrew (macOS)
brew tap mvn-bachhuynh-dn/tap && brew install kiro-timelog

# Manual
git clone https://github.com/mvn-bachhuynh-dn/ailog.git
cd ailog && bash install.sh

Usage

ailog                    # This week's report
ailog --month            # This month
ailog --by-tool          # Group by AI tool
ailog --by-project       # Group by project
ailog --by-day           # Group by day
ailog --timesheet        # Project × ticket summary
ailog --from 2026-06-01 --to 2026-06-15  # Custom range
ailog --project myapp    # Filter by project
ailog --json             # JSON output

Example Output

Date         Project               Tool      Active  Prompts
────────────────────────────────────────────────────────────
2026-06-17   nhakhoa-mental        kiro      2h 41m       23
2026-06-17   mvn-claude-mgmt       kiro      1h 54m       33
2026-06-17   mvn-claude-mgmt       claude       45m       12
2026-06-17   ai-usage              kiro      1h 42m       29
──────────────────────────────────────────────────────────
Total: 7h 2m active | 97 prompts | 8 sessions

Auto-Scan (Background)

ailog install-scheduler    # Scan every 5 minutes (launchd on macOS, cron on Linux)
ailog uninstall-scheduler  # Disable

Without the scheduler, ailog scans on demand each time you run it.

Configuration

Optional config at ~/.ailog/config.json:

{
  "projectPattern": "/Users/you/projects/([^/]+)",
  "ticketPatterns": ["([A-Z][A-Z0-9]+-\\d+)"],
  "breakThreshold": 1800
}

| Field | Default | Description | |-------|---------|-------------| | projectPattern | null | Regex on cwd → project name (capture group 1) | | ticketPatterns | JIRA-style | Regex array for ticket detection from prompts/branches | | breakThreshold | 1800 | Seconds; gaps longer than this are excluded from active time | | projectSource | "git-root" | Fallback: use git root basename or cwd basename |

How It Works

  1. Scan — Reads session files from each AI tool (passive, no hooks needed)
  2. Emit — Writes timestamped events to ~/.ailog/YYYY-MM-DD.jsonl
  3. Report — Calculates "active time" between consecutive prompts (excluding breaks)

Active time = time between prompts where gap < breakThreshold. Includes AI processing + output review time. Excludes idle breaks.

Environment Variables

| Variable | Override | |----------|---------| | AILOG_DIR | Output directory (default: ~/.ailog/) | | KIRO_SESSIONS_DIR | Kiro sessions path | | CLAUDE_HISTORY_FILE | Claude history.jsonl path | | CLAUDE_DIR | Claude base directory | | CODEX_DB_PATH | Codex SQLite path | | GEMINI_DIR | Gemini base directory |

Requirements

  • Node.js ≥ 18
  • macOS or Linux
  • sqlite3 CLI (only needed for Codex adapter)

Development

git clone https://github.com/mvn-bachhuynh-dn/ailog.git
cd ailog
node --test test/test.mjs    # 40 tests
node scripts/scan.mjs        # Manual scan
node scripts/report.mjs      # Direct report

License

MIT