docbot

1.0.0 • Public • Published

README

DocBot is a command-line tool designed to help you automatically document your code! It's flexible, allowing you to select different models for documentation generation, output options, and more.

Features

  • Easy to Use: Document your code with a single command.
  • Model Selection: Choose different AI models for documentation.
  • Customizable: Change output filenames, base URLs, and enable verbose logging.
  • TOML support: Define a .docbot-config.toml file in your home directory (~) to define personalized configuration settings such as the default model, output file, base url, logging preferences, base API URLs, and output file path.

Prerequisites

Before installing, make sure you have the following:

  1. Node.js (v14 or higher recommended)
  2. Ollama (Optional, required if using the gemma2 model or others from Ollama)

Installation

Via npm

npm i docbot to install as a project dependency

Via git

  1. Clone the repository:

    git clone git@github.com:Add00/DocBot.git
    cd DocBot
  2. (Optional) Run Ollama with the default model:

    ollama run gemma2:2b

    Note: This step is only necessary if you're using the gemma2:2b model. You can select a different model manually using the -m flag during usage.

  3. Run DocBot:

    npm run docbot -- [files...]

Usage

npm run docbot -- [files...]

Option Description Type Default
-m, --model Select a different model, make sure that it is available string "gemma2:2b"
-o, --output Change the name of the output file string null
-b, --base-url Change the base-url, defaults to localhost string "http://127.0.0.1:11434"
-V, --verbose Run with verbose logging boolean false
-h, --help Show help boolean
-v, --version Show version number boolean

TOML Configuration

You can create a TOML config file named .docbot-config.toml that contains all your configuration for the tool and place it in your home directory.

Here is an example TOML file you can use:

model = "gemma2:2b"
baseUrl = "http://127.0.0.1:11434"
verbose = false
tokenUsage = false
stream = false

Examples

  • Basic usage with default settings: npm run docbot -- myFile.js
  • Specify a custom model and output file: npm run docbot -- myFile.js -m llama2 -o docs.md
  • Run with verbose logging: npm run docbot -- myFile.js -V

Licence

This project is licensed under the MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i docbot

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

24.4 kB

Total Files

9

Last publish

Collaborators

  • designinga52