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-session-elapsed

v0.1.3

Published

OpenCode TUI plugin that shows session elapsed, cumulative work, and response timers in the prompt line.

Readme

opencode-session-elapsed

A OpenCode TUI plugin that shows live timers in the prompt line:

  • ◷ Session elapsed: how long the current session has been open
  • ⚙ Work time: total time the assistant has been generating (cumulative across the session)
  • ⚡ Response time: time for the current/last response (live while generating, then finalized)
  ◷ 2h 3m   ⚙ 1h 12m   ✓ 45s

Demo

All timers are optional, configurable, and safe to keep on: they disappear automatically when there is nothing to show.

Requirements

  • OpenCode ≥ 1.18.0 (TUI mode)
  • macOS / Linux / Windows

Install

From npm

Add the plugin to the TUI config in ~/.config/opencode/tui.json:

{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["opencode-session-elapsed"]
}

Restart OpenCode. Done: you'll see the timers in the prompt line.

From source

Clone the repo and reference the plugin file directly:

git clone https://github.com/siriscmv/opencode-session-elapsed.git
{
  "$schema": "https://opencode.ai/tui.json",
  "plugin": ["file:///path/to/opencode-session-elapsed/src/index.tsx"]
}

Restart OpenCode. Done: you'll see the timers in the prompt line.

Configure

Pass options as a tuple entry. All options are optional; defaults are shown below.

{
  "plugin": [
    [
      "opencode-session-elapsed",
      {
        "timers": { "session": true, "work": true, "response": true },
        "format": "compact",
        "icons": true,
        "slot": "session_prompt_right",
        "order": 200,
        "refreshMs": 1000,
        "colors": {
          "session": "#22c55e",
          "work": "#3b82f6",
          "response": "#f59e0b",
          "responseDone": "#22c55e"
        }
      }
    ]
  ]
}

Options

| Option | Type | Default | Description | | ------------ | ------------------------------------------------------------ | ----------------------- | --------------------------------------------------------------------------- | | timers | { session?, work?, response? } | all true | Toggle each timer independently. | | format | "compact" \| "full" | "compact" | compact1h 5m, full1:05:33 (clock-style, zero-padded). | | icons | boolean | true | Show the ◷ ⚙ ⚡ ✓ glyphs. | | slot | "session_prompt_right" \| "home_prompt_right" \| "sidebar_footer" \| "app_bottom" | "session_prompt_right" | Which part of the TUI the timers render in. | | order | number | 200 | Slot ordering relative to other plugins. Lower renders first. | | refreshMs | number | 1000 | Update interval in milliseconds (minimum 250). | | colors | { session?, work?, response?, responseDone? } | theme colors | Hex color overrides (e.g. #22c55e) for each timer's icon. |

Examples

Only the session timer, clock format, in the sidebar footer:

{
  "plugin": [
    [
      "opencode-session-elapsed",
      { "timers": { "session": true, "work": false, "response": false }, "format": "full", "slot": "sidebar_footer" }
    ]
  ]
}

Minimal, no icons:

{
  "plugin": [["opencode-session-elapsed", { "icons": false }]]
}

How it works

The plugin subscribes to TUI session state and ticks a 1s timer:

  • Session elapsed: now minus the session's time.created.
  • Work time: sums assistant.time.completed - assistant.time.created over every assistant message; the in-progress message is counted live while the session is busy.
  • Response time: time from the last user message to the last assistant message completion (or the live elapsed time while still generating).

Development

bun install
bun run typecheck   # TypeScript checks
bun test            # unit tests (formatting)
bun run build       # bundle to dist/ (run before publishing)

License

MIT © Siris