AI Personal Learning
and practical guidance
Beanbag Marscode1

GeminiCode: an AI programming assistant based on Gemini 2.5 running in terminals

General Introduction

GeminiCode is an AI programming assistant that runs in a terminal, developed by developers in their spare time on weekends. It is based on Google's Gemini 2.5 Pro model that reads and modifies files in the current directory of your computer. This tool is inspired by Anthropic (used form a nominal expression) Claude Code, the goal is to provide programmers with an assistant to use directly from the command line. It is an experimental project, not software for production environments, and may have bugs, so users should use it with caution. The developers recommend using it only in a test environment or in unimportant directories to avoid manipulating sensitive files.

GeminiCode: an AI programming assistant based on Gemini 2.5 running in the terminal-1


 

Function List

  • Read file: Automatically reads the contents of all files in the current directory and subdirectories.
  • Modification of documents: Files can be created, edited or deleted to change the code directly in the directory.
  • execute a command: You can run the bash command in a terminal to perform simple operations.
  • code generation: Generate code based on user input, such as writing a function.
  • Debugging Support: Helps analyze error messages and gives suggestions for fixing them.

 

Using Help

GeminiCode is a command line tool that needs to be installed and run in a terminal. Below are detailed steps and instructions to ensure you get started quickly. Note: It will directly access files in your current directory without explicit permission prompts, so be sure to make sure your directory is safe before using it.

Installation process

  1. Creating a Virtual Environment
    Open a terminal and enter the following command to create an isolated Python environment to avoid interfering with other projects:
python3 -m venv venv
source venv/bin/activate

After running the second command, the terminal will display (venv), indicating that the environment was activated successfully.

  1. Installing GeminiCode
    Entered in a virtual environment:
pip install gemini-code

This will download and install the latest version from PyPI. The installation process usually takes a few seconds to a minute, depending on network speed.

  1. Setting the API Key
    You need a Google API key to use the Gemini model. To get it: visit https://ai.google.dev/, register and generate the key. Then enter it in the terminal:
gemini setup YOUR_GOOGLE_API_KEY

interchangeability YOUR_GOOGLE_API_KEY for your actual key. After successful setup, the tool will be able to connect to the model.

  1. start a session
    Enter the following command to start:
gemini

If prompted with a missing module questionary, running:

pip install questionary

Or specify the model to start:

gemini --model models/gemini-2.5-pro-exp-03-25

Upon startup, the terminal enters interactive mode.

basic operation

  1. Viewing Catalog Files
    Enter it in the session:
What files are in this directory?

The tool will list all files in the current directory, such as main.py,readme.txtThe

  1. Generate Code
    Input is similar:
Create a simple Python function that calculates the Fibonacci sequence

The tool generates the code and displays it, for example:

def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)

You can copy to a file or let the tool write directly.

  1. Modification of documents
    Input:
Add a print statement to main.py

It will read main.pyAdd print("Hello"), and then save. Note: There is no confirmation step to modify the file directly.

  1. debugging code
    Paste the error message, for example:
Help me debug this error message: NameError: name 'x' is not defined

The tool analyzes and recommends defining variables xThe

  1. execute a command
    Input:
Run ls command

It will execute the bash command and return the result (supported simple commands only).

  1. log out (computing)
    Input:
/exit

The session ends and returns to the normal terminal.

Precautions for use

  • Request limitations: 25 requests per day for the free version, 100 for Tier 1. When exceeded, it switches to the 1.5 Pro model, but may be unstable.
  • Security recommendations: Use it only in the test directory and backup important files. Can be run in containers like Docker to increase isolation.
  • common problems: If it gets stuck, just restart the session. See help with /helpThe

With these steps, you can use GeminiCode in the terminal. it is suitable for experimental programming tasks, but it is not stable enough for formal development.

 

application scenario

  1. Quick Test Code
    You want to test write a small function, like a calculator. You can use GeminiCode to generate the code in the test directory and manually check it before running.
  2. Learning to Debug
    Novice programmers who encounter error messages that they can't understand can paste them into GeminiCode for simple explanations and suggestions on how to change them.
  3. Temporary file operations
    You need to modify the contents of a file in bulk, such as adding comments. Use GeminiCode to enter the commands in seconds.

 

QA

  1. Is GeminiCode safe?
    It's not completely secure. It operates directly on files without protection mechanisms. It is recommended to use it only in unimportant directories and backup important data.
  2. Do I need to network?
    Yes, the runtime requires an internet connection to call the Google API.
  3. What file types are supported?
    can read any text file, such as .py,.txt, but designed primarily for code.
  4. What if I exceed the request limit?
    Exceeded automatically with 1.5 Pro model, functionality may be limited. We recommend waiting for the next day or upgrading your account.
May not be reproduced without permission:Chief AI Sharing Circle " GeminiCode: an AI programming assistant based on Gemini 2.5 running in terminals
en_USEnglish