🐚
gemsh, an ever-evolving Python-based CLI tool, represents a minimalist bridge between the user and the neural intelligence of Google Gemini. Conceived as a direct, fast, and elegant wrapper for the shell, gemsh was built using the fundamental tools of simple editors and the console. Its development relied on pure mental debugging, foregoing bloated modern IDEs and embracing "the old ways."
Built with a focus on aesthetics, speed, and open-source principles, gemsh features dynamic system locale detection (supporting English and Portuguese out-of-the-box), custom visual spinners, robust offline protection, and a clean user interface.
Multilingual Support: Automatically detects your operating system's language (pt, en) and adapts greetings, spinners, and system messages dynamically.
Google Gemini Integration: Powered by the modern google-genai SDK for lightning-fast and intelligent responses.
Smart Dependency Management: Automatically checks and installs required packages on first launch.
Aesthetic CLI Interface: Custom Google-styled prompt (user@gemini), beautiful ASCII art, and smooth terminal spinners, designed to run seamlessly inside advanced terminals like Ghostty.
Robust Safety Checks: Built-in offline detection and clean exit handlers to ensure stability across sessions.
"Just as a master thief needs intricate planning and flawless execution, a top developer crafts elegant and secure code with meticulous attention to detail."
"Sharpening the mind, A 53-year-old's toolkit : Python 🐍 as a mental workout." and zorie and cybele created and developed by fun... and where others can take advantage of the developed code.
How to Run gemsh
To get gemsh up and running on your system, follow these simple steps:
Prerequisites
You'll need a Python interpreter installed on your computer. gensh is compatible with Windows, macOS, Linux and a Gemini API Key you can obtain here by clicking in "🗝️ Create API Key".
Installation
Download the Code: Get the gensh script from its GitHub repository clicking in the 'source code' yellow button below or the github icon. You can either clone the repository using Git or download the ZIP file and extract it.
Edit the gemsh.py file with a text editor or your development code editor, go to line 39, and add your API key inside the _apikey_ = '' variable.
Open Your Terminal or Command Prompt: In your bash / cmd / terminal console navigate to the directory where you saved the gemsh.py file.
Run the Script: Type the following command and press Enter:
python gemsh.py or py gemsh.py
That's it! gensh should now be running and ready to "speak" and give'you "all the info's" about'it.
Compilation (Advanced / For Experts) (3 Steps)
If you prefer to compile `gemsh.py` into a standalone binary executable for Windows or Linux without needing a local Python environment, you can use PyInstaller:
Install PyInstaller: If you don't have it installed yet, open your terminal or command prompt and run:
pip install pyinstaller
Prepare your API Key: Make sure you have already edited gemsh.py (at line 39) to include your Gemini API key inside the _apikey_ = '' variable before compiling, so the final executable comes pre-configured.
Compile the Script: Navigate to the directory where you saved gemsh.py and run the following command:
pyinstaller --onefile --clean gemsh.py
Run Your Executable: Once the compilation finishes, look inside the newly created dist/ folder.
Your standalone binary will be right there, ready to run anywhere without requiring a python interpreter!
> Note on Copies and User-to-User Interactions:
Due to the API-based architecture, I do not recommend user-to-user copying. Instead, download from the Github and set up the API accordingly.
I advise caution when sharing personal, sensitive or confidential data.
How to Add the GEMINI_API_KEY Environment Variable
Depending on your operating system, follow the steps below to permanently configure your Gemini API key so it is automatically recognized by your terminal sessions.
Linux & macOS (Bash/Zsh)
If you are using Linux or macOS with Bash or Zsh as your default shell, you can add the export command to your shell configuration file.
Step 1: Open your terminal.
Step 2: Open your .bashrc (or .zshrc) file in a text editor:
nano ~/.bashrc
(If you use Zsh on newer macOS versions, use nano ~/.zshrc instead).
Step 3: Scroll to the very bottom of the file and add the following line:
export GEMINI_API_KEY="your_actual_api_key_here"
Step 4: Save and exit (in Nano, press Ctrl+O, Enter, then Ctrl+X).
Step 5: Apply the changes immediately by running:
source ~/.bashrc
2. Windows
On Windows, you can set the environment variable permanently using either PowerShell or the System Properties menu.
Option A: Using PowerShell (Permanent User Variable)
Open PowerShell and run the following command (replace with your actual key):
[System.Environment]::SetEnvironmentVariable("GEMINI_API_KEY", "your_actual_api_key_here", "User")
Note: You will need to restart any open terminals for this change to take effect.)
Option B: Using the Windows GUI
Press the Windows Key, type Environment Variables, and select Edit the system environment variables.
Click the Environment Variables... button at the bottom right.
Under the top section (User variables for [Your Username]), click New....
Fill in the details:
Variable name: GEMINI_API_KEY
Variable value: your_actual_api_key_here
Click OK on all windows to save. Restart your command prompt or PowerShell.
Tip: Never share your API key publicly or commit it to public code repositories like GitHub!
in Rust in the near future ...
Created in about an hour using Cybele as the base library,
designed to fill the gap of clean and simple terminal clients.