Formatter Validator Minifier Escape / Unescape JSON ↔ String JSON ↔ YAML JSON → CSV NDJSON / JSON Lines JSON → Types JSON ↔ XML JSON Diff JSON Patch Canonicalize (RFC 8785) Schema Validator Schema Generator JSONPath Tester JWT Decoder JSON Errors Schemas More Tools
JSONTools / Schema registry / bunfig.toml
Schema registry

bunfig.toml

bunfig.toml file

bunfig.toml

Check your file against this schema

Opens the validator with this schema already loaded. Paste your bunfig.toml and it validates in your browser — nothing is uploaded.

Validate a bunfig.toml → View raw schema

Fields

Generated directly from the schema, following local $refs, to two levels of nesting.

Field Type Description
preloadoneOfAn array or string of scripts/plugins to run before running the file or script https://bun.sh/docs/runtime/bunfig#preload
jsxstringConfigure how Bun handles JSX. You can also set these fields in the `compilerOptions` of your `tsconfig.json`, but they are supported here as well for non-TypeScript projects https://bun.sh/docs/runtime/bunfig#jsx
jsxFactorystringSpecify the function that is used to create JSX elements https://www.typescriptlang.org/tsconfig#jsxFactory
jsxFragmentstringSpecify the function that is used for JSX fragments https://www.typescriptlang.org/tsconfig#jsxFragment
jsxImportSourcestringSpecify the module specifier to be used for importing the JSX factory functions https://www.typescriptlang.org/tsconfig#jsxImportSource
smolbooleanEnable `smol` mode. This reduces memory usage at the cost of performance https://bun.sh/docs/runtime/bunfig#smol
default: false
logLevelstringSet the log level. This can be one of `"debug"`, `"warn"`, or `"error"` https://bun.sh/docs/runtime/bunfig#loglevel
one of: "debug", "warn", "error"
defineobjectThe `define` field allows you to replace certain global identifiers with constant expressions. Bun will replace any usage of the identifier with the expression. The expression should be a JSON string
loaderobjectConfigure how Bun maps file extensions to loaders. This is useful for loading files that aren't natively supported by Bun https://bun.sh/docs/runtime/bunfig#loader
telemetrybooleanThe `telemetry` field permit to enable/disable the analytics records. Bun records bundle timings (so we can answer with data, "is Bun getting faster?") and feature usage (e.g., "are people actually using macros?"). The request body size is
default: true
envoneOfConfigure automatic `.env` file loading. By default, Bun automatically loads `.env` files. https://bun.sh/docs/runtime/bunfig#env
consoleobjectConfigure console output behavior. https://bun.sh/docs/runtime/bunfig#console
console.depthintegerSet the default depth for `console.log()` object inspection. Default `2` https://bun.sh/docs/runtime/bunfig#console-depth
default: 2
serveobjectOptions for `Bun.serve` and `bun run` when serving HTTP. https://bun.com/docs/runtime/bunfig#serve
serve.portintegerThe default port for `Bun.serve` to listen on. Default `3000`. Can also be set via the `BUN_PORT` or `PORT` environment variables, or the `--port` flag. https://bun.com/docs/runtime/bunfig#serve-port
default: 3000
testobjectTest runner https://bun.sh/docs/runtime/bunfig#test-runner
test.rootstringThe root directory to run tests from. Default `.` https://bun.sh/docs/runtime/bunfig#test-root
test.preloadoneOfSame as the top-level `preload` field, but only applies to `bun test` https://bun.sh/docs/runtime/bunfig#test-preload
test.pathIgnorePatternsoneOfExclude files and directories from test discovery using glob patterns. Can be a single string pattern or an array of patterns. https://bun.sh/docs/runtime/bunfig#test-pathignorepatterns
test.smolbooleanSame as the top-level `smol` field, but only applies to `bun test` https://bun.sh/docs/runtime/bunfig#test-smol
default: false
test.coveragebooleanEnables coverage reporting. Default `false`. Use `--coverage` to override https://bun.sh/docs/runtime/bunfig#test-coverage
default: false
test.coveragePathIgnorePatternsoneOfExclude specific files or file patterns from coverage reports using glob patterns. Can be a single string pattern or an array of patterns. https://bun.sh/docs/runtime/bunfig#test-coveragepathignorepatterns
test.coverageThresholdoneOfTo specify a coverage threshold. By default, no threshold is set. If your test suite does not meet or exceed this threshold, `bun test` will exit with a non-zero exit code to indicate the failure
test.coverageSkipTestFilesbooleanWhether to skip test files when computing coverage statistics. Default false https://bun.sh/docs/runtime/bunfig#test-coverageskiptestfiles
default: false
test.coverageIgnoreSourcemapsbooleanWhether to report coverage against transpiled output instead of remapping line numbers through sourcemaps back to the original source. Default `false`. Primarily useful for debugging
default: false
test.coverageReporterarray<string>By default, coverage reports will be printed to the console. For persistent code coverage reports in CI environments and for other tools use `lcov` https://bun.sh/docs/runtime/bunfig#test-coveragereporter
default: ["text"]
test.coverageDirstringSet path where coverage reports will be saved. Please notice, that it works only for persistent `coverageReporter` like `lcov` https://bun.sh/docs/runtime/bunfig#test-coveragedir
default: "coverage"
test.randomizebooleanRun tests in random order. Default `false` https://bun.sh/docs/runtime/bunfig#test-randomize
default: false
test.seedintegerSet the random seed for test randomization. This requires `randomize` to be `true`. https://bun.sh/docs/runtime/bunfig#test-seed
test.rerunEachintegerRe-run each test file a specified number of times. Default `0` (run once). https://bun.sh/docs/runtime/bunfig#test-reruneach
default: 0
test.retryintegerDefault retry count for all tests. Failed tests will be retried up to this many times. Default `0` (no retries). https://bun.sh/docs/runtime/bunfig#test-retry
default: 0
test.concurrentTestGlobstringGlob pattern for test files that should run with concurrent test execution enabled. https://bun.sh/docs/runtime/bunfig#test-concurrenttestglob
test.onlyFailuresbooleanWhen enabled, only failed tests are displayed in the output. Default `false` https://bun.sh/docs/runtime/bunfig#test-onlyfailures
default: false
test.reporterobjectConfigure the test reporter settings. https://bun.sh/docs/runtime/bunfig#test-reporter
test.reporter.dotsbooleanEnable the dots reporter. Default `false` https://bun.sh/docs/runtime/bunfig#test-reporter-dots
default: false
test.reporter.junitstringEnable JUnit XML reporting and set the output file path. https://bun.sh/docs/runtime/bunfig#test-reporter-junit
test.timeoutintegerSet the default timeout in milliseconds for all tests. This can be overridden by individual tests. Default `5000` https://bun.com/docs/test/configuration#default-timeout
default: 5000
installobjectPackage management is a complex issue; to support a range of use cases, the behavior of `bun install` can be configured under the `[install]` section https://bun.sh/docs/runtime/bunfig#package-manager
install.optionalbooleanWhether to install optional dependencies. Default `true` https://bun.sh/docs/runtime/bunfig#install-optional
default: true
install.devbooleanWhether to install development dependencies. Default `true` https://bun.sh/docs/runtime/bunfig#install-dev
default: true
install.peerbooleanWhether to install peer dependencies. Default `true` https://bun.sh/docs/runtime/bunfig#install-peer
default: true
install.productionbooleanWhether bun install will run in "production mode". Default `false` In production mode, `"devDependencies"` are not installed. You can use `--production` in the CLI to override this setting
default: false
install.exactbooleanWhether to set an exact version in package.json. Default `false` By default Bun uses caret ranges; if the `latest` version of a package is `2.4.1`, the version range in your `package.json` will be `^2.4.1`. This indicates that any version
default: false
install.ignoreScriptsbooleanWhether to skip lifecycle scripts during install. Default `false`. Equivalent to the `--ignore-scripts` flag. When `true`, Bun will not run any `preinstall` / `install` / `postinstall` / `prepare` scripts — both for your project and for
default: false
install.concurrentScriptsintegerThe maximum number of concurrent lifecycle scripts to run at once. Defaults to two times the number of CPU cores. Equivalent to the `--concurrent-scripts` flag. https://bun.com/docs/runtime/bunfig#install-concurrentscripts
install.saveTextLockfilebooleanIf false, generate a binary `bun.lockb` instead of a text-based `bun.lock` file when running `bun install` and no lockfile is present Default `true` (since Bun v1.2) https://bun.sh/docs/runtime/bunfig#install-savetextlockfile
default: true
install.autostringTo configure Bun's package auto-install behavior. Default `"auto"` — when no `node_modules` folder is found, Bun will automatically install dependencies on the fly during execution https://bun.sh/docs/runtime/bunfig#install-auto
default: "auto"
one of: "auto", "force", "disable", "fallback"
install.preferstringConfigure how Bun resolves package versions against the npm registry when running scripts. Default `"online"`. - `"online"` — Check the registry for stale packages as needed. - `"offline"` — Skip staleness checks and resolve packages from
default: "online"
one of: "online", "offline", "latest"
install.frozenLockfilebooleanWhen true, `bun install` will not update `bun.lock`. Default `false`. If `package.json` and the existing `bun.lock` are not in agreement, this will error https://bun.sh/docs/runtime/bunfig#install-frozenlockfile
default: false
install.dryRunbooleanWhether `bun install` will actually install dependencies. Default `false`. When true, it's equivalent to setting `--dry-run` on all `bun install` commands https://bun.sh/docs/runtime/bunfig#install-dryrun
default: false
install.globalDirstringTo configure the directory where Bun puts globally installed packages https://bun.sh/docs/runtime/bunfig#install-globaldir
default: "~/.bun/install/global"
install.globalBinDirstringTo configure the directory where Bun installs globally installed binaries and CLIs https://bun.sh/docs/runtime/bunfig#install-globalbindir
default: "~/.bun/bin"
install.registryoneOfThe default registry is `https://registry.npmjs.org/`. This can be globally configured in `bunfig.toml` https://bun.sh/docs/runtime/bunfig#install-registry
default: "https://registry.npmjs.org/"
install.linkWorkspacePackagesbooleanWhether to link workspace packages from the monorepo root to their respective `node_modules` directories. Default `true` https://bun.sh/docs/runtime/bunfig#install-linkworkspacepackages
default: true
install.scopesobjectTo configure a registry for a particular scope (e.g. `@myorg/<package>`) use `install.scopes`. You can reference environment variables with `$variable` notation https://bun.sh/docs/runtime/bunfig#install-scopes
install.castringThe CA certificate as a string https://bun.sh/docs/runtime/bunfig#install-ca-and-install-cafile
install.cafilestringA path to a CA certificate file. The file can contain multiple certificates. https://bun.sh/docs/runtime/bunfig#install-ca-and-install-cafile
install.cacheobjectTo configure the cache behavior https://bun.sh/docs/runtime/bunfig#install-cache
install.cache.dirstringThe directory to use for the cache https://bun.sh/docs/runtime/bunfig#install-cache
default: "~/.bun/install/cache"
install.cache.disablebooleanWhen true, don't load from the global cache. Bun may still write to `node_modules/.cache` https://bun.sh/docs/runtime/bunfig#install-cache
default: false
install.cache.disableManifestbooleanWhen true, always resolve the latest versions from the registry https://bun.sh/docs/runtime/bunfig#install-cache
default: false
install.lockfileobjectTo configure lockfile behavior, use the `install.lockfile` section https://bun.sh/docs/runtime/bunfig#install-lockfile
install.lockfile.savebooleanWhether to generate a lockfile on `bun install`. Default `true` https://bun.sh/docs/runtime/bunfig#install-lockfile
default: true
install.lockfile.printstringWhether to generate a non-Bun lockfile alongside `bun.lock`. (A `bun.lock` will always be created.) Currently `"yarn"` is the only supported value https://bun.sh/docs/runtime/bunfig#install-lockfile
install.linkerstringConfigure the default linker strategy. Default `"hoisted"` https://bun.sh/docs/runtime/bunfig#install-linker
default: "hoisted"
one of: "hoisted", "isolated"
install.globalStorebooleanWhen using the `"isolated"` linker, share package installations across projects in a global virtual store at `<cache>/links/` and link `node_modules/.bun/<pkg>@<ver>` into it instead of materializing each package into the project. Default
default: false
install.publicHoistPatternarray<string>When using the `"isolated"` linker, packages matching these glob patterns are hoisted to the root `node_modules` directory so they can be resolved by any package in the project. Default `[]`. Similar to pnpm's `public-hoist-pattern`
default: []
install.hoistPatternarray<string>When using the `"isolated"` linker, packages matching these glob patterns are hoisted to the virtual store root (`node_modules/.bun`) so they can be resolved by other packages in the virtual store. Default `[]`. Similar to pnpm's
default: []
install.logLevelstringSet the log level for `bun install`. This can be one of `"debug"`, `"warn"`, or `"error"`. https://bun.com/docs/runtime/bunfig#install-loglevel
one of: "debug", "warn", "error"
install.securityobjectSecurity configuration for package installation https://bun.sh/docs/runtime/bunfig#install-security-scanner
install.security.scannerstringThe security scanner to use during certain package manager commands. https://bun.sh/docs/runtime/bunfig#install-security-scanner
install.minimumReleaseAgeintegerConfigure a minimum age (in seconds) for npm package versions. Package versions published more recently than this threshold will be filtered out during installation. Default is null (disabled)
install.minimumReleaseAgeExcludesarray<string>Packages that bypass the minimumReleaseAge requirement and can install immediately. https://bun.com/docs/runtime/bunfig#install-minimumreleaseage
runobjectThe `bun run` command can be configured under the `[run]` section. These apply to the `bun run` command and the `bun` command when running a file or executable or script. Currently, `bunfig.toml` isn't always automatically loaded for `bun
run.shellstringThe shell to use when running package.json scripts via `bun run` or `bun`. On Windows, this defaults to `"bun"` and on other platforms it defaults to `"system"`
one of: "system", "bun"
run.bunbooleanAuto alias `node` to `bun` When `true`, this prepends `$PATH` with a `node` symlink that points to the `bun` binary for all scripts or executables invoked by `bun run` or `bun` This means that if you have a script that runs `node`, it will
default: false
run.silentbooleanWhen `true`, suppresses the output of the command being run by `bun run` or `bun` https://bun.sh/docs/runtime/bunfig#run-silent-suppress-reporting-the-command-being-run
default: false
run.elide-linesintegerThe number of lines of script output shown per script when using `--filter`. Default `10`. Set to `0` to show all lines. Equivalent to the `--elide-lines` flag. https://bun.com/docs/runtime/bunfig#run-elide-lines-truncate-filtered-output
default: 10
run.noOrphansbooleanWhen `true`, Bun watches the process that spawned it and exits as soon as that parent goes away — even if the parent was `SIGKILL`ed and never got a chance to forward a signal. On its own exit, Bun also recursively `SIGKILL`s every
default: false

