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

paperclip-plugin-toapis

v1.0.0

Published

ToAPIs adapter plugin for Paperclip — OpenAI-compatible gateway (GPT, Claude, Gemini) via https://toapis.com/v1

Downloads

121

Readme

paperclip-plugin-toapis

Paperclip adapter plugin for ToAPIs — run agents with an OpenAI-compatible POST /v1/chat/completions gateway at https://toapis.com/v1, multi-turn tool calling against Paperclip’s HTTP API, and a paperclip.plugin.json manifest.

Features

  • Multi-turn function-calling loop against ToAPIs (tools + tool_choice)
  • Paperclip REST tools (issues, comments, status, hire, approvals) via ctx.authToken
  • Issue checkout and status transitions (in_progressdone / blocked)
  • Skills loaded from ~/.toapis-adapter/skills (or SKILL.md per folder), configurable via skillsDir / PAPERCLIP_SKILLS_DIR
  • Usage aggregated from usage on each completion; costUsd is 0 in the adapter result (no per-request USD in the public Chat Completions payload — budgets use token counts)
  • Environment test (testEnvironment) with optional GET /v1/models and static fallback list

Not supported

  • Models marked Responses only in the ToAPIs model list — use Chat Completions–capable models only.
  • Accurate USD cost in AdapterExecutionResult from ToAPIs (not exposed like OpenRouter’s generation endpoint).

Quick start

  1. Get an API key from ToAPIs console.
  2. Add this package to your Paperclip monorepo (or depend on paperclip-plugin-toapis from npm if published).
  3. Register the adapter on the server and UI (see REGISTRY_PATCHES.md) and adapter-plugin.md.
  4. Set env (optional) for the Paperclip server process:
export TOAPIS_API_KEY="sk-..."
export TOAPIS_BASE_URL="https://toapis.com/v1"
export PAPERCLIP_AGENT_JWT_SECRET="$(openssl rand -hex 32)"
export PAPERCLIP_API_URL="http://localhost:3100"
  1. Create an agent with adapterType: "toapis" and adapterConfig similar to:
{
  "model": "claude-sonnet-4-6",
  "apiKey": "sk-...",
  "temperature": 0.3,
  "maxTokens": 4096,
  "maxTurns": 25
}

Configuration

| Field | Description | |--------|-------------| | model | ToAPIs model id (e.g. claude-sonnet-4-6, gpt-5). See docs. | | apiKey | ToAPIs API key; falls back to TOAPIS_API_KEY. | | baseUrl | Gateway base URL (default https://toapis.com/v1 or TOAPIS_BASE_URL). | | systemPrompt, temperature, maxTokens, topP | Standard chat parameters. | | maxTurns | Max tool-loop iterations (default 25). | | autoApprove | Skip approval gates for hire/approval tools (default false). | | skillsDir | Override skills root (default ~/.toapis-adapter/skills). |

Development

pnpm install
pnpm typecheck
pnpm build

Requires @paperclipai/adapter-utils (published from Paperclip; see package.json). For a Paperclip monorepo, you can switch the dependency to "workspace:*" and add this package to pnpm-workspace.yaml.

License

MIT