███ █████████ ████████ ████ ████ █████ ██████ █████ █████ ░░░███ ███░░░░██ ███░░░░█░░ █████ █████ ░░███ ░░██████ ░░███ ░░███ ░░░███ ███ ░░███ █ ░ ░███░█████░███ ░███ ░███░███ ░███ ░███ ░░░███ ░███ ░██████ ░███░░███ ░███ ░███ ░███░░███░███ ░███ ███░ ░███ █████ ███░░█ ░███ ░░░ ░███ ░███ ░███ ░░██████ ░███ ███░ ░░███ ░░███ ░███ ░ █ ░███ ░███ ░███ ░███ ░░█████ ░███ ███░ ░░█████████ ████████ █████ █████ █████ █████ ░░█████ █████ ░░░ ░░░░░░░░░ ░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░
A smart manager for your Gemini-CLI projects. Built to streamline your workflow, one project at a time.
Gemini Project Manager (GPM) is an interactive shell script designed to wrap the official gemini-cli
, offering a more structured and organized user experience. Tired of launching gemini
from the same folder every time? Want to keep your projects separate, each with its own history and context? GPM is the solution.
On startup, GPM allows you to:
- Create a new project in a dedicated directory.
- Choose an existing project from an auto-generated list.
- Work in the main (root) folder that contains all your projects.
Once the context is selected, GPM launches gemini-cli
in that specific directory, keeping everything neat and tidy.
Follow these steps to get GPM up and running in minutes.
Clone this repository or download the gpm_github.sh
script directly into your preferred folder.
# Clone the repository (recommended)
git clone https://github.com/grugnoymeme/gemini-cli-pm.git
# Enter the directory
cd gemini-cli-pm
You need to give the script execution permissions.
chmod +x gc_pm.sh
Open the gc_pm.sh
file with your favorite text editor (e.g., nano
, vim
, micro
, vscode
). There are three sections you absolutely must modify.
1️⃣ Set Your Root Directory
Look for the GEMINI_PROJECTS_ROOT
variable. This is the absolute path to the folder that will contain all your project subfolders.
How to do it:
- Create a folder wherever you like (e.g.,
~/Documents/GeminiProjects
). - Replace the default value with the path to that folder.
# Example of how the modified line should look:
GEMINI_PROJECTS_ROOT="/home/your_user/Documents/GeminiProjects"
2️⃣ Enter Your API Key
Find the export GEMINI_API_KEY
line. Here you need to insert your Google Gemini API key.
# Replace <your_gemini_API_key_here> with your personal key
export GEMINI_API_KEY="aAbBcC123dDeEfF456gGhHiI789..."
3️⃣ Set the Gemini Executable Path
The final modification is the path to the gemini-cli
executable. To find it, open a terminal and type:
which gemini
The command will return a path, for example /home/your_user/.nvm/versions/node/v20.11.0/bin/gemini
. Copy this path and paste it at the end of the script.
# Replace the example line with the path obtained from 'which gemini'
/home/your_user/.nvm/versions/node/v20.11.0/bin/gemini
Done! You are now ready to use GPM.
To start the manager, simply run the script from your terminal:
./gc_pm.sh
You will be presented with a welcome screen and asked if you want to create a new project.
- Create a new project: Answer
y
and enter a name. GPM will create a new folder and navigate into it. - Choose an existing project: Answer
n
. GPM will list all the folders in yourGEMINI_PROJECTS_ROOT
, plus an option to stay in the root itself. Select the corresponding number and press Enter.
To integrate GPM even better into your system, here are two tips.
Tired of typing ./gpm_github.sh
every time? Create an alias! This way, when you type gemini
in the terminal, GPM will start instead of the standard client.
- Open your shell's configuration file (
.zshrc
for Zsh,.bashrc
for Bash).# For Zsh nano ~/.zshrc # For Bash nano ~/.bashrc
- Add the following line to the end of the file, making sure to use the absolute path to your script.
Example:
alias gemini="/absolute/path/to/gc_pm.sh"
alias gemini="/home/emanuele/gemini-cli-pm/gc_pm.sh"
- Save the file and reload your shell configuration.
# For Zsh source ~/.zshrc # For Bash source ~/.bashrc
Now, whenever you type gemini
, the Project Manager will start!
If you use a Linux desktop environment, you can create a launcher to start GPM directly from your application menu.
-
Create a new file with a
.desktop
extension, for examplegemini-pm.desktop
.nano ~/.local/share/applications/gemini-pm.desktop
-
Paste the following content into the file, modifying the
Exec
andPath
fields with your absolute paths.[Desktop Entry] Version=1.0 Name=Gemini Project Manager Comment=Manager for Gemini-CLI projects Exec=mate-terminal -- /bin/zsh -c "/absolute/path/to/gc_pm.sh; exec zsh" Icon=utilities-terminal Terminal=false Type=Application Categories=Development;Utility; Path=/absolute/path/to/the/script/folder/
Note:
Exec
launches a new terminal (mate-terminal
in this example, you may need to change it tokonsole
,xfce4-terminal
, etc.) that runs the script. Addingexec zsh
at the end keeps the terminal open after Gemini closes. -
Save the file. You should now find "Gemini Project Manager" in your application menu!
Disclaimer: This is a personal utility, not an official Google tool, provided to streamline the user experience with the original Gemini CLI.
Made with ❤️ by grugnoymeme