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

studylib

v1.0.1

Published

A Library that studies project installed libraries by using AI modules.

Downloads

5

Readme

StudyLib 📚

A powerful library documentation generator powered by AI (OpenAI GPT-4 and Google Gemini).

Features

  • 🤖 AI-powered documentation generation
  • 🔄 Support for both OpenAI and Google Gemini
  • 📝 Detailed method documentation with parameter and return type information
  • 🎨 Beautiful CLI output with syntax highlighting
  • 📄 Pagination support for large libraries
  • ⚡ Fast and efficient processing

Installation

npm install -g studylib
# or
pnpm add -g studylib
# or
yarn global add studylib

Configuration

Create a .env file in your project root with your AI API keys:

# Required API Keys
OPENAI_API_KEY=your_openai_api_key
GEMINI_API_KEY=your_gemini_api_key

# Optional Configuration
DEFAULT_AI_TOOL=openai      # or gemini (default: openai)
DEFAULT_ITEMS_PER_PAGE=20   # Number of items per page (default: 20)
OPENAI_MODEL=gpt-4         # OpenAI model to use (default: gpt-4)
GEMINI_MODEL=gemini-pro    # Gemini model to use (default: gemini-pro)
DEBUG=false               # Enable debug mode (default: false)

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | OPENAI_API_KEY | Yes | - | Your OpenAI API key | | GEMINI_API_KEY | Yes | - | Your Google Gemini API key | | DEFAULT_AI_TOOL | No | openai | Default AI tool to use (openai or gemini) | | DEFAULT_ITEMS_PER_PAGE | No | 20 | Default number of items to show per page | | OPENAI_MODEL | No | gpt-4 | OpenAI model to use | | GEMINI_MODEL | No | gemini-pro | Gemini model to use | | DEBUG | No | false | Enable debug mode for detailed error messages |

Usage

studylib <library-name> [options]

Options

  • -t, --ai-tool <tool>: AI tool to use (openai or gemini)
  • -p, --page <number>: Page number for pagination
  • -i, --items-per-page <number>: Number of items to show per page
  • -h, --help: Display help information
  • -v, --version: Display version information

Examples

# Study lodash using OpenAI
studylib lodash -t openai

# Study React using Gemini, showing 30 items per page
studylib react -t gemini -i 30

# View page 2 of Express documentation
studylib express -p 2

Development

  1. Clone the repository
  2. Install dependencies:
    pnpm install
  3. Build the project:
    pnpm build
  4. Run in development mode:
    pnpm dev

Troubleshooting

Common Issues

  1. API Key Errors

    • Ensure both OPENAI_API_KEY and GEMINI_API_KEY are set in your .env file
    • Verify the API keys are valid and have sufficient permissions
  2. Invalid Configuration

    • Check that DEFAULT_AI_TOOL is either openai or gemini
    • Ensure DEFAULT_ITEMS_PER_PAGE is a positive number
  3. Documentation Generation Errors

    • Try switching between OpenAI and Gemini if one service fails
    • Enable debug mode by setting DEBUG=true for detailed error messages

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

ISC License