{
  "markdown": "# TellMe for Gemini\n\nA Gemini CLI extension that provides an interactive speech-based prompt mechanism and reads Gemini's responses aloud using macOS text-to-speech.\n\n## Overview\n\nTellMe Gemini enhances the Gemini CLI by hooking into the agent lifecycle:\n\n1. **Interactive Prompt (BeforeAgent Hook)** — When you prefix your prompt with a dot (`.`), a Java Swing dialog box pops up for you to type your input. It then reads your prompt aloud (\"You said: ...\") and passes it to Gemini. If you prefix the prompts with `..` then it will not use the dialog box and will use the input from the prompt.\n2. **Speech Response (AfterAgent Hook)** — After Gemini finishes responding to a spoken prompt (prefixed with `.` or `..` or suffixed with `..`), the extension reads Gemini's response aloud (\"I say: ...\") using the native macOS `say` command in the background.\n\n## Requirements\n\n- macOS (uses `/usr/bin/say` for text-to-speech)\n- Node.js\n- Java runtime (for the input dialog)\n- Gemini CLI with extension support\n\n## Installation\n\n```sh\ngit clone https://github.com/sandipchitale/tellme-gemini\ncd tellme-gemini\ngemini extensions link .\n```\n\n## Disable the extension\n\n```bash\ngemini extensions disable tellme-gemini\n```\n\n## Enable the extension\n\n```bash\ngemini extensions enable tellme-gemini\n```\n\n## Uninstallation\n\n```bash\ngemini extensions uninstall tellme-gemini\n```\n\n## How It Works\n\n### BeforeAgent Hook (i-say)\n\n1. You provide a prompt to the Gemini CLI starting with a `.` or `..` (e.g., `.`).\n2. The `BeforeAgent` hook executes `tellme.mjs`.\n3. It detects the `.` prefix and launches a Java Swing input dialog (\"Wassup? (try dictation)\"). If you prefix the prompts with `..` then it will not use the dialog box and will use the input from the prompt.\n4. You enter your actual prompt and click \"OK\" (if using `.`).\n5. It uses the macOS `/usr/bin/say` command to speak your input aloud in the background: _\"You said: {input}.\"_. On Linux it uses `/usr/bin/espeak`.\n6. It sends the input to the Gemini CLI as `additionalContext` to be used for the agent. If you cancel the dialog, it gracefully denies the execution, halting the agent.\n\n### AfterAgent Hook (tell-me)\n\n1. After Gemini generates a response, the `AfterAgent` hook triggers.\n2. It checks if the original prompt started with `.` or ended with `..`.\n3. If it did, it retrieves the generated response from the hook payload (`prompt_response`).\n4. It uses `/usr/bin/say` to speak the response aloud: _\"I say: {response}\"_. On Linux it uses `/usr/bin/espeak`.\n5. The `say` process is spawned detached so the Gemini CLI can continue immediately without waiting for the speech to finish.\n\nIf the voice output is too long and you want to stop it do at the prompt:\n\n```bash\n!killall /usr/bin/say\nESCAPE\n```\n\n## Project Structure\n\n```text\ntellme-gemini/\n├── hooks/\n│   └── hooks.json           # Hook configuration mapping BeforeAgent/AfterAgent to tellme.mjs\n├── scripts/\n│   └── tellme.java          # Java Swing input dialog (single-file source program)\n├── gemini-extension.json    # Gemini Extension metadata\n├── package.json             # Project metadata (no dependencies)\n├── tellme.mjs               # Main hook handler logic (plain JavaScript, Node.js built-ins only)\n└── README.md                # This file\n```\n\n## Key Implementation Details\n\n- **`tellme.mjs`** — The main script executed by the hooks. It reads the JSON event payload from `stdin` and checks `hook_event_name` to route logic to the `BeforeAgent` or `AfterAgent` handlers. Uses only Node.js built-in modules (`child_process`, `fs`).\n- **`scripts/tellme.java`** — A single-file Java source program that displays a Swing dialog for user input. Runs directly via `java tellme.java` without needing compilation.\n- **`hooks/hooks.json`** — Registers `i-say` for the `BeforeAgent` hook and `tell-me` for the `AfterAgent` hook. Both point to the `tellme.mjs` script.\n\n## Author\n\nSandip Chitale\n\n## License\n\nMIT\n",
  "bytes": 3935,
  "sha": "0e25ef10d7a888a56eb0c1b53532a640c6da29c7e8c39e6ebdaddb6af1aaa453",
  "repo_slug": "sandipchitale/tellme-gemini",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_sandipchitale_tellme_gemini_df152f07/readme"
}