Skip to content

pyrlyn/rtok

v0.15.1

Portable rtok hooks for Cursor CLI and other Agent Plugin hosts

rtok Cursor plugin

Linked by rtok agents install cursor (by default, once Cursor itself is detected) to ~/.cursor/plugins/local/rtok (D21: hooks). rtok agents install cursor --remove unlinks it. By hand: symlink this folder to ~/.cursor/plugins/local/rtok and restart Cursor. The plugin no longer ships an MCP server (T275/D33): rtok agents install cursor always writes mcpServers.rtok into ~/.cursor/mcp.json itself, plugin linked or not, so there is exactly one path to that entry instead of two copies to keep in sync.

Files:

  • .cursor-plugin/plugin.json — Cursor manifest: hooks → hooks/hooks.json.
  • hooks/hooks.json — beforeShellExecution → rtok hook PreToolUse --host cursor, afterShellExecution → rtok hook PostToolUse --host cursor, afterMCPExecution → rtok hook AfterMCPExecution --host cursor, postToolUse (matcher MCP:) → rtok hook PostToolUse --host cursor (replaces long MCP results via updated_mcp_tool_output).
  • plugin.json — Agent Plugins manifest (root plugin.json) for other hosts of that spec.

Each hook line finds rtok on PATH, then at ~/.ketch/bin/rtok (a Cursor started from the Dock has no shell PATH), and otherwise exits 0 without output; only sessionStart then prints one additional_context note: ketch install pyrlyn/rtok. The line is a { …; } group because Cursor appends the payload as a heredoc to the command. On Windows the plugin is a copy and its hooks keep the bare rtok hook … --host cursor line (PowerShell runs them).

Docs

Host documentation this plugin is written against. Re-check every link when the plugin changes.

Package docs