good-gpt


Namegood-gpt JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/emilamaj/good-gpt
SummaryAI command line assistant. Describe a command and get the output.
upload_time2024-04-19 19:37:46
maintainerNone
docs_urlNone
authorEmile Amajar
requires_python>=3.6
licenseMIT
keywords ai assistant openai gpt command-line terminal
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # gg good-gpt
AI Baked into your command-line terminal: describe what you want to do and the assistant will execute the corresponding command for you.
```bash
user@ubuntu:~$ gg list current processes by RAM usage
Do you want to execute this suggested command for linux? [y/n]
--> ps aux --sort=-rss
<Enter>
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
user0     2942  1.0  0.2  38204 21308 tty3     S    11:57   0:00 /usr/bin/python3 /home/user0/.local/bin/gg list current processes by RAM usage
root      2831  0.0  0.0  19884  5396 pts/2    S    11:13   0:00 ssh RemoteHost
root      2728 49.3  0.0  19888  5088 ?        R    09:20  78:02 ssh RemoteHost
...
```

## Installation
This tool is built using python. It has been tested on python 3.10 on both windows and linux.
To install Python, visit [python.org](https://www.python.org/downloads/)

After installing python, you can install the `good-gpt` package using pip
```bash
pip install good-gpt
```
or if you have multiple python installations:
```bash
pip3 install good-gpt
```

This will install the package, but you may not yet have the `gg` command available in your terminal at this point.

For that, you need to add the installation location to your PATH environment variable.
The installation location by default is `%APPDATA%\Python\Python3XX\Scripts\Lib\site-packages\good_gpt` on Windows and `$HOME/.local/lib/python3.XX/site-packages/good_gpt/` on linux.

If PATH is not correctly set, you need to run the `post_install.py` script to add the installation location to your PATH.

For that, find the location of the `post_install.py` script using the following command:
```bash
pip show good-gpt
```
and then navigate to the folder pointed by the `Location` field, and then navigate to the `good_gpt` folder, where you will find the `post_install.py` script.

Then run the script using the following command:
```bash
python post_install.py
```
or if you have multiple python installations:
```bash
python3 post_install.py
```
With the directory added to your PATH, you now simply need to restart your terminal to use the `gg` command. You can also run the following command to refresh the PATH environment variable, depending on your terminal:
```bash
source ~/.bashrc
```
or
```bash
source ~/.zshrc
```
Windows does not require a refresh, but you may need to close and reopen the terminal.

## Usage
On the first run, you will be asked to provide your OpenAI API key. You can get the API key by signing up at [openai.com](https://beta.openai.com/signup/) and generating an API key at [openai.com/account/api-keys](https://platform.openai.com/account/api-keys).

Simply paste the API key when prompted and press enter. The API key will be stored in openai_api_key.env in the same folder as the gg command.

Here is an example on Windows 10:
```bash
C:\Users\user> gg current external ip address, only ipv4
Do you want to execute this suggested command for win32? [y/n]
--> curl ifconfig.me/ip -4
<Enter>
72.88.25.127
```

Here is an example on Ubuntu 20.04:
```bash
user@ubuntu:~$ gg current external ip address, only ipv4
Do you want to execute this suggested command for linux? [y/n]
--> dig +short myip.opendns.com @resolver1.opendns.com -4
yes
72.88.25.127
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/emilamaj/good-gpt",
    "name": "good-gpt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "ai assistant openai gpt command-line terminal",
    "author": "Emile Amajar",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/67/13/52ad03e1d93f126787f46e4403167d345509f8f2d58623a206d794f020e6/good-gpt-0.1.1.tar.gz",
    "platform": null,
    "description": "# gg good-gpt\r\nAI Baked into your command-line terminal: describe what you want to do and the assistant will execute the corresponding command for you.\r\n```bash\r\nuser@ubuntu:~$ gg list current processes by RAM usage\r\nDo you want to execute this suggested command for linux? [y/n]\r\n--> ps aux --sort=-rss\r\n<Enter>\r\nUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\r\nuser0     2942  1.0  0.2  38204 21308 tty3     S    11:57   0:00 /usr/bin/python3 /home/user0/.local/bin/gg list current processes by RAM usage\r\nroot      2831  0.0  0.0  19884  5396 pts/2    S    11:13   0:00 ssh RemoteHost\r\nroot      2728 49.3  0.0  19888  5088 ?        R    09:20  78:02 ssh RemoteHost\r\n...\r\n```\r\n\r\n## Installation\r\nThis tool is built using python. It has been tested on python 3.10 on both windows and linux.\r\nTo install Python, visit [python.org](https://www.python.org/downloads/)\r\n\r\nAfter installing python, you can install the `good-gpt` package using pip\r\n```bash\r\npip install good-gpt\r\n```\r\nor if you have multiple python installations:\r\n```bash\r\npip3 install good-gpt\r\n```\r\n\r\nThis will install the package, but you may not yet have the `gg` command available in your terminal at this point.\r\n\r\nFor that, you need to add the installation location to your PATH environment variable.\r\nThe installation location by default is `%APPDATA%\\Python\\Python3XX\\Scripts\\Lib\\site-packages\\good_gpt` on Windows and `$HOME/.local/lib/python3.XX/site-packages/good_gpt/` on linux.\r\n\r\nIf PATH is not correctly set, you need to run the `post_install.py` script to add the installation location to your PATH.\r\n\r\nFor that, find the location of the `post_install.py` script using the following command:\r\n```bash\r\npip show good-gpt\r\n```\r\nand then navigate to the folder pointed by the `Location` field, and then navigate to the `good_gpt` folder, where you will find the `post_install.py` script.\r\n\r\nThen run the script using the following command:\r\n```bash\r\npython post_install.py\r\n```\r\nor if you have multiple python installations:\r\n```bash\r\npython3 post_install.py\r\n```\r\nWith the directory added to your PATH, you now simply need to restart your terminal to use the `gg` command. You can also run the following command to refresh the PATH environment variable, depending on your terminal:\r\n```bash\r\nsource ~/.bashrc\r\n```\r\nor\r\n```bash\r\nsource ~/.zshrc\r\n```\r\nWindows does not require a refresh, but you may need to close and reopen the terminal.\r\n\r\n## Usage\r\nOn the first run, you will be asked to provide your OpenAI API key. You can get the API key by signing up at [openai.com](https://beta.openai.com/signup/) and generating an API key at [openai.com/account/api-keys](https://platform.openai.com/account/api-keys).\r\n\r\nSimply paste the API key when prompted and press enter. The API key will be stored in openai_api_key.env in the same folder as the gg command.\r\n\r\nHere is an example on Windows 10:\r\n```bash\r\nC:\\Users\\user> gg current external ip address, only ipv4\r\nDo you want to execute this suggested command for win32? [y/n]\r\n--> curl ifconfig.me/ip -4\r\n<Enter>\r\n72.88.25.127\r\n```\r\n\r\nHere is an example on Ubuntu 20.04:\r\n```bash\r\nuser@ubuntu:~$ gg current external ip address, only ipv4\r\nDo you want to execute this suggested command for linux? [y/n]\r\n--> dig +short myip.opendns.com @resolver1.opendns.com -4\r\nyes\r\n72.88.25.127\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "AI command line assistant. Describe a command and get the output.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/emilamaj/good-gpt"
    },
    "split_keywords": [
        "ai",
        "assistant",
        "openai",
        "gpt",
        "command-line",
        "terminal"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "57fbb1b3a74fd871f5f2237016b45f28e3b44dfe478a94b299e51180865f3943",
                "md5": "2b0de914b306171ef6d29d30e46dcebf",
                "sha256": "2edbf6dc660c38d3734469f56c539547947ddcc16fc2855c28ecb4476b319644"
            },
            "downloads": -1,
            "filename": "good_gpt-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2b0de914b306171ef6d29d30e46dcebf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6708,
            "upload_time": "2024-04-19T19:37:41",
            "upload_time_iso_8601": "2024-04-19T19:37:41.553382Z",
            "url": "https://files.pythonhosted.org/packages/57/fb/b1b3a74fd871f5f2237016b45f28e3b44dfe478a94b299e51180865f3943/good_gpt-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "671352ad03e1d93f126787f46e4403167d345509f8f2d58623a206d794f020e6",
                "md5": "88614fd4e2719f18e6e6cae6260579f3",
                "sha256": "7fd0c10159972c2a468f6fac6d3cab0e0d606c696386438c962b5dd9010c3520"
            },
            "downloads": -1,
            "filename": "good-gpt-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "88614fd4e2719f18e6e6cae6260579f3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6049,
            "upload_time": "2024-04-19T19:37:46",
            "upload_time_iso_8601": "2024-04-19T19:37:46.747464Z",
            "url": "https://files.pythonhosted.org/packages/67/13/52ad03e1d93f126787f46e4403167d345509f8f2d58623a206d794f020e6/good-gpt-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-19 19:37:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "emilamaj",
    "github_project": "good-gpt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "good-gpt"
}
        
Elapsed time: 0.28063s