Skip to content
Jev Hub

[ Guide ]

Jev in Cursor: the hook that guards your shell

Jev in Cursor: add a beforeShellExecution hook with failClosed so Jev checks each shell command. What is documented, and what is not. Checked 25 October 2026.

Published By Jev Hub

[ TLDR ]
  • Jev cannot be the model behind Cursor, but OpenRouter's cookbook shows a hook that sends each shell command to Jev before it runs.
  • The hook goes in .cursor/hooks.json as a beforeShellExecution entry, and failClosed must be true, because Cursor otherwise allows a command when the hook crashes or times out.
  • TypeSafe's skill page names Claude Code and Codex, not Cursor, so check whether Cursor appears when the installer asks you to choose an agent.

Jev in Cursor, at a glance

FeatureWhat to doWhere it is documented
Approve shell commands with JevA beforeShellExecution hook in .cursor/hooks.json, with version 1, a timeout of 15 and failClosed trueOpenRouter's coding-agent cookbook
What the hook answersAlways allow or ask, never denyOpenRouter's coding-agent cookbook
When it runsBefore every shell command, not only the ones that would promptOpenRouter's coding-agent cookbook
What Jev checksOnly whether the command is reversible and contained to the project: Cursor sends no task textOpenRouter's coding-agent cookbook
The TypeSafe skillInstall with npx skills add typesafe-ai/skills --skill typesafe-ai and see whether Cursor is offered; TypeSafe's page names Claude Code and CodexTypeSafe's agent-skill page
KeyOPENROUTER_API_KEY in the environment Cursor runs inOpenRouter's coding-agent cookbook

Settings are from OpenRouter's cookbook and TypeSafe's agent-skill page, read on 25 October 2026. Check the linked pages for current details.

Can Jev work with Cursor?

Yes, beside it. TypeSafe's documentation lists Cursor among tools whose language model Jev cannot replace, because Jev returns typed decisions and writes no code. The documented use is as a judge: a hook that checks each shell command before Cursor runs it.

How do I set up the Jev hook in Cursor?

OpenRouter's cookbook gives Cursor its own script, which always answers allow or ask, never deny. Save it anywhere in the project, then register it in .cursor/hooks.json with "version": 1 and a beforeShellExecution entry that runs bun ./path/to/jev-permission-hook.ts with a timeout of 15. You can add a matcher regular expression to limit which commands it sees.

Set "failClosed": true. The cookbook calls this important: without it Cursor allows a command whenever the hook crashes or times out, which defeats the point of a check. You also need Bun installed and OPENROUTER_API_KEY set in the environment Cursor runs in.

How is the Cursor hook different from the others?

Three differences, all from the cookbook. The Cursor hook runs before every shell command, not only the ones that would have asked for permission. Cursor sends no task text, so Jev asks only whether the command is reversible and stays inside the project, and a command is approved only at a score of 0.9 or more. Because there is one question instead of two, the fixed risk list does more of the work: recursive deletes, force pushes, sudo, publishing, deploy commands and credential paths always go to the normal prompt before Jev is called.

To test it, pipe some text that is not JSON into the script. It should print {"permission":"ask"}. Then run a test command in Cursor.

Can I use the TypeSafe skill in Cursor?

TypeSafe's agent-skill page names Claude Code and Codex, and says the skill works with other agents that use the skills installer, which asks you to choose your agent. It does not say Cursor is on that list. Run the installer and see whether Cursor is offered. If it is not, you can copy the skills/typesafe-ai folder from the repository into your agent's skills directory by hand, which the page also describes.

Cursor · install the skill, if Cursor is offered
npx skills add typesafe-ai/skills --skill typesafe-ai

A third-party guide by Flavio Copes covers Jev with Claude Code, Codex and Cursor. We did not check its Cursor steps against TypeSafe's own pages, so test them before you rely on them.

What can I build with Cursor and Jev?

Published ideas, with the numbers their authors report. They are the authors' own and not independently checked:

  • Guard every shell command. The hook above costs about $0.0000168 for a request of roughly 400 input tokens according to OpenRouter's cookbook, and only commands that pass the fixed list are billed.
  • Gate an agent's tool calls. Vercel's example asks Jev "should the agent take another step?" and continues at a probability of 0.8 or more. The same shape works for "does this tool call match the plan?".
  • Route requests by intent. TypeSafe's intent-routing pattern sends each request to a fixed set of destinations with a confidence measure, which suits a Cursor project that has several tools or models behind one entry point.

What goes wrong in Cursor?

The snags the cookbook lists:

  • A crash lets commands through. That happens when failClosed is missing or false. Set it to true.
  • Jev only sees the command. It cannot tell that a command reads a secret unless the path or text shows it, so the fixed list is the real safety boundary.
  • Scores shift a little between identical requests. Start at 0.9, and lower toward 0.8 only if safe commands keep prompting.
  • Approvals are one-time. They do not create saved rules.

Common questions

Sources

Written by Jev Hub from the sources below and checked against them on . Where a figure is a company's own claim, the article says so.