CLAUDE.md
.claude/hooks/CLAUDE.mdUse Bun instead of Node.js, npm, pnpm, or vite.
CLAUDE.md
Quality
73/100
Scores the file, not the repository.Length
336 words
3 headings · 5 code blocksRepository
2
— · pushed 2 days agoLast changed
3 days ago
First indexed 3 days ago.1234567Default to using Bun instead of Node.js.89- 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.1516## APIs1718- `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/writeFile24- Bun.$`ls` instead of execa.2526## Testing2728Use `bun test` to run tests.2930```ts#index.test.ts31import { test, expect } from "bun:test";3233test("hello world", () => {34 expect(1).toBe(1);35});36```3738## Frontend3940Use HTML imports with `Bun.serve()`. Don't use `vite`. HTML imports fully support React, CSS, Tailwind.4142Server:4344```ts#index.ts45import index from "./index.html"4647Bun.serve({48 routes: {49 "/": index,50 "/api/users/:id": {51 GET: (req) => {52 return new Response(JSON.stringify({ id: req.params.id }));53 },54 },55 },56 // optional websocket support57 websocket: {58 open: (ws) => {59 ws.send("Hello, world!");60 },61 message: (ws, message) => {62 ws.send(message);63 },64 close: (ws) => {65 // handle close66 }67 },68 development: {69 hmr: true,70 console: true,71 }72})73```7475HTML 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.7677```html#index.html78<html>79 <body>80 <h1>Hello, world!</h1>81 <script type="module" src="./frontend.tsx"></script>82 </body>83</html>84```8586With the following `frontend.tsx`:8788```tsx#frontend.tsx89import React from "react";9091// import .css files directly and it works92import './index.css';9394import { createRoot } from "react-dom/client";9596const root = createRoot(document.body);9798export default function Frontend() {99 return <h1>Hello, world!</h1>;100}101102root.render(<Frontend />);103```104105Then, run index.ts106107```sh108bun --hot ./index.ts109```110111For more information, read the Bun API docs in `node_modules/bun-types/docs/**.md`.112
Also in wodsmith/thewodapp
Diff this repo’s formatsOne 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?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| wodsmith/thewodapp.cursorrules · 2 | .cursorrules | testlint-formatstylearch+4 | 64/100 | 3 days ago | |
| wodsmith/thewodappAGENTS.md · 2 | AGENTS.md | teststylearchdo-not+1 | 73/100 | 3 days ago | |
| wodsmith/thewodappCLAUDE.md · 2 | CLAUDE.md | buildtestlint-formatstyle+7 | 96/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| Adit-Jain-srm/NightmareNetCLAUDE.md · 45 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 3 days ago | |
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| microsoft/playwrightCLAUDE.md · 94k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 3 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.4k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 3 days ago | |
| filamentphp/filamentCLAUDE.md · 32k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 3 days ago | |
| dotCMS/coreCLAUDE.md · 949 | CLAUDE.md | setupbuildteststyle+7 | 99/100 | today | |
| lollipopkit/flutter_server_boxCLAUDE.md · 8.3k | CLAUDE.md | buildteststylearch+2 | 98/100 | 3 days ago |
