Repository navigation
Getting Started bfscript
betterfinder-mod scaffold alice.my-mod --language bfscript --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.bfscript.json.
A bfscript file is a closed JSON grammar: typed records and lists, locals, conditionals, bounded forEach loops, and awaited catalog calls. There is no dynamic code, import or prototype access. Every expression is type-checked against the catalog, and the linter flags unreachable code, unused variables and missing cancellation checks.
{"format": 1, "functions": {"columnValues": {
"signature": "column.values@1",
"body": [{"return": {"await": {"call": "media.imageDimensions", "args": [{"get": ["input", "items"]}]}}}]
}}}Each function names the hook signature it implements (name@version); the manifest binds it with a hooks entry whose handler is the function name.
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