Skip to content
Back to search

gemini-cli-extension

Collection of helpful gemini cli extensions and commands

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/philschmid--gemini-cli-extension/badge.svg)](/listings/philschmid--gemini-cli-extension)

HTML

<a href="/listings/philschmid--gemini-cli-extension"><img src="/api/listings/philschmid--gemini-cli-extension/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 127 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # My Gemini CLI Extensions, Commands, and Settings
  2. This repository is a collection of my personal extensions, custom commands, and settings for the [Google Gemini CLI](https://github.com/google-gemini/gemini-cli). If you are looking for a cheat sheet, see the [cheatsheet here](https://www.philschmid.de/gemini-cli-cheatsheet).
  3. ## 🚀 How to Use
  4. You can install these configurations globally for all projects or locally for a single project.
  5. **Global Installation:**
  6. ```bash
  7. git clone --depth 1 https://github.com/philschmid/gemini-cli-extension.git ~/.gemini-tmp && rsync -av ~/.gemini-tmp/.gemini/ ~/.gemini/ && rm -rf ~/.gemini-tmp
  8. ```
  9. **Project-Specific Installation:**
  10. ```bash
  11. git clone --depth 1 https://github.com/philschmid/gemini-cli-extension.git .gemini-tmp && rsync -av .gemini-tmp/.gemini/ ./.gemini/ && rm -rf .gemini-tmp
  12. ```
  13. **Note:** Both methods may overwrite existing configuration files with the same name.
  14. ## 🛠️ Custom Commands
  15. Custom commands allow you to create powerful, reusable prompts. They are defined in TOML files and stored in a `commands` directory.
  16. - **Global commands:** `~/.gemini/commands/`
  17. - **Project-specific commands:** `<project>/.gemini/commands/`
  18. ### Example Command
  19. Here is an example of a custom command definition in a `.../commands/test/gen.toml` file:
  20. ```toml
  21. # Invoked as: /test:gen "Create a test for the login button"
  22. description = "Generates a unit test based on a description."
  23. prompt = """
  24. You are an expert test engineer. Based on the following requirement, please write a comprehensive unit test using the Jest testing framework.
  25. Requirement: {{args}}
  26. """
  27. ```
  28. See the [custom commands guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/commands.md#custom-commands) for more details.
  29. ---
  30. ## ✨ Extensions
  31. Extensions allow you to bundle tools, context, and configurations. Each extension is a directory with a `gemini-extension.json` file.
  32. - **Global extensions:** `~/.gemini/extensions/`
  33. - **Project-specific extensions:** `<workspace>/.gemini/extensions/`
  34. ### Example Extension
  35. An extension is defined by a `gemini-extension.json` file inside its own directory, for example `<workspace>/.gemini/extensions/my-extension/gemini-extension.json`:
  36. ```json
  37. {
  38. "name": "my-extension",
  39. "version": "1.0.0",
  40. "mcpServers": {
  41. "my-server": {
  42. "command": "node my-server.js"
  43. }
  44. },
  45. "contextFileName": "GEMINI.md",
  46. "excludeTools": ["run_shell_command"]
  47. }
  48. ```
  49. For more details, see the [extensions guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/extension.md).
  50. ---
  51. ## ⚙️ Settings (`settings.json`)
  52. You can customize the Gemini CLI's behavior by creating a `settings.json` file.
  53. - **Project-level:** `.gemini/settings.json`
  54. - **User-level:** `~/.gemini/settings.json`
  55. - **System-level:** `/etc/gemini-cli/settings.json`
  56. ### Example `settings.json`
  57. ```json
  58. {
  59. "theme": "GitHub",
  60. "autoAccept": false,
  61. "sandbox": "docker",
  62. "checkpointing": {
  63. "enabled": true
  64. },
  65. "fileFiltering": {
  66. "respectGitIgnore": true
  67. },
  68. "usageStatisticsEnabled": true
  69. }
  70. ```
  71. All details are in the [configuration guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/cli/configuration.md).
  72. ---
  73. ## 📄 Context Files (`GEMINI.md`)
  74. Use `GEMINI.md` files to provide instructions and context to the model for your projects. The CLI loads these files hierarchically.
  75. - **Global context:** `~/.gemini/GEMINI.md`
  76. - **Project/Ancestor context:** `GEMINI.md` files from the current directory up to the root.
  77. You can use imports to modularize your context: `@./path/to/another.md`.
  78. ### Example `GEMINI.md`
  79. ```markdown
  80. # Main Project Context: My Awesome App
  81. ## General Instructions
  82. - All Python code must be PEP 8 compliant.
  83. - Use 2-space indentation for all new files.
  84. ## Component-Specific Style Guides
  85. @./src/frontend/react-style-guide.md
  86. @./src/backend/fastapi-style-guide.md
  87. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.