# 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.

Updated: 2026-10-27

- **Details:** Foxmayn Frappe Types (fft)
- **Latest version:** v1.2.0 (2026-07-30) https://github.com/nasroykh/foxmayn_frappe_types/releases/tag/v1.2.0
- **License:** MIT
- **Language:** TypeScript
- **Links:** https://github.com/nasroykh/foxmayn_frappe_types

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:

```bash
pnpm add -D @foxmayn/fft
```

Generate types from your site:

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

Start the watcher during development:

```bash
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](https://foxmayn.com/en/services) we build, and `fft` is the tool we wrote to make that practical.

Source, releases and issues are on [GitHub](https://github.com/nasroykh/foxmayn_frappe_types). The license is MIT. Related tools: [Foxmayn Frappe CLI](https://foxmayn.com/en/open-source/ffc) and [Foxmayn Frappe Manager](https://foxmayn.com/en/open-source/ffm).

---
Contact: foxmayn@protonmail.com · https://foxmayn.com/en#contact
HTML: https://foxmayn.com/en/open-source/fft · [fr](https://foxmayn.com/fr/open-source/fft.md) · [ar](https://foxmayn.com/ar/open-source/fft.md)
