Invite-Only Early Access — Think Throo GitHub App is currently invite-only. Request access here.
2026February

Oxfmt, a high-performance formatter for the JavaScript ecosystem.

In this article, we review Oxfmt. We will look at:

  1. What is Oxfmt?

  2. Oxfmt in cloudflare/agents codebase.

What is Oxfmt?

Oxfmt (/oʊ-ɛks-fɔːr-mæt/) is a high-performance formatter for the JavaScript ecosystem.

So what languages does Oxfmt support? I found the below info from the docs.

JavaScript, JSX, TypeScript, TSX, JSON, JSONC, JSON5, YAML, TOML, HTML, Angular, Vue, CSS, SCSS, Less, Markdown, MDX, GraphQL, Ember, Handlebars

Oxfmt benchmarks show that it is approximately 30x faster than Prettier and 2x faster than Biome.

Oxfmt in cloudflare/agents codebase.

I found a file named .oxfmtrc.json in cloudflare/agents codebase. It is defined as below:

{
  "$schema": "./node_modules/oxfmt/configuration_schema.json",
  "trailingComma": "none",
  "printWidth": 80,
  "experimentalSortPackageJson": false,
  "ignorePatterns": ["packages/agents/CHANGELOG.md", "site/agents/.astro"]
}

Check out the configuration guide to learn more.

In packages/agents, there is a script file that runs this Oxfmt using execSync.

// then run oxfmt on the generated .d.ts files
execSync("oxfmt --write ./dist/*.d.ts");

execSync is imported as shown below:

import { execSync } from "node:child_process";

About me:

Hey, my name is Ramu Narasinga. Email: ramu.narasinga@gmail.com

Tired of AI-generated code that works but nobody understands? 

I spent 3+ years studying OSS codebases and wrote 350+ articles on what makes them production-grade. I built an open source tool that reviews your PR against your existing codebase patterns.

Your codebase. Your patterns. Enforced. 

Get started for free —thinkthroo.com

References:

  1. cloudflare/agents/.oxfmtrc.json

  2. oxc.rs/docs/guide/usage/formatter.html

  3. oxc-project/bench-formatter

  4. oxc.rs/docs/…/config.html#configuration

  5. cloudflare/agents/packages/agents/scripts/build.ts