1.0.3 • Published 1 year ago

coding_assistant v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

TypeScript Coding Assistant

This TypeScript Coding Assistant is a command-line tool that analyzes a TypeScript project, counts the number of tokens in each file, generates documentation, and saves it to a specified directory. If any file exceeds the maximum number of tokens allowed, the program returns an error message.

Installation

  1. Clone this repository or download the source code.
  2. Run npm install to install the required dependencies.

Usage

To use the TypeScript Coding Assistant, you need to update the documentationPath in the src/index.ts file to specify the desired path where the generated documentation files should be saved.

After setting the documentationPath, run the following command to start the program:

`bash npm run start `

or

` ts-node src/index.ts `

The TypeScript Coding Assistant will analyze the TypeScript project, generate documentation for each file, and save it to the specified directory. If any file exceeds the maximum number of tokens allowed, the program returns an error message.

Configuration

You can adjust the maxTokens value in the src/index.ts file to set the maximum number of tokens allowed per file. If any file exceeds this limit, the program returns an error message.

Customization

You can customize the way tokens are counted and documentation is generated by modifying the following functions in the src/services/codingAssistant.ts file:

  • countTokens(content: string): number
  • generateDocumentation(filePath: string): string