{
  "markdown": "# Gemini CLI Extension: Run Long Command\n\nA Gemini CLI extension that enables the execution of long-running shell commands in the background  asynchronously using tmux. This integrations functionality has been moved to the \"[self-command](https://github.com/stevenAthompson/self-command)\" gemini integration. It does this and more!\n\n## Features\n\n- **Asynchronous Execution:** Run commands like `sleep`, builds, or long scripts without timing out the Gemini CLI.\n- **Smart Notifications:** \"Wakes up\" the Gemini agent using `tmux send-keys` when the background task finishes. It intelligently waits for the terminal to be idle (stable for 10 seconds) before typing, ensuring it doesn't interrupt your work or the agent's current output.\n- **Compact Output:** Limits completion notifications to 64 characters to preserve terminal cleanliness, automatically truncating long command strings and output while preserving exit codes.\n- **Fail-Safe:** Checks for the required `tmux` session environment before execution.\n\n## Prerequisites\n\n- **Gemini CLI**\n- **tmux**: Required for session management and notifications.\n- **Node.js**: Environment for running the extension.\n\n## Installation\n\n### Via Gemini CLI (Recommended)\nYou can install this extension directly using the Gemini CLI:\n\n```bash\ngemini extensions install https://github.com/stevenAthompson/run-long-command\n```\n\n### Manual Installation (For Development)\n1.  **Clone the repository:**\n    ```bash\n    git clone https://github.com/stevenAthompson/run-long-command\n    cd run-long-command\n    ```\n\n2.  **Install dependencies:**\n    ```bash\n    npm install\n    ```\n\n3.  **Build the project:**\n    ```bash\n    npm run build\n    ```\n\n4.  **Link the extension:**\n    ```bash\n    gemini extensions link .\n    ```\n\n## Usage\n\n### 1. Start the Tmux Session\nThe extension requires running inside a `tmux` session named `gemini-cli`. A helper script is provided:\n\n```bash\n./gemini_tmux.sh\n```\n*This will check for the session and create/attach to it as needed.*\n\n### 2. Run Gemini CLI\nInside the tmux session, start your Gemini CLI agent.\n\n### 3. Use the Tool\nYou can now ask Gemini to run long commands:\n\n> \"Run `sleep 10` in the background.\"\n\nGemini will use the `run_long_command` tool, return immediately to let you know it started, and then receive a notification (and wake up) when the command finishes.\n\n## Development\n\n### Running Tests\n```bash\nnpm test\n```\n\n### Project Structure\n- `run_long_command.ts`: Main MCP server implementation.\n- `gemini_tmux.sh`: Setup script for the tmux environment.\n- `run_long_command.test.ts`: Unit tests.\n\n## License\nMIT\n",
  "bytes": 2609,
  "sha": "b61c9fd3294d7cf77e9f61ff6d6e596c37305ca01423ad5492bad2ba22e7af4b",
  "repo_slug": "stevenathompson/run-long-command",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_stevenathompson_run_long_command_b8923e11/readme"
}