RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/pylarco/diff-apply

Cursor rule

.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc

Use Bun instead of Node.js, npm, pnpm, or vite.

Cursor rules

Quality

73/100

Scores the file, not the repository.

Length

312 words

2 headings · 4 code blocks

Repository

10

— · pushed 396 days ago

Last changed

3 days ago

First indexed 3 days ago.
pylarco/diff-apply/.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdcRawGitHub
1---
2description: Use Bun instead of Node.js, npm, pnpm, or vite.
3globs: "*.ts, *.tsx, *.html, *.css, *.js, *.jsx, package.json"
4alwaysApply: false
5---
6 
7Default to using Bun instead of Node.js.
8 
9- Use `bun <file>` instead of `node <file>` or `ts-node <file>`
10- Use `bun test` instead of `jest` or `vitest`
11- Use `bun build <file.html|file.ts|file.css>` instead of `webpack` or `esbuild`
12- Use `bun install` instead of `npm install` or `yarn install` or `pnpm install`
13- Use `bun run <script>` instead of `npm run <script>` or `yarn run <script>` or `pnpm run <script>`
14- Bun automatically loads .env, so don't use dotenv.
15 
16## APIs
17 
18- `Bun.serve()` supports WebSockets, HTTPS, and routes. Don't use `express`.
19- `bun:sqlite` for SQLite. Don't use `better-sqlite3`.
20- `Bun.redis` for Redis. Don't use `ioredis`.
21- `Bun.sql` for Postgres. Don't use `pg` or `postgres.js`.
22- `WebSocket` is built-in. Don't use `ws`.
23- Prefer `Bun.file` over `node:fs`'s readFile/writeFile
24- Bun.$`ls` instead of execa.
25 
26## Frontend
27 
28Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.
29 
30Server:
31 
32```ts#index.ts
33import index from "./index.html"
34 
35Bun.serve({
36 routes: {
37 "/": index,
38 "/api/users/:id": {
39 GET: (req) => {
40 return new Response(JSON.stringify({ id: req.params.id }));
41 },
42 },
43 },
44 // optional websocket support
45 websocket: {
46 open: (ws) => {
47 ws.send("Hello, world!");
48 },
49 message: (ws, message) => {
50 ws.send(message);
51 },
52 close: (ws) => {
53 // handle close
54 }
55 },
56 development: {
57 hmr: true,
58 console: true,
59 }
60})
61```
62 
63HTML 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.
64 
65```html#index.html
66<html>
67 <body>
68 <h1>Hello, world!</h1>
69 <script type="module" src="./frontend.tsx"></script>
70 </body>
71</html>
72```
73 
74With the following `frontend.tsx`:
75 
76```tsx#frontend.tsx
77import React from "react";
78 
79// import .css files directly and it works
80import './index.css';
81 
82import { createRoot } from "react-dom/client";
83 
84const root = createRoot(document.body);
85 
86export default function Frontend() {
87 return <h1>Hello, world!</h1>;
88}
89 
90root.render(<Frontend />);
91```
92 
93Then, run index.ts
94 
95```sh
96bun --hot ./index.ts
97```
98 
99For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.
100 

Commands it names

  • bun <file>
  • node <file>
  • bun test
  • jest
  • vitest
  • bun build <file.html|file.ts|file.css>
  • bun install
  • npm install
  • yarn install
  • pnpm install
  • bun run <script>
  • npm run <script>
  • yarn run <script>
  • pnpm run <script>
  • bun:sqlite
  • node:fs

Sections

  • APIs
  • Frontend

What it covers

setuptestcode-style

Stack — with the evidence

typescript

(1.00)

bun

(0.85)

javascript

(0.60)

node

(0.50)

Glob targeting

  • *.ts
  • *.tsx
  • *.html
  • *.css
  • *.js
  • *.jsx
  • package.json

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
pylarco
Language
—
License
—
Archived
no

All configs in this repo

Also in pylarco/diff-apply

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
pylarco/diff-apply.cursor/rules/dry.strict.mdc · 10Cursor rulestypescriptjavascript+1styledo-not50/1003 days ago
pylarco/diff-apply.cursor/rules/elysia.rule.mdc · 10Cursor rulestypescriptjavascript+1no sections16/1003 days ago
pylarco/diff-apply.cursor/rules/integration.task.mdc · 10Cursor rulestypescriptjavascript+1no sections16/1003 days ago
pylarco/diff-apply.cursor/rules/motion.mdc · 10Cursor rulestypescriptjavascript+1no sections16/1003 days ago
pylarco/diff-apply.cursor/rules/test.mdc · 10Cursor rulestypescriptjavascript+1testing-strategydo-not31/1003 days ago
Diff against .cursor/rules/dry.strict.mdc Diff against .cursor/rules/elysia.rule.mdc Diff against .cursor/rules/integration.task.mdc Diff against .cursor/rules/motion.mdc Diff against .cursor/rules/test.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack