hello-openai
Tags: githubhack23
Published: 2023-04-27 07:04:15

## What I built 
The application I have created is an executable .exe file that is ready to use and provides an easy way to ask queries and prompts to OPENAI through a command-line interface (CLI) for Windows, Linux, and Mac operating systems. With this tool, users can interact with OPENAI and get quick and accurate results without the need for advanced programming skills or familiarity with more complex AI tools.

This application is designed to simplify the process of interacting with OPENAI by providing a user-friendly CLI interface that makes it easy to make queries and receive responses. Users can input their queries and prompts directly into the command line and receive accurate results in a matter of seconds. The tool is designed to be compatible with a range of operating systems, making it accessible to a wide range of users.

A Command Line Interface (CLI) can be like a source code that allows users to interact with a computer system through text-based commands rather than a graphical user interface (GUI). This means that users can type commands into a command line and execute them to perform a variety of tasks, such as creating files, copying and pasting data, moving and deleting files, among others. Furthermore, normal users, can use CLI to program at a higher level than low-level source code. That is, they can write programs using text-based command prompts to carry out specific tasks. In some cases, command line programming can be more efficient and faster than writing code in more traditional programming languages.

Example - simple question:

./hello-openai.exe --query="act as only one word response: ¿What is the capital of Spain?" and the output is: Madrid

It's worth noting that not everything has to be done using interpreted programming languages. CLI offers an alternative approach to interact with a computer system that allows users to issue text-based commands. This can be particularly useful for tasks that require automation, batch processing, or other kinds of scripting. By using the CLI, users can leverage the power of a computer system without having to write code in a traditional programming language, which can sometimes be more cumbersome and less efficient. Instead, they can use commands and tools that are tailored to their specific needs and that can be executed quickly and easily.

### Category Submission: 
Wacky Wildcards

### App Link

https://github.com/danielcdmconsultores/hello-openai/blob/main/hello-openai.exe

### Screenshots 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ciu5rqamb7me2ainte23.png)


### Description 

It is an executable .exe "ready to use", and an easy way to make queries & questions (prompts) to OPENAI, from a command line interpreter (CLI) for Windows, Linux, Mac

Features:
-You can perform automation from the command line. (Powershell, Terminal, command.com, ...)
-Use it in a script, ready to run from a task. (lots, .bat, "Windows Task Scheduler" ...)
-You can redirect standard output to a new file ">" or ">>"
-Programs that run commands, can now call OPENAI directly.

Requirements A valid APIKEY from https://platform.openai.com/account/api-keys and set OPENAI_APIKEY Environment variable.

### Link to Source Code 

https://github.com/danielcdmconsultores/hello-openai

### Permissive License 

https://github.com/danielcdmconsultores/hello-openai/blob/main/LICENSE

## Background (What made you decide to build this particular app? What inspired you?) 

I was inspired to create a command-line interface (CLI) based artificial intelligence (AI) application because I wanted to simplify and democratize the use of AI in a simple way. I understand that AI can be complex and difficult to understand for people without technical training, which motivated me to create an application that would make AI accessible to everyone. My personal experience with AI technology and the difficulty in finding an easy-to-use solution also played a significant role in the development of this application. I have a strong desire to make AI technology more accessible to people of different abilities and knowledge levels, and this was the driving force behind creating this application. My hope is that this application will change the way people interact with AI by making it easier and more approachable for everyone from the terminal or the command line interpreter.


### How I built it (How did you utilize GitHub Actions or GitHub Codespaces? Did you learn something new along the way? Pick up a new skill?) 

I had never used GitHub Codespaces until I started working on my hello-openai. As I researched how to make my application more accessible and user-friendly, I discovered that GitHub Codespaces could be a valuable tool for creating a customized development environment for my project. As I learned more about this tool, I realized that GitHub Codespaces has many useful features that could benefit my team and improve our efficiency in software development. I am excited to explore and use this tool in the future and see how it can help simplify the development process for our project.

### Additional Resources/Info

+I'm "oldschool" developer that use CLI for all ;-)
+Made with love🤟in GOlang, from Alonsotegi (Spain)