{
  "markdown": "# gemini-time-injector\n\nA [Gemini CLI](https://github.com/google-gemini/gemini-cli) extension that\ngives the model a sense of real-world time.\n\nLLMs have no built-in clock. Once a session begins they cannot tell:\n\n- what day or time it is right now,\n- how long the user took to reply,\n- how long a tool call (compile, test run, shell command) actually took,\n- how long the overall session has been running.\n\n`gemini-time-injector` plugs into every Gemini CLI hook event and pushes the\ncurrent wall-clock time back into the model's context — so the model can\nreason about elapsed time the same way you do.\n\n## What it does\n\n| Hook event      | What gets injected                                                       |\n| --------------- | ------------------------------------------------------------------------ |\n| `SessionStart`  | Current UTC + local time, timezone, and a primer note for the model.     |\n| `BeforeAgent`   | Refreshed wall-clock time, session elapsed, idle gap since last event.   |\n| `BeforeTool`    | (silent) records tool start time for accurate duration measurement.      |\n| `AfterTool`     | Tool name, exact tool duration, current wall-clock time.                 |\n| `AfterAgent`    | (system message) turn duration, suppressed from the model.               |\n| `SessionEnd`    | Final session duration; cleans up state.                                 |\n\nInjected content is wrapped by the CLI in `<hook_context>…</hook_context>`\nso the model can see it but it does not pollute the user-facing transcript.\n\n## Install\n\n```bash\ngemini extensions install https://github.com/kongyo2/gemini-time-injector\n```\n\n…or, for local development:\n\n```bash\ngit clone https://github.com/kongyo2/gemini-time-injector\ngemini extensions link ./gemini-time-injector\n```\n\nAfter installing, restart your Gemini CLI session. You should see a\n`time-injector: session start …` system message once per session.\n\n### Requirements\n\n- Gemini CLI ≥ 0.44 (hooks + extension support).\n- Node.js ≥ 20 (uses ESM, `node:test`, top-level `import.meta.url`).\n\n## License\n\nMIT\n",
  "bytes": 2069,
  "sha": "a19d33cec3f6259074a36367c4e3c0bbe56389df881146bb40a21db242d61abd",
  "repo_slug": "kongyo2/gemini-time-injector",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_kongyo2_gemini_time_injector_430547f4/readme"
}