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

pi-tinyfish-tools

v0.2.1

Published

TinyFish Web Agent tools for pi — search, fetch, and goal-driven browser automation

Downloads

887

Readme

pi-tinyfish

TinyFish Web Agent tools for pi — search, fetch, and goal-driven browser automation.

Tools

| Tool | API | Description | |------|-----|-------------| | tinyfish_search | Search API | Web search with ranked results, snippets, and URLs | | tinyfish_fetch | Fetch API | Render URLs and extract clean content (markdown/html/json) | | tinyfish_agent_run | Agent API (SSE) | Goal-driven browser automation with real-time progress | | tinyfish_run_get | Runs API | Query a specific automation run's status and result | | tinyfish_run_list | Runs API | List/search historical automation runs | | tinyfish_run_cancel | Runs API | Cancel an in-progress run |

Setup

  1. Install:
pi install npm:pi-tinyfish
# or local:
pi install ./pi-tinyfish
  1. Configure your TinyFish API key (get one from agent.tinyfish.ai/api-keys):
/tinyfish-login
  1. Check status:
/tinyfish-status

Configuration

API key and defaults are stored in ~/.pi/agent/pi-tinyfish.json (permissions 0600). No global environment variable required.

{
  "apiKey": "tf_xxx",
  "defaultLocation": "US",
  "defaultLanguage": "en",
  "defaultFetchFormat": "markdown",
  "defaultBrowserProfile": "lite"
}

Fallback: TINYFISH_API_KEY env var for CI / debugging.

Commands

| Command | Description | |---------|-------------| | /tinyfish-login | Enter your TinyFish API key interactively | | /tinyfish-status | Show configuration status (key never exposed) | | /tinyfish-logout | Remove stored API key |

Development

npm install          # peer deps
npm test             # vitest
pi -e .             # load extension for testing

Tool Result UI

Tool results follow a three-layer information model so the LLM gets the full picture while the user only sees what they need on screen:

| Layer | Field | Audience | Purpose | |-------|-------|----------|---------| | Full data | content | LLM | Complete output enters the next conversation turn — never truncated for the LLM | | Structured | details | Renderer & state | Compact summary (status, count, urls) used by renderResult and persisted in session state | | Visual | renderResult | Human | Default view is a one-line summary; press Ctrl+O (app.tools.expand) to expand the full markdown |

This applies to all six tools. See src/tools/README.md for the per-tool contract.

Directory layout

index.ts               # Standard package entry — re-exports src/index.ts
src/
  index.ts          # Extension implementation — registers tools and /commands
  api.ts            # TinyFish REST/SSE client
  config.ts         # ~/.pi/agent/pi-tinyfish.json read/write
  format.ts         # Output text formatters
  render.ts         # Shared renderResult helpers (collapsible markdown)
  tools/
    search.ts       # tinyfish_search
    fetch.ts        # tinyfish_fetch
    agent-run.ts    # tinyfish_agent_run
    run-get.ts      # tinyfish_run_get
    run-list.ts     # tinyfish_run_list
    run-cancel.ts   # tinyfish_run_cancel
skills/
  tinyfish/
    SKILL.md        # Agent-facing usage guide

Design notes

  • All six tools are synchronousexecute() awaits the full response. No background runs, no pi.sendMessage injection. The LLM sees results in the natural tool-call return.
  • details is the source of truth for collapsible summaries; content is the source of truth for LLM context. They are intentionally not derived from each other.
  • truncateOutput (format.ts) only trims content when the caller passes maxBytes; it never silently strips data the LLM needs.