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

@pyunto/tm-sdk

v0.3.1

Published

TypeScript SDK for the Pyunto Time Management public REST API (v1) with client-side E2EE decryption.

Readme

@pyunto/tm-sdk

TypeScript SDK for the Pyunto Time Management public REST API (v1), with optional client-side end-to-end-encryption (E2EE) decryption. Works in Node 18+ and modern browsers.

Install

npm install @pyunto/tm-sdk

Getting an API key

In the app: Settings → Account → API keys — create a key and pick scopes:

| scope | grants | |---|---| | projects:read | project & task lists | | blocks:read | time blocks | | blocks:write | create time blocks | | record:read | per-day time aggregates | | keys:read | wrapped key material for E2EE decryption |

The plaintext key (ptm_…) is shown once — store it securely.

Plain usage (no crypto needed)

Dates, times, durations and aggregates are always plaintext, and legacy (non-E2EE) projects return names/memos in plaintext too:

import { PyuntoTM } from "@pyunto/tm-sdk";

const tm = new PyuntoTM({ apiKey: process.env.PTM_KEY! });

// "2h on project #3 / task #12 on the 20th"
const record = await tm.serviceRecord("2026-07-01", "2026-07-31");

// Raw blocks for a day
const blocks = await tm.blocks("2026-07-20", "2026-07-20");

// Log work from your app
await tm.logWork({
  project_id: 3, date: "2026-07-20",
  start_min: 9 * 60, end_min: 10 * 60,
  memo: "Wrote the weekly report",
});

E2EE usage

E2EE projects return name_enc / memo_enc ciphertext instead of plaintext. To decrypt, the API key needs the keys:read scope and the user must enter their account password once — the password derives the key that unwraps their private key locally; neither the password nor any decrypted key ever reaches the server (that is the point of E2EE).

await tm.unlock(passwordFromUserPrompt);   // once per session

const projects = await tm.projects({ decrypt: true }); // names filled in
const blocks = await tm.blocks("2026-07-20", "2026-07-20", { decrypt: true });

// logWork() now encrypts memos client-side for E2EE projects automatically
await tm.logWork({ project_id: 5, date: "2026-07-20", start_min: 540, end_min: 600, memo: "…" });

tm.lock(); // wipe key material when done

Error handling

All API failures throw PyuntoTMError with .status (HTTP status) and the server's detail message. unlock() throws on a wrong password.

Endpoints covered

me(), projects(), tasks(projectId?), blocks(from, to), serviceRecord(from, to), logWork(input), unlock(password), lock().

Rate limit: 240 requests/minute per key. Date ranges are capped at 92 days.