bun-utils

bun-utils is a cursor rule for Cursor from PrinceGupta1999/graylog-mcp. It costs 8,075 tokens per session, scanned A, a copy of bun-utils, MIT.

A reference for Bun, a JavaScript and TypeScript runtime, covering values and functions exposed by its command-line tool.

In plain words
What is it for?
Checking the Bun version and revision, reading environment or entry-file details, and pausing scripts with Bun’s sleep function. The excerpt covers only part of the reference.
Why use it?
It helps an agent understand what the running Bun environment provides instead of guessing from Node.js behavior.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/princegupta1999/graylog-mcp/bun-utils
Clone the repo
git clone --depth 1 https://github.com/PrinceGupta1999/graylog-mcp

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bun-utils

README.md
[![agentmods](https://agentmods.dev/badge/rules/princegupta1999/graylog-mcp/bun-utils.svg)](https://agentmods.dev/rules/princegupta1999/graylog-mcp/bun-utils)
Your own site
<a href="https://agentmods.dev/rules/princegupta1999/graylog-mcp/bun-utils"><img src="https://agentmods.dev/badge/rules/princegupta1999/graylog-mcp/bun-utils.svg" alt="Measured on agentmods" height="20"></a>
Per session 8,075 This file is loaded in full into every session.
When invoked 8,075 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.08075 $0.08075
Opus 5 $0.04038 $0.04038
Sonnet 5 $0.01615 $0.01615
Haiku 4.5 $0.00808 $0.00808

Measured 3d ago against content hash 457283f3bcdd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bun-utils scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to bun-utils — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/bun-utils.mdc · 803 lines

How it starts

The opening of the file, as written. The whole thing — 803 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Bun.version

A string containing the version of the bun CLI that is currently running.

Bun.version;
// => "0.6.4"

Bun.revision

The git commit of Bun that was compiled to create the current bun CLI.

Bun.revision;
// => "f02561530fda1ee9396f51c8bc99b38716e38296"

Bun.env

An alias for process.env.

Bun.main

An absolute path to the entrypoint of the current program (the file that was executed with bun run).

Bun.main;
// /path/to/script.ts

This is particular useful for determining whether a script is being directly executed, as opposed to being imported by another script.

if (import.meta.path === Bun.main) {
  // this script is being directly executed
} else {
  // this file is being imported from another script
}

This is analogous to the require.main = module trick in Node.js.

Bun.sleep()

Bun.sleep(ms: number)

Returns a Promise that resolves after the given number of milliseconds.

console.log("hello");
await Bun.sleep(1000);
console.log("hello one second later!");

Alternatively, pass a Date object to receive a Promise that resolves at that point in time.

const oneSecondInFuture = new Date(Date.now() + 1000);

console.log("hello");
await Bun.sleep(oneSecondInFuture);
console.log("hello one second later!");

Bun.sleepSync()

Bun.sleepSync(ms: number)

A blocking synchronous version of Bun.sleep.

console.log("hello");
Bun.sleepSync(1000); // blocks thread for one second
console.log("hello one second later!");

Bun.which()

Bun.which(bin: string)

Returns the path to an executable, similar to typing which in your terminal.

const ls = Bun.which("ls");
console.log(ls); // "/usr/bin/ls"

By default Bun looks at the current PATH environment variable to determine the path. To configure PATH:

Read the full file on GitHub · 803 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 803 lines · 8,075 tokens per session scan A 457283f3bcdd

Subscribe to this mod's changes

bun-utils is a cursor rule published in the GitHub repository PrinceGupta1999/graylog-mcp (1 stars, last pushed 2mo ago), licensed MIT. It adds 8,075 tokens to every session, about $0.0404 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to bun-utils, differing in 0 lines, and is treated as a copy.