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

terse-sdk

v0.2.15

Published

TypeScript SDK for building workflows on the [Terse](https://useterse.ai) platform.

Downloads

5,397

Readme

terse-sdk

TypeScript SDK for building workflows on the Terse platform.

Terse is the AI workflow platform for coding agents. You write workflows in TypeScript, mix deterministic tool calls with agentic loops, and deploy serverlessly. Full docs at docs.useterse.ai.

Install

npm install terse-sdk zod

zod is used for structured output schemas.

The fastest way to get started is npm install -g terse-cli && terse init my-project. The CLI scaffolds the project, installs terse-sdk, and generates src/terse.generated.ts for you. See the quickstart.

Example

A Terse workflow is a single TypeScript file. The job below watches a repo for new pull requests, posts a deterministic Slack message, then threads an agent-written summary under it:

import { GithubPRTrigger, generateText, createJob } from "terse-sdk"
import { Repos, Skills, SlackChannel, Triggers, toolbox } from "../terse.generated"
// ^^ Generated based on your workspace

createJob({
    name: "Summarize PR and send slack message",
    triggers: [Triggers.github.onPROpened({ repo: Repos.TerseAI.Terse })],
    onTrigger: async (event: GithubPRTrigger) => {
        // Deterministic call — fixed channel, fixed message. No agent needed.
        const message = await toolbox.slack.sendMessage({
            channelId: SlackChannel.AllTerseInc.channelId,
            message: "New PR from " + event.sender.login + "!"
        })

        // Outputs are strongly typed
        const parentId = message.message_ts

        // Agentic: one prompt in, the model uses the GitHub + Slack tools granted via skills
        await generateText({
            prompt: `
            Summarize this PR ${event.formatForAgentRunner()}.
            Keep it short. Format the summary in Block Kit; include screenshots or diagrams from the PR as image blocks.
            Reply in a thread to the Slack message (thread parent ts: ${parentId}).
            `,
            skills: [
                // Fine tune what the agent has access to. Impossible to touch anything outside this scope
                Skills.github({ repos: [Repos.TerseAI.Terse] }),
                Skills.slack({ channel: SlackChannel.AllTerseInc })
            ]
        })
    }
})

Core concepts

| Concept | What it is | |---|---| | createJob() | Registers a workflow at module load time. | | generateText() | The shorthand for agentic runs: one prompt in, final output out. The model can call any tool granted via skills. Pass a zod outputSchema for structured output. Reach for this in almost every job. | | toolbox.* | Generated, deterministic wrappers. Call directly to bypass the LLM. No agent or skills needed. | | Triggers.* | Per-integration trigger builders, plus Triggers.schedule.cron() and Triggers.webhook.onRequest<Body>(). | | Skills.* | Integration skill factories (e.g. Skills.github({...}), Skills.slack({...})) that scope the tools available to the model. | | TerseAgent.create() | The lower-level agent generateText wraps. Use directly only to stream with run() or reuse one agent instance across calls. |

The trigger builders, skill constructors, and toolbox.* wrappers come from src/terse.generated.ts, which is produced by terse generate. Do not edit it by hand.

Full reference: docs.useterse.ai/reference/typescript-sdk.

Environment

| Variable | Description | |---|---| | TERSE_API_KEY | Required at runtime. The CLI also stores a key per user via terse login. |