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

@outrik/ai-buffer-sdk

v1.0.5

Published

OUTRIK AI Buffer Ads SDK for developer agent thinking loops

Readme

@outrik/ai-buffer-sdk

OUTRIK AI Buffer Ads SDK — Monetize your AI agent's thinking loops with zero-latency, developer-friendly ads.

npm version License: MIT


What is AI Buffer Ads?

When an AI coding agent (Claude, Cursor, GitHub Copilot, etc.) enters a thinking loop, there's a natural pause in the developer's workflow. OUTRIK monetizes this dead-time by displaying a single, non-intrusive, text-only ad line in the terminal or IDE output channel — directly above the spinner.

No pop-ups. No banner images. No interruptions.

The ad disappears the moment the thinking loop ends, and the entire integration adds < 400ms to your tool's response time (enforced hard timeout).


How It Works

[AI Agent Starts Thinking]
  ⠙ Ads by Outrik · Sponsored: Try Zed — The fastest code editor. (learn more: aibfr.outrik.com/r/zed1)
  
[AI Agent Finishes Thinking]
  → Spinner clears, response appears normally

Revenue is split: 52% to you (the publisher), 48% to OUTRIK. Billing is per 10 views = ₹0.01 INR (batched, settled daily).


Installation

npm install @outrik/ai-buffer-sdk

Quick Start

Step 1 — Register your CLI tool on the Publisher Portal

  1. Go to publisher.outrik.com
  2. Log in and navigate to Assets → Add CLI Asset
  3. Select your platform (e.g., vscode, cursor, antigravity_cli, etc.)
  4. Copy your Asset Token after approval

Step 2 — Link your token

npx @outrik/ai-buffer-sdk link --token <YOUR_ASSET_TOKEN>

This saves your config to .outrik/config.json (automatically added to .gitignore).

Step 2 — Wrap your AI tool

Use the wrap command to run any existing AI tool (like Aider, Claude Code, or any other CLI). The SDK will automatically detect its thinking loop and display ads while you wait!

npx @outrik/ai-buffer-sdk wrap -- claude
# or
npx @outrik/ai-buffer-sdk wrap -- aider

That's it! Every time your AI tool enters a "thinking" state, you earn revenue from the displayed ads.


Alternative: Programmatic SDK Integration

If you are a CLI developer building your own AI tool, you can integrate the SDK directly into your source code:

import { AIBufferAds } from '@outrik/ai-buffer-sdk';

const ads = new AIBufferAds({
  agentType: 'my_ai_agent',  // Identifies your agent type for targeting
  platform: 'vscode'         // Your registered platform type
});

// Before AI processing begins
await ads.start();

// ... your AI processing / inference call ...

// When AI processing completes
await ads.stop();

API Reference

new AIBufferAds(options)

| Option | Type | Required | Description | |---|---|---|---| | agentType | string | ✅ | Identifies your agent (e.g., 'claude_agent', 'coding_assistant'). Used for targeting. | | platform | string | ✅ | Your registered platform type (e.g., 'vscode', 'cursor', 'cli_tool'). | | rendererType | 'terminal' \| 'vscode' | ❌ | Defaults to 'terminal'. Use 'vscode' for VS Code Output Channel integrations. |

ads.start(): Promise<void>

Begins the thinking session. Shows the spinner + fetches and renders an ad within 400ms.

ads.stop(): Promise<void>

Ends the thinking session. Clears the ad, submits final view telemetry.

ads.reportWindowActivity(): void

IDE plugin integrations only. Call when the host editor window gains focus. Improves HIP (Human Interaction Proof) score, leading to higher revenue.

ads.reportStdinActivity(): void

IDE plugin integrations only. Call when user input is detected. Improves HIP score.


Safe Environments

The SDK automatically bypasses ad rendering in:

  • CI/CD environments (GITHUB_ACTIONS, GITLAB_CI, CIRCLECI, TRAVIS, JENKINS_URL)
  • Non-TTY environments (piped output, log files)

No configuration needed — it's handled transparently.


VS Code Extension Integration

import { AIBufferAds } from '@outrik/ai-buffer-sdk';

const ads = new AIBufferAds({
  agentType: 'my_extension',
  platform: 'vscode',
  rendererType: 'vscode'  // No carriage-return tricks, clean output channel text
});

// Report focus events for better HIP scoring (= more revenue)
vscode.window.onDidChangeActiveTextEditor(() => ads.reportWindowActivity());

await ads.start();
// ... AI call ...
await ads.stop();

Revenue & Earnings

| Metric | Value | |---|---| | Publisher Revenue Share | 52% | | Platform Commission | 48% | | Billing Unit | 10 views = ₹0.01 INR | | Payment Cycle | Daily rollup, monthly payout | | Minimum Payout | ₹500 INR |

Track your earnings at publisher.outrik.com/dashboard/ai-buffer-earnings.


Supported Platforms

| Platform | platform value | |---|---| | Visual Studio Code | vscode | | Cursor | cursor | | Windsurf | windsurf | | JetBrains IDEs | jetbrains | | Neovim | neovim | | Antigravity CLI | antigravity_cli | | Claude Code CLI | claude_code_cli | | OpenCode CLI | opencode_cli | | Kimi Code CLI | kimi_code_cli | | GitHub Copilot CLI | github_copilot_cli | | Aider | aider_cli | | Continue.dev | continue_dev | | Cline | cline | | Other CLI tool | other_cli |


Privacy & Consent

When you run npx @outrik/ai-buffer-sdk link, you'll be asked for optional profiling consent.

If granted, OUTRIK collects anonymous project metadata (programming language, project type from directory structure) to serve higher-paying, more relevant ads. No personal data, no code, no file contents are ever collected.

You can revoke consent at any time by editing .outrik/config.json:

{
  "asset_token": "your_token",
  "has_profile_consent": false
}

License

MIT © OUTRIK