ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Gemini​CLI

by flashmodel ST4 New

interactive google Gemini CLI interface for Sublime Text with file-context and agentic coding support

Labels agent, ai, chat

Details

Installs

  • Total 5
  • Win 1
  • Mac 4
  • Linux 0
Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10
Windows 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Gemini CLI for Sublime Text

This package provides an interface to the Gemini CLI directly within Sublime Text.

Note: This plugin requires the gemini command-line tool. By default, it will automatically attempt to discover the gemini executable in common installation locations. If the tool is installed elsewhere, or you wish to use a specific version, you can manually set the path in Preferences -> Package Settings -> GeminiCLI -> Settings using the "gemini_command" key. For example: - Windows: "C:/Users/myname/AppData/Roaming/npm/gemini.cmd" - macOS/Linux: "/usr/local/bin/gemini"

Gemini Chat

Installation

  1. Open Sublime Text.
  2. Go to Preferences -> Browse Packages....
  3. This will open the Packages directory.
  4. Copy the GeminiCLI directory into this Packages directory.
  5. Restart Sublime Text.

Gemini Authentication

You need to authenticate before using the plugin. Supported methods: - gemini cli auth: Run gemini in your system terminal, then type /auth to login with your Google account. - API Key: Obtain an API key from Google AI Studio and set it in Preferences -> Package Settings -> GeminiCLI -> Settings. - Google Vertex AI: If you're using Vertex AI on Google Cloud, configure your project and location in the env section of your settings:

```
"env": {
    "GOOGLE_CLOUD_PROJECT": "your-project-id",
    "GOOGLE_CLOUD_LOCATION": "us-central1"
}
```
Ensure you've authenticated with your Google Cloud account via `gcloud auth application-default login`.

Usage

  1. Open the command palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows/Linux).
  2. Type Gemini: Start Chat and press Enter.
  3. A new view will open for the Gemini chat.
  4. Alternatively, you can use a shortcut to start the chat (see Key Bindings for configuration).
  5. Type your message and press Ctrl+Enter (or Super+Enter on macOS) to send.

Gemini Context Interaction and Data Privacy

By default, this plugin does not send your entire workspace or file contents to Gemini. Data is only sent to the Google Gemini CLI in the following scenarios:

  • Chat Messages: Any text you type directly into the Gemini Chat view.
  • Explicit Context (@-mentions): When you use the @filename syntax (either manually or via the “Gemini: Chat with this file” context menu), the content of the specified file or selected range is sent.
  • Tool-driven Context: If the Gemini agent requests to read a file or list a directory (and you have granted permission if required by the CLI), that information is sent back to the model as part of the interaction.

All communication happens via the gemini CLI tool installed on your system, which connects directly to Google's servers using your configured credentials (API key or OAuth).

Key Bindings

this package does not include a global shortcut by default. You can add key bingding manually:

  1. Go to Preferences -> Key Bindings.
  2. Add the following lines to your user keymap file:
  3. now you can use the shortcut Ctrl+Alt+G (or Super+Alt+G on macOS) to start Gemini Chat
[
    {
        "keys": ["ctrl+alt+g"],
        "command": "gemini_cli",
        "args": {}
    },
    {
        "keys": ["super+alt+g"],
        "command": "gemini_cli",
        "args": {},
        "context":
        [
            { "key": "setting.is_widget", "operand": false }
        ]
    }
]

Tips

Chat with Gemini agent

You can right-click in any file, tab, and select Chat with Gemini agent. This will: - Open the Gemini chat view (if not already open). - Insert a reference to the file (@filename) or selected line range (@filename#L1-10) into the message prompt. - Tagged files will be automatically sent as context to Gemini.

Set Gemini Working Space

Right-click on any folder in the sidebar and select Set Gemini Working Space to set the working directory for Gemini. This affects the current working directory when Gemini executes commands or accesses files.

prompt from command

Use the command palette (Gemini: Prompt) to send a quick instruction to Gemini without opening the chat view manually.

License

This project is licensed under the MIT License - see the LICENSE file for details.