0.0.2 • Published 1 year ago

@heusalagroup/hg v0.0.2

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

@heusalagroup/hg

This is CLI tool for Heusala Group's development team.

Install the command globally

npm i -g @heusalagroup/hg

...or..

git clone git@github.com:heusalagroup/hg.git hg
cd hg
npm i -g .

Use it

hg --help 

Use the OpenAI API for editing

This tool requires the API KEY in the environment variable:

export OPENAI_API_KEY='your-key-here'

You can also save it in the local ./.env file:

OPENAI_API_KEY=your-key-here

Using the tool is easy:

$ node dist/hg.js ai edit 'Fix translation errors' "This wek is good"
This week is good

You can also use files:

$ node dist/hg.js ai edit 'Fix language mistakes' ./README.md
# @heusalagroup/hg

This is CLI tool for Heusala Group's development team.

...

The Completion API is also available:

$ node dist/hg.js ai comp 'I would like to...'


1. Learn a new language
2. Explore a new country

You can also customize the settings:

$ hg ai --model='code-davinci-edit-001' --temperature=0 --max-tokens=50 edit 'Write a function in python that calculates fibonacci'
def fibonacci(n):
    if n == 0:
        return 0
    elif n == 1:
        return 1
    else:
        return fibonacci(n-1) + fibonacci(n-2)

print(fibonacci(10))