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

@albireo3754/agentlog

v0.1.2

Published

Auto-log Claude Code prompts to Obsidian Daily Notes

Readme

AgentLog

Auto-log Claude Code prompts to Obsidian Daily Notes.

AgentLog is a local-first Claude Code prompt logger for Obsidian. It captures every prompt you type in Claude Code and appends it to today's Daily Note, grouped by project and session.

Use it as a lightweight developer journal, worklog capture layer, or the first building block for richer Daily Notes automation.

# Requires Bun (https://bun.sh) installed and available on your PATH
npm install -g @albireo3754/agentlog
agentlog init ~/Obsidian

Install it once, start using Claude Code, and your Daily Note fills itself.

What It Does

Claude Code prompt → UserPromptSubmit hook → Daily Note append

Why AgentLog

  • Local-first prompt logging with no external service required
  • Obsidian Daily Notes integration that works with your existing vault
  • Project and session grouping so prompts stay readable later
  • Zero copy-paste overhead during normal Claude Code use

Before: You finish a 3-hour Claude Code session. Your Daily Note is empty.

After:

## AgentLog
> 🕐 11:21 — js/agentlog › initialize git and open it in VS Code

#### 10:53 · js/agentlog
<!-- cwd=/Users/you/work/js/agentlog -->
- - - - [[ses_a1b2c3d4]]
- 10:53 start building agentlog
- 11:07 open the spec document
- - - - [[ses_e5f6a7b8]]
- 11:21 initialize git and open it in VS Code

| Element | Role | |---------|------| | > 🕐 HH:MM — project › prompt | Latest entry (always updated) | | #### HH:MM · project | Project subsection (grouped by cwd) | | <!-- cwd=... --> | Section matching key (hidden in Obsidian Reading view) | | - - - - [[ses_...]] | Session boundary (Obsidian wiki-link) | | - HH:MM prompt | Individual log entry |

No manual logging. No copy-paste. No AI summarization overhead.

Install

# With Bun
bun add -g @albireo3754/agentlog

# With npm
npm install -g @albireo3754/agentlog

# Then configure your vault
agentlog init ~/path/to/vault

AgentLog registers the Claude Code hook as agentlog hook, so the agentlog binary must remain available on your PATH after setup.

Requirements

Usage

Setup

# Point to your Obsidian vault
agentlog init ~/Obsidian

# Or use any folder (no Obsidian required)
agentlog init --plain ~/notes

This does two things:

  1. Creates ~/.agentlog/config.json with your vault path
  2. Registers a hook in ~/.claude/settings.json

Run agentlog init without arguments to auto-detect installed vaults.

That's It

Use Claude Code normally. Every prompt you type gets logged to your Daily Note.

How It Works

  1. You type a prompt in Claude Code
  2. Claude Code fires the UserPromptSubmit hook
  3. AgentLog reads the prompt from stdin and sanitizes it
  4. Finds your Daily Note via obsidian daily:path (Obsidian CLI 1.12+). If that fails, it falls back to {vault}/Daily/YYYY-MM-DD-<Korean weekday>.md
  5. Finds or creates a ## AgentLog section
  6. Finds or creates a #### project subsection matching the current working directory
  7. Inserts a session divider [[ses_...]] if the session changed, then appends the entry
  8. Updates the > 🕐 latest-entry line at the top of the section

Total overhead: < 50ms per prompt. Fire-and-forget, never blocks Claude Code.

Daily Note Format

Obsidian Mode (default)

AgentLog resolves the Daily Note path via obsidian daily:path when the Obsidian CLI is available (1.12+). If the CLI is unavailable or Obsidian is not running, it falls back to {vault}/Daily/YYYY-MM-DD-<Korean weekday>.md such as 2026-03-01-일.md.

Each working directory gets its own #### project subsection. Session changes insert a [[ses_...]] wiki-link divider. The > 🕐 blockquote at the top always shows the latest entry across all projects.

## AgentLog
> 🕐 14:30 — kotlin/message-gate › adjust the API response

#### 10:53 · js/agentlog
<!-- cwd=/Users/you/work/js/agentlog -->
- - - - [[ses_a1b2c3d4]]
- 10:53 start building agentlog
- 11:07 open the spec document

#### 14:00 · kotlin/message-gate
<!-- cwd=/Users/you/work/kotlin/message-gate -->
- - - - [[ses_e5f6a7b8]]
- 14:00 adjust the API response
- 14:30 run tests

Plain Mode

With --plain, entries go to {folder}/YYYY-MM-DD.md:

# 2026-03-02
- 10:53 start building agentlog

CLI Reference

| Command | Description | |---------|-------------| | agentlog init [vault] [--plain] | Configure the vault path and register the Claude Code hook. Auto-detect vaults when the path is omitted | | agentlog detect | List detected Obsidian vaults and CLI status | | agentlog doctor | Run health checks for the binary, vault, hook, and Obsidian CLI | | agentlog open | Open today's Daily Note in Obsidian (requires CLI 1.12+) | | agentlog version | Print AgentLog version. In dev builds, also shows channel and commit | | agentlog uninstall [-y] | Remove the hook and delete ~/.agentlog/. Use -y to skip confirmation | | agentlog hook | Invoked automatically by Claude Code (not for direct use) |

Configuration

~/.agentlog/config.json:

| Field | Default | Description | |-------|---------|-------------| | vault | (required) | Path to the Obsidian vault or plain output folder | | plain | false | Plain mode that writes simple markdown files without Obsidian integration |

Environment variables:

| Variable | Description | |----------|-------------| | AGENTLOG_CONFIG_DIR | Override the config directory (default: ~/.agentlog) | | AGENTLOG_PHASE | Force the runtime channel (dev or prod), overriding auto-detection | | OBSIDIAN_BIN | Override the Obsidian CLI binary path |

agentlog version은 현재 실행 중인 AgentLog의 build identity를 출력합니다.

  • prod: 헤드라인만 출력
AgentLog 0.1.1
  • dev: 개발 실행임을 나타내는 메타데이터를 추가 출력
AgentLog 0.1.1
channel: dev
commit: <short-sha>

기본 규칙은 git 메타데이터가 있는 checkout/link 실행이면 dev, 패키지 설치본이면 prod입니다. 테스트나 디버깅에서 channel을 고정하고 싶다면 AGENTLOG_PHASE=dev 또는 AGENTLOG_PHASE=prod를 사용할 수 있습니다.

Uninstall

agentlog uninstall

This removes the hook from ~/.claude/settings.json and deletes ~/.agentlog/.

Development

bun install
bun test              # run the test suite
bun run typecheck     # run tsc --noEmit
bun run build         # compile to dist/ (optional)

The bin entry points directly to src/cli.ts, so you do not need a build during development. Bun runs TypeScript natively.

# Link as a global command
bun link

# Edit source and run immediately
agentlog doctor

# Watch mode
bun run dev:watch

Roadmap

  • Phase 2: Obsidian plugin with timeline visualization UI
  • Phase 3: Git log integration (commits → Daily Note)
  • Future: agentlog run command for session replay from JSONL captures

License

MIT