Skip to main content

cool AI-powered CLI tool

Project description

gaidme

Yeah, need to check if port 3000 on firewall is open.

How did it go? utf ...???? fck i don't remember. will google/chatgpt that 🥲

Do you recognize that?? Wait no more!

gaidme is an innovative command-line interface (CLI) tool designed to boost your development workflow. It utilizes AI to understand and execute system commands, making task automation, information queries, and environment management smoother and more intuitive.

Getting Started

Prerequisites

  • Python 3.8 or higher
  • Proper environment variables set. More info below or in .env.example file

OpenAI

export OPENAI_API_KEY=sk-...

AzureOpenAI

export AZURE_OPENAI_API_KEY=sk-...
export AZURE_OPENAI_ENDPOINT="https://docs-test-001.openai.azure.com/"
export AZURE_OPENAI_DEPLOYEMNT=gpt-4

Bash shell

export 'PROMPT_COMMAND=history -a';

Installation

To install run:

pip install gaidme

Usage

ask

gaidme ask {prompt} is used to ask AI about specific action. As a result you will get command based on your request/prompt

Example:

$ gaidme ask find my ip addres that start with 192.168
$ ifconfig | grep 'inet 192.168' | awk '{print $2}' #this is result of the command

reflect

Note: The reflect feature is still under development and may cause unexpected behavior

gaidme reflect {prompt} is used to ask AI question and as an answer you will get command based on your request/prompt. This takes previous command and output from the previous command to create tailored command based on previous command and your prompt

Steps:

  • Type a command you want to reflect on, like docker image ls
  • Use gaidme reflect {your prompt} to ask question about your most recent command and output from this command
  • As a result you will get a tailored command based on your previous command and result of the previous command

Example:

$ docker image ls
REPOSITORY                  TAG       IMAGE ID       CREATED        SIZE
mateusztylec/ai-personal    latest    877c4cda4b92   7 weeks ago    1.26GB
mateusztylec/ai-assistant   latest    b770d85f07e5   7 weeks ago    1.26GB
mateusztylec/ai-personal    <none>    b770d85f07e5   7 weeks ago    1.26GB
qdrant/qdrant               latest    612cd8d1d0b7   2 months ago   175MB
postgres                    latest    ba67a00c6c50   3 months ago   447MB
$ gaidme reflect show id only
... some commands that is needed
$ docker image ls | awk '{print $3}' | uniq #this is result of the command

'reflect' command is supported only in zsh and bash

Video (demo)

demo

Rules

  • Do not use special characters like %#@| and other when creating the prompt

Future development

I am currently working on my own API. It will have access to the current documentation of most popular tools. So it means more accurate responses. Do you want to get access to it? Sign up for waitlist

Features

  • Support for AzureOpenAI
  • Option to edit commands before execution
  • Get tailored command based on the the previous command

Contributing and Support

We welcome contributions to gaidme! If you have suggestions for improvements or bug fixes, please feel free to submit an issue or pull request.

If you need help or have questions, reach out to me via GitHub Issues.

Buy Me A Coffee

If you find gaidme useful, consider 🥰 supporting 🥰

Buy Me A Coffee

Keep in mind

  • Tested only on zsh, sh and bash

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gaidme-0.1.3.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gaidme-0.1.3-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file gaidme-0.1.3.tar.gz.

File metadata

  • Download URL: gaidme-0.1.3.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for gaidme-0.1.3.tar.gz
Algorithm Hash digest
SHA256 2293161ec3745e827e036f0eb09da8d77c6889e31b9ef812427a24ce3b53098c
MD5 16c2efc7128da1f91a69a612c5362545
BLAKE2b-256 a5a9fef04a0f07fb9840908386435c31ad595e4f22fb71e70a9a7d6f7d6ff898

See more details on using hashes here.

File details

Details for the file gaidme-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gaidme-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for gaidme-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8c5125f1a3252ff4f7c33c7f4e35fac6606c4340f57611d5ebd74e406c1c8bb
MD5 09b75d91f1f1aad9d339a546df4c4126
BLAKE2b-256 79164a7d3305b842d1292b5c2a68d61cd71010fdd303cadc0d3dcc3470031582

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page