Skip to content
Prompt

inbound — Cursor Rules

by inboundemail

AI Summary

This Cursor rule guides developers to use Bun as their default runtime and build tool, replacing Node.js, npm, and common libraries with Bun's native equivalents. Ideal for agents and indie developers building with Cursor who want to standardize on Bun's faster, integrated toolchain.

Install

Copy this and paste it into Claude Code, Cursor, or any AI assistant:

I want to add the "inbound — Cursor Rules" prompt rules to my project.
Repository: https://github.com/inboundemail/inbound

Please read the repo to find the rules/prompt file, then:
1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type)
2. If there's an existing rules file, merge the new rules in rather than overwriting
3. Confirm what was added

Description

email infrastructure for agent and indie devs

APIs

• Bun.serve() supports WebSockets, HTTPS, and routes. Don't use express. • bun:sqlite for SQLite. Don't use better-sqlite3. • Bun.redis for Redis. Don't use ioredis. • Bun.sql for Postgres. Don't use pg or postgres.js. • WebSocket is built-in. Don't use ws. • Prefer Bun.file over node:fs's readFile/writeFile • Bun.$ls instead of execa.

Testing

Use bun test to run tests. `ts#index.test.ts import { test, expect } from "bun:test"; test("hello world", () => { expect(1).toBe(1); }); `

Frontend

Use HTML imports with Bun.serve(). Don't use vite. HTML imports fully support React, CSS, Tailwind. Server: `ts#index.ts import index from "./index.html" Bun.serve({ routes: { "/": index, "/api/users/:id": { GET: (req) => { return new Response(JSON.stringify({ id: req.params.id })); }, }, }, // optional websocket support websocket: { open: (ws) => { ws.send("Hello, world!"); }, message: (ws, message) => { ws.send(message); }, close: (ws) => { // handle close } }, development: { hmr: true, console: true, } }) ` HTML files can import .tsx, .jsx or .js files directly and Bun's bundler will transpile & bundle automatically. <link> tags can point to stylesheets and Bun's CSS bundler will bundle. `html#index.html <html> <body> <h1>Hello, world!</h1> <script type="module" src="./frontend.tsx"></script> </body> </html> ` With the following frontend.tsx: `tsx#frontend.tsx import React from "react"; // import .css files directly and it works import './index.css'; import { createRoot } from "react-dom/client"; const root = createRoot(document.body); export default function Frontend() { return <h1>Hello, world!</h1>; } root.render(<Frontend />); ` Then, run index.ts `sh bun --hot ./index.ts ` For more information, read the Bun API docs in node_modules/bun-types/docs/**.md.

Discussion

0/2000
Loading comments...

Health Signals

MaintenanceCommitted 23d ago
Active
Adoption100+ stars on GitHub
335 ★ · Growing
DocsMissing or thin
Undocumented

GitHub Signals

Stars335
Forks42
Issues9
Updated23d ago
View on GitHub
MIT License

My Fox Den

Community Rating

Sign in to rate this booster

Works With

Any AI assistant that accepts custom rules or system prompts

Claude
ChatGPT
Cursor
Windsurf
Copilot
+ more