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

nota-ai

v1.0.1

Published

A command-line tool for developers that automatically generates code comments using locally hosted Ollama models.

Readme

Nota AI

Nota AI is a command-line tool for developers that automatically generates code comments using locally hosted Ollama models.
All processing happens on your machine: no APIs, no cloud data transfer.

Features

  • Generates Google-style DocStrings and (optionally) inline comments for:
    • complex logic,
    • algorithms,
    • state changes,
    • error handling,
    • configurations.
  • Automatic language detection:
    Python, JavaScript, TypeScript, C++, Java, PHP, Go, C#
  • Handles large files (1000–5000+ lines) by splitting them into manageable chunks.
  • Configurable via .notarc.json (model, commenting style, etc.).

Installation

Install Nota AI globally using npm:

npm install -g nota-ai

Prerequisites

  1. Install Ollama.
  2. Pull and run a compatible model, for example:
    ollama pull llama3
    ollama run llama3
  3. Ensure Ollama is running locally (default: http://localhost:11434).

Usage

Generate comments for a code file:

nota comment <input_file> [--config <config_file>]
  • <input_file> — path to the source code file (e.g., src/index.py)
  • --config — optional path to config file (default: .notarc.json)

Example:

nota comment src/main.py

Show help:

nota --help

Configuration

Create a .notarc.json file in the root of your project to customize behavior:

{
  "nota": {
    "ai": {
      "model": "llama3",
      "temperature": 0.5
    },
    "commenting": {
      "includeLineComments": false,
      "includeDocstrings": true,
      "overwriteExisting": false
    }
  }
}

Options

  • nota.ai.model — Ollama model name (e.g., llama3, codellama).
  • nota.ai.temperature — creativity/randomness (0.0–1.0, default: 0.5).
  • nota.commenting.includeLineComments — enable inline comments (default: false).
  • nota.commenting.includeDocstrings — generate DocStrings (default: true).
  • nota.commenting.overwriteExisting — overwrite existing comments (default: false).

Handling Large Files

  • up to 800 lines → single pass;
  • 800–4000 lines → chunks of ~1000 lines;
  • 4000+ lines → chunks of ~500 lines.

If the model has a small context window (e.g., 8k tokens), processing large files may be slow or fail.
It is recommended to use models with a larger context window (128k+).

Supported Languages

  • Python (.py)
  • JavaScript (.js)
  • TypeScript (.ts)
  • C++ (.cpp)
  • Java (.java)
  • PHP (.php)
  • Go (.go)
  • C# (.cs)

Commenting Guidelines

Nota AI generates comments that:

  • Use Google-style DocStrings for functions and classes.
  • Are written in English.
  • Focus on business logic, algorithms, non-trivial calculations, and error handling.
  • Avoid describing obvious code (e.g., getters/setters).
  • Are concise: 1–2 sentences, professional tone.

Notes

  • Ensure the selected Ollama model is running before using Nota AI.
  • Performance depends on your system and model’s context window.
  • Mixed-language files may be partially supported.
  • Existing comments are preserved unless overwriteExisting = true.

Example

nota comment src/main.py

Disclaimer

This project does not include or distribute any AI models.
Nota AI only provides an interface for running locally hosted models via Ollama.

All models (e.g., LLaMA, Mistral, Phi, CodeLlama, etc.) are subject to their original licenses.
Users are responsible for downloading models separately and complying with their respective license terms.

License

MIT