Skip to content
Foxmayn
All toolsFoxmayn Frappe Types · fft

Foxmayn Frappe Types: TypeScript for Frappe apps

Build, watch and typecheck TypeScript in your Frappe apps, and generate DocType types from a live site. Available on npm as @foxmayn/fft.

Install

pnpm
pnpm add -D @foxmayn/fft

Not an official Frappe project. Not affiliated with Frappe Technologies.

What it does

fft lets you write the client code of a Frappe app in TypeScript. It compiles your files, watches them while you work, runs the type checker, and generates TypeScript types for your DocTypes from a running site on your local bench. It is for Frappe developers who want the editor to know what a field is called and what type it holds.

Features

  • fft build compiles your TypeScript for the Frappe app.
  • fft watch rebuilds on every change. Add --typecheck to check types as you go.
  • fft typecheck runs the type checker alone.
  • fft generate reads DocTypes from a site on your local bench and writes types. It takes --site, --doctypes and --out.
  • Typed client globals. The package ships types for the Frappe client globals, such as frappe and cur_frm.

Install

You need Node 18 or newer. Add fft to your Frappe app as a dev dependency:

pnpm add -D @foxmayn/fft

Generate types from your site:

pnpm fft generate --site acme.localhost --doctypes "Sales Invoice,Customer" --out myapp/types/generated

Start the watcher during development:

pnpm fft watch --typecheck

The current npm version is 1.2.0, published on 30 July 2026. We run the test suite with vitest before each publish. There is no CI on push and the package is not signed.

Why we built it

A Frappe form script is JavaScript that refers to fields by string. A typo in a field name fails at run time, on a user's screen. With generated types, the same typo fails in your editor. We write client code in TypeScript for every custom Frappe app we build, and fft is the tool we wrote to make that practical.

Source, releases and issues are on GitHub. The license is MIT. Related tools: Foxmayn Frappe CLI and Foxmayn Frappe Manager.

Have a Frappe project?

Tell us what runs today and what should change.

Or email us at[email protected]

We only use your details to reply to you.