Updated Oct 16, 2026

Utilities

Format JavaScript or TypeScript with Oxfmt

oxfmt-format is a single-file JavaScript and TypeScript formatting node powered by Oxfmt.

Agent

overview

What oxfmt-format does

Format one JavaScript, JSX, TypeScript or TSX file on stdin with Oxfmt. Choose the parser with language; js is the default. Fixed settings use two spaces, semicolons, double quotes, width 80 and LF line endings, with embedded-language formatting disabled.

The wrapper ignores nested project configuration and uses a synthetic stdin filename for the chosen parser, so a supplied output.txt works. Input is limited to 5 MiB and formatting to 60 seconds; the Node heap is 512 MiB and output limit is 20 MiB. Empty source is valid.

Input or native processing failures fail the operation. The operation keeps the supplied source unchanged.

This operation uses 0.71.0. Upstream license: MIT. The source link identifies the program used by this node.

source github.com/oxc-project/oxc/tree/oxfmt_v0.71.0/npm/oxfmt

use cases

Where oxfmt-format fits

Format a JavaScript snippet

Format one JS file with the bundled fixed settings.

Select a TypeScript parser

Set language to ts or tsx for TypeScript syntax.

Use consistent source formatting

Return a formatted copy without executing source or discovering package scripts.

reference

oxfmt-format inputs and flags

2 inputs
NameTypeFlagDescription
inputFILE--inputUTF-8 source file up to 5 MiB. Filename extension does not matter. Fixed config uses two spaces, semicolons, double quotes, width 80 and LF line endings.
languageSTRING--languageParser language; one of js, jsx, ts or tsx. Defaults to js. Formatting times out after 60 seconds.

Showing key inputs. oxfmt-format exposes 2 inputs in total.

example

Run oxfmt-format

oxfmt-format · command
/app/run.sh --input ./input.txt --language js ./output
sample output
const answer = { value: 42, label: "hello" };
function add(a, b) {
  return a + b;
}

guidance

Choosing oxfmt-format

Choose Oxfmt for a formatted source file. Formatting does not transpile or type-check TypeScript, and it does not run the program or load repository scripts.

black-format

Formats Python; Oxfmt handles JS, JSX, TS and TSX.

faq

oxfmt-format questions

input: UTF-8 source file up to 5 MiB. Filename extension does not matter. Fixed config uses two spaces, semicolons, double quotes, width 80 and LF line endings. language: Parser language; one of js, jsx, ts or tsx. Defaults to js. Formatting times out after 60 seconds.

Formatted source. Native processing must succeed before an output artifact is returned.

The wrapper ignores nested project configuration and uses a synthetic stdin filename for the chosen parser, so a supplied output.txt works. Input is limited to 5 MiB and formatting to 60 seconds; the Node heap is 512 MiB and output limit is 20 MiB. Empty source is valid.

Choose Oxfmt for a formatted source file. Formatting does not transpile or type-check TypeScript, and it does not run the program or load repository scripts.

The image repository also contains a digest-bound source/notices artifact. Download it with oras pull docker.io/nenadzaric/skills-intel-oxfmt-format@sha256:a4ec6698846b9bd5d2bdb3105f76d40e6725323cc0af428ca6a47a749a0c7fb2. The bundle includes the build recipe, licenses, copied notices and component-source directions. Bundle SHA256: 3398511485d426cef77dbef24d8b4b339c18014451e0a8cf20bcef480af75f04. Follow its source directions for upstream archives and patches. Image and source/notices repository.

Run oxfmt-format yourself

The synthetic run checks formatted source. The excerpt shows exact text asserted by saved passing platform verifier; recovered from fixture assertion, not a newly downloaded artifact. The command shown is the container entrypoint with example paths, not a host-installed CLI command.

Facts on this page come from the live Trickest tool library.