In this article, we review Oxfmt. We will look at:
What is Oxfmt?
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. I study codebase architecture in large open-source projects.
Email: ramu.narasinga@gmail.com
I spent 200+ hours analyzing Supabase, shadcn/ui, LobeChat. Found the patterns that separate AI slop from production code. Stop refactoring AI slop. Start with proven patterns. Check out production-grade projects at thinkthroo.com

Top comments (0)