Skip to content

A short Python script that calls a Gemini API for user(s) to fetch (currently textual) information in their terminal. Very simple, very beginner level project.

License

Notifications You must be signed in to change notification settings

prtksh/Gemini-In-Shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gemini-In-Shell

A Python script that you can download and run in your terminal to access Gemini (model: 1.5-Pro on the free tier), for a chat or query. Only textual content to-and-fro (for now).

Note

This project is made as a practice / side project. Though this holds no greater influence, any suggestions or advice or issues sent about the workings, logic, build or etc is greatly appreciated !

Table of Contents

Important

This project is made to run on Linux systems. You need to have a GEMINI-API-KEY already in your environment (or .bashrc) file for you to connect to Gemini.

Installation

To install this package:

pip install gemini-in-shell==0.1.0

or you can check it out here : https://pypi.org/project/gemini-in-shell/

Usage

There are two ways to use this package

Interactive

shell-gemini --interactive

This starts a conversation with Gemini in your terminal with multiple queries one after the other. No need to re-run the package everytime.

Inline

shell-gemini "<query>"

A simpler option if you want a response for just one query without the hassle of having to exit the interactive mode.

Dependencies

  • Google GenerativeAI (google.generativeai) - For connecting with Gemini and receiving responses to-and-fro. Needs a GEMINI_API_KEY to function and connect.
  • argparse (argparse) - To take the command line query inputs and setup the modes.
  • grpcio (grpcio) - To eliminate the error messages that would be printed in / after Gemini's responses. Version 1.60.0 is the closest and latest version I could find that would allow this.
  • os (os) - Built-in in most Python environments, used to check if the user's .bashrc file has the GEMINI_API_KEY in it for the program to run.

License

This project is under the MIT License. Check LICENSE for more details.

About

A short Python script that calls a Gemini API for user(s) to fetch (currently textual) information in their terminal. Very simple, very beginner level project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages