Skip to content

lnxpy/hey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

96 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Hey! - Your AI-powered Pair Programming Friend

โœจ - You need a MindsDB token to use Hey. You can generate one for your personal uses for free from here!

:basecamp: - Watch this YouTube introduction video about Hey!

โœ๏ธ - Read the "Introducing Hey! - Your AI-powered Pair Programming Friend" article about the creation process, development phases, and a detailed overview of Hey.

Hey is a CLI-based AI assistant that is powered by the ChatGPT AI model versions supported by MindsDB. This project is designed for Hashnode X MindsDB hackathon.

Installation

Make sure you have pip and python>=3.6 installed on your machine and follow the steps.

1. Setup the package

Option A - Download from PyPI archive
pip install -U hey-mindsdb
Option B - Download from GitHub archive
pip install git+http://github.com/lnxpy/hey.git

โš ๏ธ: Hey is POSIX-friendly. It might not work properly on Windows machines at the moment.

2. Set the HEY_TOKEN environment variable

Once you got the package installed on your system, it's time to add the token that you just copied from mdb.ai into either the .bashrc (or .zshrc) file.

  • If you use the default bash shell
echo "export HEY_TOKEN=<TOKEN>" >> ~/.bashrc
  • If you use ZSH
echo "export HEY_TOKEN=<TOKEN>" >> ~/.zshrc

Usage

There are different commands and sub-commands implemented once you install hey. Check them out via the --help flag.

hey --help
                                                                                                 
 Usage: hey [OPTIONS] COMMAND [ARGS]...                                                          
                                                                                                 
 Hey is a pair-programming friend that interacts with ChatGPT and responds back in a pretty      
 style. โœจ                                                                                       
                                                                                                 
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --no-style,--ns                 Don't style the output.                                       โ”‚
โ”‚ --version             -V        Show the current version of Hey.                              โ”‚
โ”‚ --install-completion            Install completion for the current shell.                     โ”‚
โ”‚ --show-completion               Show completion for the current shell, to copy it or          โ”‚
โ”‚                                 customize the installation.                                   โ”‚
โ”‚ --help                          Show this message and exit.                                   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Commands โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ask      Ask Hey directly in-command.                                                         โ”‚
โ”‚ config   Configuration management.                                                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
  • If you want to use Hey in a fast and quick way, use the ask command.

    hey ask "explain the duality term in quantum physics."
  • If your query needs more explanations with code snippets maybe, they just hey.

    hey
    <OPENS EDITOR>

    Keep in mind that when you run hey with no sub-commands, the default $EDITOR will be used. Feel free to ask your question in markdown style.

Configuration

There is a command dedicated for more customizability. Check the following bullet-points.

  • Create a base configuration file.

    hey config create
  • View and edit the configuration file.

    hey config edit

Here is more information about each configuration parameter.

{
    // model version
    "model": "gpt-3.5-turbo",

    // prompt
    "prompt": "Answer in a helpful way.",

    // themes used for the codeblocks
    "code_block_theme": "github-light",

    // how would you like `hey` to think?
    "loading_text": "Thinking..",

    // thinking animation symbol
    // check out full list: python -m rich.spinner
    "loading_spinner": "dots",

    // never style the output (in case you need to copy the result)
    "never_style": false
}

Tech Stack

  • Infrastructures & Hosting

License

Hey is being licensed under the MIT License.

Special Thanks to

MindsDB X Hashnode for hosting this great hackathon.