---
title: "Create your Own AI Code Commentor and Run it on your machine using Ollama"
url: https://daily.dev/posts/create-your-own-ai-code-commentor-and-run-it-on-your-machine-using-ollama-7w3xsy3xj
source_url: https://daily.dev/posts/create-your-own-ai-code-commentor-and-run-it-on-your-machine-using-ollama-7w3xsy3xj
type: freeform
source: "Coding Adda"
author: "Aditya Trivedi"
published: 2025-01-17T13:45:22.892Z
updated: 2025-01-17T13:45:33.453Z
tags: ["ai", "github", "nodejs", "llm", "vscode"]
reading_time: 2
upvotes: 63
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create your Own AI Code Commentor and Run it on your machine using Ollama

**[Coding Adda](https://daily.dev/sources/codingadda)** · [@devadi](https://daily.dev/devadi) · 2 min read · 63 upvotes · 0 comments

## Summary

Learn how to create and run your own AI code comment generator using Ollama and VsCode. This project leverages NodeJs and requires a machine capable of using LLMs. Follow the setup steps to install Ollama, pull a model, clone the project repository, and generate comments for your code files with a simple command.

## Content

# HOW TO USE!!!

This tool features using Ollama and VsCode together.
![Image](https://raw.githubusercontent.com/Yuvadi29/Ai-Comment-Generator/fda6f915656a5d875902afedd6e042b5e6d44aba/image.png)

## Features

This is basically a very simple comment generator for your project when you want to generate a comment for your file and you don't want to 😆. So let AI do it for you 🤖.

## Requirements

1. NodeJs and npm installed
2. A machine capable of using LLMs using Ollama  

#### Setup

  1. Install Ollama for your operating systems from the Ollama's official website: https://ollama.com/download
  2. Once it is installed, open the app or run the following command in the terminal:
   `ollama serve`
  3. We need a model to run now, using `ollama pull phi3.5` we pull a model from the Ollama registry.
  4. Clone the project
    `git clone https://github.com/Yuvadi29/Ai-Comment-Generator.git`
    `cd commentgenerator`
  5. Install the necessary dependencies:
    `npm install`
  6. Run the project in debug mode using `F5` or `CTRL + SHIFT + D`. It will open the Debug Window.
  7. Choose the project you want to go to and then select the line you want to comment.
  8. After selecting press `CTRL + SHIFT + P` and then choose Generate Comment.
  9. Your comment will be generated.

## Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)

## Demo
![Working Demo](https://raw.githubusercontent.com/Yuvadi29/Ai-Comment-Generator/fda6f915656a5d875902afedd6e042b5e6d44aba/demo.gif)

**Do Not Forget to ⭐ the Repository if you like it!**

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#ai](https://daily.dev/tags/ai), [#github](https://daily.dev/tags/github), [#nodejs](https://daily.dev/tags/nodejs), [#llm](https://daily.dev/tags/llm), [#vscode](https://daily.dev/tags/vscode)

[View this post on daily.dev](https://daily.dev/posts/create-your-own-ai-code-commentor-and-run-it-on-your-machine-using-ollama-7w3xsy3xj)
