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

next-ai-wiki

v1.0.1

Published

A CLI tool that watches your Next.js source files and auto-generates Markdown documentation using Google's ADK (Agent Development Kit) and Gemini AI.

Readme

next-ai-wiki


A CLI tool that scans your entire project holistically and auto-generates structured, wiki-style documentation using your choice of AI provider — Google Gemini, OpenAI, or Anthropic Claude.

Built for Next.js projects. Creates a self-contained wiki at /wiki in your app directory — inspired by Google CodeWiki.

✨ Features

  • 🧠 Holistic Analysis — AI reads your entire codebase in one pass, not file-by-file
  • 🤖 Multi-Provider — Choose between Gemini, OpenAI, or Anthropic Claude
  • 📂 Smart Grouping — Docs organized into logical categories & sections
  • 🏠 AI Welcome Page — Generates a project overview with tech stack, features, and getting started
  • 📚 Zero-Config Wiki — Scaffolds a full wiki system at /wiki with sidebar navigation
  • Smart Watcher — File changes trigger only the affected section to regenerate
  • 🌙 Dark Mode — Built-in dark mode support
  • ⚙️ Configurable — Whitelist folders, customize ignores, choose your model

🚀 Quick Start

1. Install

npm install -g next-ai-wiki

2. Configure (Required)

next-ai-wiki config

This creates next-ai-wiki.config.ts where you set your provider and API key.

3. Initialize

next-ai-wiki init

This will:

  1. Detect your app/ directory
  2. Install markdown rendering packages
  3. Scaffold the wiki at app/wiki/
  4. Analyze your entire project with AI
  5. Generate a Welcome Page + categorized documentation sections

4. Watch for Changes

next-ai-wiki watch

Any source code change will re-analyze only the affected section.

5. View Your Wiki

npm run dev

Visit http://localhost:3000/wiki.


🤖 AI Providers

| Provider | Default Model | Free Tier | Env Var | |----------|--------------|-----------|---------| | gemini (default) | gemini-3-flash-preview | ✅ Yes | GOOGLE_API_KEY | | openai | gpt-5.1 | ✅ Check pricing | OPENAI_API_KEY | | anthropic | claude-haiku-4-5 | ⚠️ Prepaid | ANTHROPIC_API_KEY |

Get your API keys:


⚙️ Configuration

Example: next-ai-wiki.config.ts

import type { WikiConfig } from 'next-ai-wiki';

const config: WikiConfig = {
  // AI Provider: 'gemini' | 'openai' | 'anthropic'
  provider: 'gemini',

  // API Key — prefer environment variables for security
  apiKey: process.env.GOOGLE_API_KEY,

  // Model (optional — defaults are set per provider)
  model: 'gemini-3-flash-preview',

  // Whitelist specific folders (leave empty to scan everything)
  include: ['src/components'],

  // Additional folders to ignore
  ignore: ['scripts', 'cypress'],
};

export default config;

Switching to OpenAI:

const config: WikiConfig = {
  provider: 'openai',
  apiKey: process.env.OPENAI_API_KEY,
  model: 'gpt-5.1', // or 'gpt-4o'
};

Switching to Anthropic:

const config: WikiConfig = {
  provider: 'anthropic',
  apiKey: process.env.ANTHROPIC_API_KEY,
  model: 'claude-haiku-4-5', // or 'claude-sonnet-4-5'
};

Ignored by default: node_modules, .next, dist, .git, public, config files, lock files.


📁 Output Structure

app/wiki/
├── layout.tsx         ← Wiki shell (Sidebar + Main)
├── page.tsx           ← Welcome page (renders welcome.md)
├── wiki.css           ← Styles (Dark mode supported)
├── lib.ts             ← Navigation tree helper
├── structure.json     ← Sidebar structure (grouped categories)
├── [...slug]/
│   └── page.tsx       ← Renders section .md files
└── docs/
    ├── welcome.md         ← AI-generated project overview
    ├── api-routes.md      ← Grouped documentation sections
    ├── ui-components.md
    └── authentication.md

Sidebar example:

📚 Documentation
  🏠 Welcome
  ▼ UI Components
      Blog Components
      Navigation
  ▼ Backend
      API Routes
      Authentication
  ▼ Configuration
      Environment & Config

🤝 Contributing

Contributions are welcome!

  1. Fork & Clone
  2. Create branch
  3. Commit changes
  4. Push & PR

📄 License

MIT License.


👤 Author

Muhammad Asim