@stylebit/trag
v0.1.5
Published
Local pull request review
Downloads
47
Readme
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
cd
into the root directory of your repository (where.git
folder is located).- 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."
]
}