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

opencode-autosave-conversation

v1.1.0

Published

OpenCode plugin to automatically save conversation records to markdown files

Readme

opencode-autosave-conversation

Automatically save your OpenCode conversations to markdown files.

Features

  • Automatic file creation when you start a new conversation
  • Auto-saves when the session becomes idle (silent execution, no console output)
  • Files organized by timestamp and topic: YYYYMMDD-HH-MM-SS-topic.md
  • Images saved as separate files instead of base64 (keeps markdown clean)
  • Full tool call details preserved (inputs and outputs)
  • Child sessions (subagent tasks) inlined within parent files
  • Clean, readable markdown format
  • UTF-8 support for Chinese and other Unicode content
  • Global backup: Conversations also saved to ~/.conversations/{project_name}/

Installation

npm install -g opencode-autosave-conversation

Configuration

Add the plugin to your opencode.json (project-level or ~/.config/opencode/opencode.json):

{
  "plugin": ["opencode-autosave-conversation"]
}

For local development, use the file:// protocol:

{
  "plugin": ["file:///path/to/opencode-autosave-conversation"]
}

Usage

Once installed, the plugin automatically:

  1. Creates a ./conversations/ directory in your project
  2. Creates a new markdown file when you start a conversation
  3. Saves all messages when the session becomes idle (2 second debounce)
  4. Saves images to ./conversations/images/ directory
  5. Includes child session (subagent) content inline in the parent file
  6. Mirrors all saves to ~/.conversations/{project_name}/ for global backup

No configuration needed - just install and start chatting!

File Naming

Markdown Files

Format: YYYYMMDD-HH-MM-SS-topic.md

  • Date/Time: When the conversation started (with hyphens between hours, minutes, seconds)
  • Topic: Extracted from your first message (max 30 characters)

Examples:

  • 20250129-10-30-45-implement-authentication.md
  • 20250129-14-22-30-fix-bug-in-parser.md

Image Files

Format: YYYYMMDD-HH-MM-SS-topic-index.ext

Images are saved to ./conversations/images/ directory:

  • 20250129-10-30-45-implement-authentication-0.png
  • 20250129-10-30-45-implement-authentication-1.jpg

Output Format

# Session: Implement user authentication

**Created:** 2025-01-29 10:30:45

---

## Conversation

### User
*2025-01-29 10:30:45*

Help me implement user authentication for my app

![screenshot](images/20250129-10-30-45-implement-authentication-0.png)

### Assistant
*2025-01-29 10:30:50*

I'll help you implement user authentication. Let me first check your current setup.

#### Tool: Read
**Status:** completed

**Input:**
```json
{
  "filePath": "src/app.ts"
}
```

**Output:**
```
import express from 'express';
const app = express();
// ... file content
```

Based on what I see, I recommend...

---

## Child Sessions

### Subagent: Code Review
*Started: 2025-01-29 10:35:00*

#### User
*2025-01-29 10:35:00*

Review the authentication implementation

#### Assistant
*2025-01-29 10:35:10*

The implementation looks good...

Directory Structure

Conversations are saved to two locations:

Primary (project-local):

your-project/
├── conversations/
│   ├── images/
│   │   ├── 20250129-10-30-45-topic-0.png
│   │   └── 20250129-10-30-45-topic-1.jpg
│   ├── 20250129-10-30-45-implement-auth.md
│   └── 20250129-14-22-30-fix-bug.md
└── ...

Global backup (~/.conversations/{project_name}/):

~/.conversations/
└── your-project/
    ├── images/
    │   ├── 20250129-10-30-45-topic-0.png
    │   └── 20250129-10-30-45-topic-1.jpg
    ├── 20250129-10-30-45-implement-auth.md
    └── 20250129-14-22-30-fix-bug.md

Both locations contain identical content. The global backup allows you to access all your conversations across different projects from a single location.

Troubleshooting

Files not being created

  1. Check that the plugin is listed in your opencode.json
  2. Verify the project directory is writable

Missing content

  • Content is saved on session idle, not immediately
  • Wait 2-3 seconds after your last message
  • Content is also saved when the session is deleted/ended

Child sessions not appearing

  • Child sessions are inlined in the parent session's file
  • They appear in the "Child Sessions" section at the bottom
  • Child session files are not created separately

Development

# Install dependencies
npm install

# Build
npm run build

# Type check
npm run typecheck

# Lint
npm run lint

License

MIT