Skip to content

What is tempeh?

Tempeh is a typesafe routing library for Next.js. It provides a way to define routes in a type-safe manner. With Tempeh and Zod, You can

  • Define declarative routes for all your pages in Next.js 14 and above.
  • Define Server Actions with Astro like type safe API.

Installation

To install tempeh, you can use npm or yarn.

Terminal
npm install tempeh
Terminal
yarn add tempeh
Terminal
pnpm add tempeh
Terminal
bun add tempeh

CLI

You can also use tempeh-cli to fasten up the process.

Terminal
npx tempeh-cli init

This will create all the boilerplate code for you to get started with Tempeh. It will also define declarative route objects for existing routes in your application.