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

gemini-pool

v1.0.0

Published

The ultimate Gemini API wrapper for developers. Simple, powerful, and all-in-one.

Readme

🌌 Gemini Pool (2026 Edition)

The ultimate, all-in-one Gemini API wrapper for developers. Stop juggling multiple SDKs and complex configurations. Gemini Pool provides a premium, production-grade intelligence layer that makes Google's most powerful AI models (2.5 & 3.1) effortless to orchestrate.

NPM Version Quality Score TypeScript


✨ Features

  • 🚀 One-Line AI: gemini.ask('Hello!') - it's that simple.
  • 🧠 2026 Models: Native support for Gemini 2.5 (Stable) and Gemini 3.1 (Preview).
  • 🛡️ Safety Presets: Stop configuring arrays. Use 'STRICT', 'BALANCED', or 'NONE'.
  • 🖼️ Multi-Modal Magic: Pass local file paths, URIs, or base64 directly to the media property.
  • 🏗️ Automated JSON: Pass a schema and get back a pre-parsed data object. No more JSON.parse().
  • 🔍 Deep Grounding: Built-in Google Search, Google Maps, and Dynamic Retrieval thresholds.
  • 🤖 Power Tools: Integrated support for Computer Use, MCP (Model Context Protocol), and File Search.
  • 💬 Real-time Live: WebSocket-based multimodal sessions for audio/video/text interaction.
  • 📈 Benchmarking: Built-in tools to compare model performance (Latency vs. Accuracy).

📦 Installation

npm install gemini-pool

🛠️ Quick Start

1. Initialize the Client

You can pass your API key directly or set the GEMINI_API_KEY environment variable.

import { Gemini } from 'gemini-pool';

// Method A: Pass directly
const gemini = new Gemini('YOUR_API_KEY');

// Method B: Uses process.env.GEMINI_API_KEY
const gemini = new Gemini(); 

2. Basic Text Generation

const res = await gemini.ask('What is the future of AI?');
console.log(res.text);

Multi-Modal & Safety Presets

const res = await gemini.ask('Analyze this screenshot', {
  media: './screenshot.png',      // Automatically handles local path, detects MIME
  safetySettings: 'STRICT'        // One-word safety configuration
});

Automated Structured Data

const city = await gemini.ask('Tell me about Paris', {
  schema: { 
    type: 'object', 
    properties: { 
      population: { type: 'number' } 
    } 
  }
});

// Access parsed data directly!
console.log(city.data.population); 

🧠 Advanced Capabilities

Thinking & Reasoning (Gemini 2.5+)

const math = await gemini.think('Solve for X: 2x + 5 = 15', {
  includeThoughts: true 
});
console.log(math.thoughts); // View the model's internal reasoning

Context Caching (Reduce Cost)

const cache = await gemini.caching.create({
  model: 'gemini-2.5-pro',
  contents: [{ role: 'user', parts: [{ text: '...long document...' }] }],
  ttlSeconds: 3600
});

// Use the cache in subsequent requests
await gemini.ask('Summarize the document', { cachedContent: cache });

Live Multimodal (WebSockets)

const session = gemini.live;
session.on('text', (text) => console.log('Live Response:', text));

await session.connect();
session.sendText('Hello, Gemini!');

📊 Token Management

Stay within budget with built-in token counting before you send the request.

const { totalTokens } = await gemini.countTokens('Analyzing a massive prompt...', {
  media: './large-image.jpg'
});
console.log(`Cost Estimate: ${totalTokens} tokens`);

🏆 Quality Standards

  • 100/100 Quality Score: Zero lint warnings, zero build errors.
  • Production Ready: Built with robust error handling and ESM support.
  • Modern Stack: Optimized for Node.js 20+ and TypeScript 5+.

📄 License

MIT © Antigravity & Monarch Labs Inc.