Flipper Zero JavaScript Scripting: Running Apps Without ufbt or a C Toolchain
Our custom app development guide covers the "real" path to Flipper Zero apps — ufbt, C, the full GUI framework. That's still the right choice for anything performance-sensitive or deeply integrated with hardware, but it has real friction: a full toolchain install, a compile step, and C's usual sharp edges. Recent Flipper firmware (stock and most custom builds, including Momentum) ships a built-in JavaScript engine that runs scripts directly from the SD card with no compilation step at all — genuinely useful for quick automation, prototyping, and simple tools where spinning up the full ufbt workflow is overkill.
What the JS Engine Actually Is
This isn't a full Node.js or browser-style JavaScript environment — it's a lightweight embedded JS interpreter (mJS-based) exposing a specific set of Flipper API modules through JavaScript bindings: GPIO, Sub-GHz, NFC/RFID basics, notification LED/vibration, dialogs and simple UI, file I/O, and a few others depending on firmware version. Scripts run as plain `.js` text files directly from the SD card's `apps_data` or a scripts folder — no ufbt, no compiler, no flashing required. Edit the file on your computer, drop it on the SD card (or edit it in place via qFlipper's file browser), and run it from the Apps menu.
JavaScript Apps vs. C/ufbt Apps
JavaScript (fzjs)C / ufbt SetupNone — write a .js file, copy to SD card, runFull ufbt toolchain install, project scaffolding, compile step Iteration speedInstant — edit file, re-run, no build stepEdit, recompile, reflash — seconds to a minute per iteration PerformanceInterpreted, meaningfully slower for tight loops or timing-critical codeCompiled, full hardware speed API surfaceA defined subset of Flipper's capabilities, growing with firmware versions but narrower than the full C APIFull access to every Flipper API and hardware peripheral GUI capabilityBasic dialogs, simple menus, text/notification outputFull custom GUI framework — canvas drawing, custom views, animations Best forQuick automation scripts, prototyping an idea before committing to C, simple GPIO/Sub-GHz/file tasks, learning the Flipper's API surface without a C toolchainAnything performance-sensitive, hardware-timing-critical, or needing a real custom UI — the environmental sensor and robot rover projects on this site are built this wayWriting and Running Your First Script
- Confirm your firmware includes the JS engine. Recent stock firmware and Momentum both include it; check your firmware's release notes if you're on an older build or a less common custom firmware.
- Write a simple script on your computer — a basic example using the notification and dialog modules: let notify = require("notification"); let dialog = require("dialog"); notify.blink("green", "short"); dialog.message("Hello from JS", "Flipper scripting works!");
- Save it as a .js file and copy it to your Flipper's SD card, typically into a scripts folder under apps_data — check your specific firmware's documentation for the exact expected path, since this has moved between firmware versions.
- Run it from the Flipper's Apps > Scripts menu (or wherever your firmware surfaces JS scripts) — it executes immediately with no compile step.
- Iterate directly. Edit the file over USB/qFlipper, re-run from the same menu — this fast edit-run loop is the entire point of reaching for JS over a full C app for anything exploratory.
Practical Use Cases
- Quick GPIO automation — reading a sensor and triggering a notification or Sub-GHz transmission based on a simple condition, without setting up a full ufbt project for what's essentially a short script.
- Prototyping before committing to C. Working out the logic and API calls for an idea in JS first, then porting the proven-out design to a proper C app if it needs the performance or GUI capability JS doesn't offer, is a genuinely efficient workflow — you validate the concept fast, then invest the ufbt setup time only once you know it's worth building properly.
- File and SD card automation — batch-renaming captured files, generating simple reports from logged data, small housekeeping tasks that don't need hardware access at all.
- Teaching and learning the Flipper API. Because there's no compile step, JS is a genuinely lower-friction way to explore what the Flipper's various API modules actually do before diving into the more involved C API documented in our custom app development guide.
Limitations to Know Going In
- Not every C API is exposed to JS. Some lower-level hardware access, custom protocol work, and deep NFC/Sub-GHz manipulation still requires C — the JS API surface is intentionally a curated subset, not a 1:1 mirror of the full SDK.
- Performance matters for anything timing-sensitive. An interpreted script polling GPIO in a tight loop will be measurably slower than compiled C doing the same thing — fine for most automation tasks, not fine for anything needing microsecond-level timing precision.
- GUI is basic. Simple dialogs and menus, not the custom canvas-drawn interfaces C apps can build — if your project's whole point is a polished custom UI, plan on C from the start.
- Firmware-version dependent. The available JS modules and their exact API have changed across firmware releases as the engine has matured — check your specific firmware's current documentation rather than assuming an example from an older or different firmware build works unmodified.
The JS engine doesn't replace ufbt and C for serious Flipper app development — it fills the gap underneath it, for the quick scripts and automation tasks that never needed a full compiled app in the first place. If you've been putting off learning Flipper development because the ufbt toolchain setup felt like overkill for a simple idea, this is the lower-friction place to actually start.
Related Guides
- How to Install Custom Firmware and Develop Apps for the Flipper Zero
- Scripting Flipper from a PC: CLI Automation
- Writing Your First FAP App
- Building Your First Custom Flipper Zero App: ufbt Setup, GUI, and GPIO
- Flipper Zero Hardware Add-Ons Compared: WiFi Devboard, GPS Module, RFID Fuzzer, and Multi-Boards
- How to Use Bluetooth HID on the Flipper Zero for Wireless BadUSB Attacks
- How to Analyze EMV Payment Cards with the Flipper Zero: NFC, APDU Commands, and Security Architecture
- How to Use the Flipper Zero GPIO for Hardware Hacking: UART, SPI, I2C, and Debugging