# Gemini CLI

Source: https://desklet.io/agent/gemini-cli

## Run Gemini CLI with Desklet.

On your computer with the Desklet app.

[Start free trial](https://desklet.io/app/sign-in) You need a Desklet account. 14 days, no card.

### On your computer, with the Desklet app

The open-source Desklet app starts Gemini CLI on the computer that does the work. On macOS and Linux each agent changes only the folder you add, and your key stays on that computer.

1.  Install Desklet with Homebrew, or with the install script where there is no Homebrew. On Windows, use these steps inside WSL 2.
    
    ```
    brew install --cask desklet-io/tap/desklet
    ```
    
    ```
    curl -fsSL https://raw.githubusercontent.com/desklet-io/desklet/master/install.sh | sh
    ```
    
    [Desklet on Windows](https://desklet.io/agent/safety#windows)
    
2.  Check that your terminal finds it. If it says “command not found”, run the line the installer printed under “Action needed”.
    
    ```
    desklet --version
    ```
    
3.  Connect the computer. Open the link it shows, check that the code matches and click Connect.
    
    ```
    desklet host connect
    ```
    
4.  Check that protection is on. It prints what to fix if it isn’t.
    
    ```
    desklet host doctor
    ```
    
    [What protection does](https://desklet.io/agent/safety#what-keeps-it-safe)
    
5.  Add the project folder. In a git project each task works in a separate copy.
    
    ```
    desklet host folder add ~/projects/my-app
    ```
    
    [What not to add](https://desklet.io/agent/safety#what-not-to-add)
    
6.  Store a Gemini API key from Google AI Studio. It pays for the work by use, separately from a Claude or ChatGPT plan, and stays on this computer: Desklet never gets it.
    
    [Google AI Studio keys](https://aistudio.google.com/apikey)
    
    ```
    desklet host login gemini --key
    ```
    
7.  Start Desklet at login.
    
    ```
    desklet host install
    ```
    
8.  In Desklet, open Settings → Agents → Add an agent and pick Gemini CLI. Pick the computer, then the folder and the desks it sees; More settings holds who may give it tasks.
    
    [What not to do](https://desklet.io/agent/safety#what-not-to-do)
    
9.  On a desk, add a Tasks region, click Use next to the agent and write a task. Read the report, then apply the changes to the folder or discard them.
    

### What it sees

In Add an agent you choose which desks Gemini CLI sees and, under More settings, whether it may only read them (Read) or also put results on them (Read & add). Gemini CLI then shows up in Settings → Agents.

### Try asking

-   “Fix the failing test in this folder.”
-   “Update the README with the new install steps.”
-   “Find why the build is slow and tell me before you change anything.”

### If it doesn’t work

If a task doesn’t start, check the computer. desklet host doctor shows what is missing and how to fix it.

```
desklet host doctor
```

### What an agent can do

-   It never deletes anything on your desks, whether it connects by itself or runs on your computer.
-   It sees only the desks you choose.
-   You pick the mode: Read, where it only looks, or Read & add, where it also puts results on the desk.
-   You can disconnect or remove it any time in Settings → Agents, or revoke an AI link from the desk’s menu.

[All agents](https://desklet.io/agent) [Gemini CLI documentation](https://geminicli.com/docs/)
