{"slug": "bun-init-automatically-creates-a-claude-md-file-by-default", "title": "`bun init` automatically creates a Claude.md file by default", "summary": "Bun's `bun init` command now automatically creates a CLAUDE.md file by default when Claude CLI is detected, and a `.cursor/rules/*.mdc` file when Cursor is detected, to configure AI tools for the project. The feature can be disabled with the `CLAUDE_CODE_AGENT_RULE_DISABLED` environment variable. Bun also scaffolds a `package.json`, `tsconfig.json` or `jsconfig.json`, an entry point, and a `README.md` file, with optional React project templates.", "body_md": "`bun init`\n\n.\nterminal\n\n`enter`\n\nto accept the default answer for each prompt, or pass the `-y`\n\nflag to auto-accept the defaults.\n`bun init`\n\ninfers settings with sane defaults and is non-destructive when run multiple times.\n- a\n`package.json`\n\nfile with a name that defaults to the current directory name - a\n`tsconfig.json`\n\nor`jsconfig.json`\n\nfile, depending on whether the entry point is a TypeScript file - an entry point, which defaults to\n`index.ts`\n\nunless any of`index.{tsx, jsx, js, mts, mjs}`\n\nexist or the`package.json`\n\nspecifies a`module`\n\nor`main`\n\nfield - a\n`README.md`\n\nfile\n\n`$BUN_AGENT_RULE_DISABLED=1`\n\n):\n- a\n`CLAUDE.md`\n\nfile when Claude CLI is detected (disable with`CLAUDE_CODE_AGENT_RULE_DISABLED`\n\nenv var) - a\n`.cursor/rules/*.mdc`\n\nfile when Cursor is detected, which tells[Cursor AI](https://cursor.sh)to use Bun instead of Node.js and npm\n\n`-y`\n\nor `--yes`\n\nto accept the defaults without prompting.\nAt the end, it runs `bun install`\n\nto install `@types/bun`\n\n.\n## CLI Usage\n\nterminal\n\n### Initialization Options\n\nboolean\n\nAccept all default prompts without asking questions. Alias:\n\n`-y`\n\nboolean\n\nOnly initialize type definitions (skip app scaffolding). Alias:\n\n`-m`\n\n### Project Templates\n\nstring|boolean\n\nScaffold a React project. When used without a value, creates a baseline React app.\n\nAccepts values for presets:\n\nAccepts values for presets:\n\n`tailwind`\n\n– React app preconfigured with Tailwind CSS`shadcn`\n\n– React app with`@shadcn/ui`\n\nand Tailwind CSS\n\n```\nbun init —react bun init —react=tailwind bun init —react=shadcn\n```\n\n### Output & Files\n\ninfo\n\nInitializes project files and configuration for the chosen options. Exact files vary by template.\n\n### Help\n\nboolean\n\nPrint this help menu. Alias:\n\n`-h`\n\n### Examples\n\n-\nAccept all defaults\nterminal\n-\nReact\nterminal\n-\nReact + Tailwind CSS\nterminal\n-\nReact + @shadcn/ui\nterminal", "url": "https://wpnews.pro/news/bun-init-automatically-creates-a-claude-md-file-by-default", "canonical_source": "https://bun.com/docs/runtime/templating/init", "published_at": "2026-07-28 20:02:27+00:00", "updated_at": "2026-07-28 20:23:03.668120+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Bun", "Claude CLI", "Cursor", "Tailwind CSS", "shadcn/ui"], "alternates": {"html": "https://wpnews.pro/news/bun-init-automatically-creates-a-claude-md-file-by-default", "markdown": "https://wpnews.pro/news/bun-init-automatically-creates-a-claude-md-file-by-default.md", "text": "https://wpnews.pro/news/bun-init-automatically-creates-a-claude-md-file-by-default.txt", "jsonld": "https://wpnews.pro/news/bun-init-automatically-creates-a-claude-md-file-by-default.jsonld"}}