Inspiration
Team: Avinash Sivaraman and myself, Karthik Ganesan, are developers who use CLIs daily, like many others in our field. We noticed a gap between our everyday usage and LLMs. Although LLM-based CLIs exist, we found them lacking something crucial for our daily workflows. Thus, we set out to build a solution.
What it does
GQ, short for Generative Query, is a simple CLI tool for utilizing LLMs. It facilitates basic operations like gq -q "Hi". However, its real strength lies in more advanced functionalities, such as: cat file.txt | gq -q "what does this file do". We aimed for a seamless integration into our existing workflows, avoiding the need for continuous chat-based interactions with LLMs.
How we built it
We developed the CLI in Go using the Cobra library. User input, either through pipe operations or standard queries, is processed, concatenated as needed, and then passed to the LLM. Configuration settings, like model name and temperature, are managed via the Viper library. The build process is streamlined using Go.
Challenges we ran into
Initially, we encountered challenges in designing a scalable solution to support multiple LLMs in the future. However, we overcame this hurdle by leveraging Go's interface capabilities.
Accomplishments that we're proud of
We're proud of creating a tool that is easy to build and use. While not a replacement for JQ, it has become an integral part of our daily workflows. It significantly reduces the time spent sifting through API call results, allowing us to quickly identify the relevant fields.
What we learned
This project served as our introduction to Go, and we were impressed by its simplicity and efficiency. The growing adoption of our tool within our company underscores the demand for straightforward CLI solutions in development workflows.
What's next for GQ
In the future, we plan to enhance GQ by adding support for locally hosted models through ollama. Additionally, we aim to incorporate support for image generation models, enabling operations like: cat image.png | base64 | gq -q "what image is this".
Log in or sign up for Devpost to join the conversation.