Skip to content

Releases: onsen-ai/node-doc-llm

v1.1.1

Choose a tag to compare

@dobomode dobomode released this 08 Jul 22:02

Full Changelog: v1.1.0...v1.1.1

v1.1.0

Choose a tag to compare

@dobomode dobomode released this 07 Jul 17:08

Added an example documentation output for the axios library that can be accessed at EXAMPLE.md.

v1.0.0

Choose a tag to compare

@dobomode dobomode released this 07 Jul 16:56

Release Notes

v1.0.0 - Initial Release

Overview

We are excited to announce the initial release of our automated documentation generation script! This tool is designed to help developers quickly generate detailed and structured documentation for their JavaScript/TypeScript codebases using OpenAI's powerful language models.

Features

  • Dependency Parsing:

    • Parses JavaScript and TypeScript files to extract dependencies.
    • Supports various file extensions including .js, .jsx, .ts, .tsx, .mjs, and .cjs.
  • Dependency Graph:

    • Recursively builds a comprehensive dependency graph from the root file.
    • Skips files in node_modules and handles directories with index.js files.
  • AI-Powered Descriptions:

    • Utilizes OpenAI's gpt-4o model by default to generate detailed summaries.
    • Dynamically adjusts word count based on the complexity and level of the dependencies.
  • Markdown Documentation:

    • Generates a markdown document with a table of contents and detailed descriptions for each file.
    • Organized by sections based on the directory structure.

Customization

  • Model Selection:
    • The script uses gpt-4o by default but can be configured to use other models such as gpt-3.5-turbo by modifying the getAiDescription function.

Usage

  1. Installation:

    • Clone the repository and install dependencies using npm install.
    • Create a .env file with your OpenAI API key.
  2. Execution:

    • Run the script with the root JavaScript file of your project:
      node index.js <rootFilePath> [outFile]
    • Example:
      node index.js src/index.js DOCUMENTATION.md

Improvements and Enhancements

  • Detailed logging of progress, including API usage and costs.
  • Handles edge cases for file resolution and extension handling.
  • Ensures generated descriptions are relevant and concise, suitable for README inclusion.

Notes

  • This is the initial release and we welcome feedback and contributions.
  • Future updates will focus on performance improvements, additional features, and enhanced customization options.

Thank you for using our automated documentation generation tool! We look forward to your feedback and contributions.


For more details, please refer to the ./README.md file in the repository.


Happy coding!