@stylebit/trag

0.1.5 • Public • Published

What is trag cli?

Local pull request review with AI.

Getting started

Trag CLI is designed to assist you with code reviews locally before opening an actual pull request on GitHub. Here are the options you will have:

  • Based on the llama3-8b model, which will run on your local machine.
  • Based on the OpenAI gpt-4o model, where you will be asked to provide your API token.

Usage

  1. cd into the root directory of your repository (where .git folder is located).
  2. run $ trag command for reviewing staged code files (output will be in the console).

Prerequisites

  • minimum recommended node.js version is v20.14.0

Extra You can specify special (custom) instruction in the trag.config.json file in following format: NOTE! You should have trag.config.json config file committed in advance in the root level of your repository.

scheme:

{
  "type": "object",
  "properties": {
    "patterns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": ["patterns"]
}

example:

{
  "patterns": [
    "Global variables are not allowed.",
    "Use dynamic programming methods in recursions to increase productivity."
  ]
}

Package Sidebar

Install

npm i @stylebit/trag

Weekly Downloads

5

Version

0.1.5

License

ISC

Unpacked Size

13.4 kB

Total Files

4

Last publish

Collaborators

  • movses
  • stylebit-movses
  • stylebit-admin