Cline rules
.clinerules/bun-and-node.mdCline rules
Quality
74/100
Scores the file, not the repository.Length
436 words
4 headings · 0 code blocksRepository
66k
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# Bun (tooling) and Node (runtime)23This repo uses **bun** for package management and task running, and **Node** as4the execution runtime. Both are correct at the same time; the distinction is the5source of most confusion, so keep it straight before editing scripts, configs,6docs, or comments.78## Use bun for tooling910- `bun install` (never `npm install` / `npm ci`)11- `bun run <script>` (never `npm run <script>`)12- `bunx <bin>` (never `npx <bin>`)13- `bun <file>.ts` to run a TS entrypoint directly (no `ts-node` / `tsx`)14- `bun esbuild.mjs` to drive the build (esbuild/vite are still the bundlers)15- `bun run --parallel ...` for parallel tasks1617The root `bun.lock` is the single lockfile for the whole workspace, including18`apps/vscode`, `webview-ui`, and `testing-platform`. There are no per-package npm19lockfiles.2021## Node is the runtime — do NOT rewrite these to bun2223The build product runs on Node: the VS Code extension host loads24`dist/extension.js` as CommonJS under Node, and the standalone `cline-core` is a25Node process. The following are Node runtime/ABI references and are correct as-is:2627| Reference | Why it is Node |28|-----------|----------------|29| esbuild `platform: "node"` / `target: "node..."` | The bundle targets the Node runtime (extension host, standalone core). |30| `TARGET_NODE_VERSION` (`scripts/package-standalone.mjs`) | Pins the Node ABI of the bundled standalone runtime (matches the JetBrains-packaged Node). |31| `prebuild-install --target=<node version>` | Downloads native `.node` binaries for that Node ABI. |32| `NODE_PATH=... node cline-core.js` | The standalone core is launched by Node, not bun. |33| `node:` import specifiers (e.g. `node:fs`) | Node builtin module scheme; unrelated to tooling. |34| `process.versions.node`, `engines.node`, `@types/node` | Runtime version probe / declared runtime / its types. |35| `ELECTRON_RUN_AS_NODE` | VS Code/Electron runs the extension host as Node. |3637When a file legitimately uses both bun and node (e.g. `package-standalone.mjs`38does `bun install` but `prebuild-install --target=<node>`), the `node` token is39the runtime/ABI target, not tooling. If unsure, leave it.4041## Tests: bun vs the VS Code host4243A test file's runner is decided by its import:4445- **`import ... from "bun:test"`** → runs under `bun test` (the node-side unit46 suites + the SDK/model-catalog suites). `scripts/run-bun-unit-tests.ts`47 discovers these by the `bun:test` import and runs one isolated bun process per48 file. `build-tests.js` excludes them from the integration compile so the49 `bun:test` builtin never reaches Node.50- **`import ... from "mocha"`** → runs under `@vscode/test-cli` in a real VS Code51 extension host (Node). These exercise the live `vscode` API and cannot run52 under bun.5354So a file imports `bun:test` XOR `mocha`. Don't add `bun:test` to a test that55needs the real extension host.56
Also in cline/cline
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 |
|---|---|---|---|---|---|
| cline/cline.clinerules/cline-overview.md · 66k | Cline rules | archtypesapi | 54/100 | 3 days ago | |
| cline/cline.clinerules/debug-harness.md · 66k | Cline rules | buildtesttesting-strategysecurity+1 | 85/100 | 3 days ago | |
| cline/cline.clinerules/general.md · 66k | Cline rules | setupbuildstylearch+2 | 86/100 | 3 days ago | |
| cline/cline.clinerules/network.md · 66k | Cline rules | styletesting-strategydependencies | 54/100 | 3 days ago | |
| cline/cline.clinerules/protobuf-development.md · 66k | Cline rules | buildstylearchapi+1 | 74/100 | 3 days ago | |
| cline/cline.clinerules/sdk-migration.md · 66k | Cline rules | style | 59/100 | 3 days ago | |
| cline/cline.clinerules/storage.md · 66k | Cline rules | stylearchdatabasedo-not | 65/100 | 3 days ago | |
| cline/cline.github/copilot-instructions.md · 66k | Copilot instructions | buildteststyleapi+1 | 75/100 | 3 days ago | |
| cline/clineAGENTS.md · 66k | AGENTS.md | buildtestlint-formatstyle+2 | 83/100 | 3 days ago | |
| cline/clinesdk/AGENTS.md · 66k | AGENTS.md | setupbuildteststyle+5 | 89/100 | 3 days ago | |
| cline/clinesdk/packages/llms/AGENTS.md · 66k | AGENTS.md | no sections | 45/100 | 3 days ago |
Diff against .clinerules/cline-overview.md Diff against .clinerules/debug-harness.md Diff against .clinerules/general.md Diff against .clinerules/network.md Diff against .clinerules/protobuf-development.md Diff against .clinerules/sdk-migration.md Diff against .clinerules/storage.md Diff against .github/copilot-instructions.md Diff against AGENTS.md Diff against sdk/AGENTS.md Diff against sdk/packages/llms/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bashdeban/fastmind.clinerules/.project-consistency-keeper2.md · 5 | Cline rules | setupbuildtestlint-format+11 | 100/100 | 3 days ago | |
| JCodesMore/ai-website-cloner-template.clinerules · 31k | Cline rules | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| BryaanF/LiantPortfolio.clinerules/project-guidelines.md · 0 | Cline rules | buildstylearchgit+2 | 96/100 | 3 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| u9401066/zotero-keeper.clinerules/50-pubmed-project.md · 6 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| VaillerTeeter/HoshimiNest.clinerules/project-identity.md · 1 | Cline rules | setuparchtypesdo-not | 93/100 | yesterday | |
| HerringtonDarkholme/megarepo.clinerules/02-development.md · 17 | Cline rules | setupbuildteststyle+3 | 92/100 | 3 days ago | |
| blendsdk/codeops-mcp.clinerules/project.md · 0 | Cline rules | buildteststylearch+7 | 91/100 | 3 days ago |
