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

codeinsight-ai

v2.0.0

Published

A comprehensive CLI tool for AI researchers that analyzes repositories, generates documentation, and integrates with OpenAI API

Readme

CodeInsight AI

A comprehensive CLI tool for AI researchers that analyzes repositories, generates documentation, and integrates with OpenAI API.

Features

  • Repository Analysis: Extract and analyze code from a directory
  • OpenAI Integration: Generate AI-powered documentation about repository architecture
  • Multiple Documentation Types: Generate architecture docs, user stories, code stories, or custom analysis
  • Markdown Output: All documentation is generated in markdown format for easy viewing and sharing
  • Terminal Rendering: View documentation directly in your terminal with proper formatting

Installation

Global Installation

npm install -g codeinsight-ai

Local Installation

npm install codeinsight-ai

Usage

Analyze Repository

Extract and analyze code from a repository:

codeinsight analyze [directory] --output analysis.md --exclude dist,build

Options:

  • --output, -o: Output file name (default: "repo_analysis.txt")
  • --exclude, -x: Additional exclusion pattern(s) (e.g., "dist,build")
  • --max-size, -s: Maximum file size in bytes to include
  • --save: Save analysis to server for future reference

Generate Documentation

Generate documentation from repository code using OpenAI:

# Generate architectural documentation
codeinsight generate-docs <repository_id> --type architecture

# Generate narrative code story with moderate complexity
codeinsight generate-docs <repository_id> --type code_story --complexity moderate

Options:

  • --type: Type of documentation to generate (architecture, user_stories, code_story, custom)
  • --complexity: Complexity level for code stories (simple, moderate, detailed) - only used with type=code_story
  • --prompt: Custom prompt for documentation generation (required if type=custom)
  • --api-key: OpenAI API key (will use OPENAI_API_KEY environment variable if not provided)

List Repositories

List all analyzed repositories:

codeinsight list-repos

List Documentation

List all documentation generated for a repository:

codeinsight list-docs <repository_id>

View Document

View a specific document in the terminal or save as markdown:

codeinsight view-doc <document_id> --format terminal

Options:

  • --format: Output format: "terminal" or "markdown" (default: "terminal")

Code Story Feature

The Code Story feature transforms complex code structures into narrative explanations using OpenAI's language models. It helps developers and researchers understand intricate code by creating engaging stories that explain:

  • Design Decisions: Why code is structured a certain way
  • Logic Flow: How data and control flow through the system
  • Complex Algorithms: Detailed explanations using metaphors and analogies
  • Architecture Patterns: The reasoning behind architectural choices

Choose from three complexity levels:

  • Simple: Beginner-friendly explanations focusing on high-level concepts
  • Moderate: Balanced technical details with narrative storytelling
  • Detailed: In-depth explanations for experienced developers

Example usage:

codeinsight generate-docs 1 --type code_story --complexity simple

Environment Variables

  • OPENAI_API_KEY: Your OpenAI API key

License

MIT