What we found in this schema

Specification sections for the keywords in this schema

Keyword Document Section
$commentJSON Schema Core, draft 2020-12§8.3 — Comments With "$comment"
$idJSON Schema Core, draft 2020-12§8.2.1 — The "$id" Keyword
$schemaJSON Schema Core, draft 2020-12§8.1.1 — "$schema"
additionalPropertiesJSON Schema Core, draft 2020-12§10.3.2.3 — "additionalProperties"
defaultJSON Schema Validation, draft 2020-12§9.2 — "default"
descriptionJSON Schema Validation, draft 2020-12§9.1 — "title" and "description"
enumJSON Schema Validation, draft 2020-12§6.1.2 — "enum"
examplesJSON Schema Validation, draft 2020-12§9.5 — "examples"
itemsJSON Schema Core, draft 2020-12§10.3.1.2 — "items"
maximumJSON Schema Validation, draft 2020-12§6.2.2 — "maximum"
minimumJSON Schema Validation, draft 2020-12§6.2.4 — "minimum"
oneOfJSON Schema Core, draft 2020-12§10.2.1.3 — "oneOf"
propertiesJSON Schema Core, draft 2020-12§10.3.2.1 — "properties"
typeJSON Schema Validation, draft 2020-12§6.1.1 — "type"

Documents

Attribution

This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.

← All schemas