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

@focusd/api

v1.0.8

Published

Focusd API client library

Readme

@focusd/api

Focusd API client library with protobuf definitions and TypeScript types.

Installation

npm install @focusd/api

Usage

TypeScript/JavaScript - Import custom types

import { Session, Application, Classification, AuthProvider } from '@focusd/api';

// Create a session
const session: Session = {
  name: "Work Session",
  duration: { seconds: 3600, nanos: 0 },
  started_at: { seconds: Date.now() / 1000, nanos: 0 }
};

// Create an application
const app: Application = {
  name: "VS Code",
  title: "Visual Studio Code",
  bundle_id: "com.microsoft.VSCode",
  url: "file:///path/to/project",
  classification: Classification.CLASSIFICATION_PRODUCTIVITY,
  categories: ["development", "coding"]
};

Import protobuf-generated types (advanced)

// API types only
import { AskLLMRequest, AskLLMResponse } from '@focusd/api/api';

// Engine types only  
import { Session, Application, EngineService } from '@focusd/api/engine';

Available Types

Custom TypeScript Types

  • Session - Focus session with optional id, timestamps, and duration
  • Application - Application information with classification and categories
  • Classification - Application classification enum (NEUTRAL, PRODUCTIVITY, DISTRUCTION)
  • AuthProvider - Authentication provider enum (GITHUB, GOOGLE, APPLE)
  • FocusStartRequest - Start focus session request
  • FocusStartResponse - Start focus session response
  • FocusCheckRequest - Check focus status request
  • FocusCheckResponse - Check focus status response
  • FocusStatusResponse - Focus status response
  • AuthStartRequest - Start auth request
  • AuthRedirectURLRequest - Auth redirect request
  • AuthRedirectURLResponse - Auth redirect response

Protobuf-Generated Types (Advanced)

  • AskLLMRequest - Request for LLM queries
  • AskLLMResponse - Response from LLM queries
  • AuthRedirectURLRequest - Authentication redirect request
  • AuthRedirectURLResponse - Authentication redirect response
  • LLMProviderType - LLM provider type enum
  • APIService - API service definition
  • EngineService - Engine service definition