Repository navigation
Getting Started JavaScript
bryanthaboi edited this page Nov 7, 2026
·
1 revision
betterfinder-mod scaffold alice.my-mod --language js --template column
cd alice.my-modTemplates: column, sidebar, toolbar, panel, preview, command, theme. sidebar and theme are data-only and need no script.
The entry for this language is scripts/main.js.
JavaScript is checked with the same TypeScript toolchain and strictness as TypeScript, whether or not the file has @ts-check. Annotate handlers with JSDoc so parameters are typed:
import { media } from "betterfinder";
/** @type {import("betterfinder").ColumnValuesHandler} */
export const columnValues = async (context, input) => {
return await media.imageDimensions(input.items);
};The same import, construct and permission rules as TypeScript apply.
betterfinder-mod validate . --jsonOutput lists file:line:col, a stable BF#### code and a suggested fix for every finding. The exit status is non-zero when any error is reported.
betterfinder-mod package . --out alice.my-mod.bfmodThe archive is reproducible: sorted entries, fixed timestamps, no compression. Editor files (betterfinder.d.ts, tsconfig.json), VCS metadata and node_modules are left out.
- Home
- Installing
- Building
- Replacing Finder
- Themes
- Keyboard Shortcuts
- FAQ
- Modding
- Getting Started
- Writing Mods in bfscript
- Writing Mods in TypeScript
- Permissions
- Hooks
- UI Surfaces
- Publishing to the Mod Index
- Using the MCP Server
- Troubleshooting
- Examples
- API Reference
- Manifest Reference
- Diagnostic Codes
- CLI Reference
- Reference Home
- Getting Started bfscript
- Getting Started TypeScript
- Getting Started JavaScript