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

askscout-core

v0.1.0

Published

Shared library powering askscout — git reading, LLM digest summarization, output formatting, and project state management.

Readme

askscout-core

Shared library powering askscout — git reading, LLM digest summarization, output formatting, and project state management.

npm version License: MIT

This is the engine behind the askscout CLI and the askscout.dev web app. Most users want one of those, not this package directly. Use this package if you're building your own integration on top of the same primitives.

Install

npm install askscout-core

Requires Node.js >= 22. ESM and CJS builds are both shipped.

What's exported

Git reading

  • getCommits(projectRoot, since) — read git history into typed GitCommit[]
  • getDiffs(projectRoot, commits) — extract per-file diffs as GitDiff[]
  • getRepoName(projectRoot) — read the repo's owner/name slug

LLM summarization

  • summarize(commits, diffs, state, options) — generate a structured Digest from git data
  • buildSystemPrompt, buildUnifiedSystemPrompt, buildAIContextSystemPrompt, buildStandupSystemPrompt — the prompts the CLI and web both use
  • buildUserPrompt, formatCommitsForPrompt, formatDiffsForPrompt, computeStats — lower-level helpers

Formatting

  • formatDigest(digest, options) — terminal-ready digest output
  • formatCodebaseHealth(commits, diffs?) — Most Active Files + Growth / Focus / Churn indicators
  • formatCodingTimeline(commits) — single-line session summary
  • formatPaceCheck({ todayCommits, history }) — pace multiplier vs rolling baseline
  • formatResume(digest) — Resume Prompt output
  • formatStandup(digest) — Standup output

All formatters auto-detect TTY / NO_COLOR and fall back to plain bracketed labels when piped or in CI.

Project state

  • readState(projectRoot), writeState(projectRoot, state) — read/write .askscout/state.json
  • appendDigestRun(history, run) — append a run to the rolling history (capped at STATE_HISTORY_CAP)
  • STATE_HISTORY_CAP — current cap (10)

Types

Digest, DigestItem, DigestStats, DigestRunSummary, GitCommit, GitDiff, HealthIndicator, OutputMode, ProjectState, ResumeContext, ResumePrompt, Standup, StandupNotes, SummarizeOptions, SummarizeResult, TimeRange, UnstableItem, AiConfig, AiProvider.

See src/types.ts for full type definitions.

Example

import { getCommits, getDiffs, summarize, formatDigest, readState } from "askscout-core";

const projectRoot = process.cwd();
const since = new Date(Date.now() - 24 * 60 * 60 * 1000); // last 24h
const commits = await getCommits(projectRoot, since);
const diffs = await getDiffs(projectRoot, commits);
const state = await readState(projectRoot);

const result = await summarize(commits, diffs, state, {
  apiKey: process.env.ANTHROPIC_API_KEY!,
  provider: "anthropic",
});

console.log(
  formatDigest(result.digest, {
    repoName: "your-org/your-repo",
    timeLabel: "today",
  }),
);

Stability

Pre-1.0. Public API may change between minor versions. Pin a version range that matches your tolerance.

Source

github.com/charleshonig5/askscout

License

MIT © 2026 Charles Honig