Skip to content

Installation

Quick start

The easiest way to start a new Fedify project is to use the fedify init command. It creates a new directory with a minimal Fedify project template.

CLI toolchain

First of all, you need to have the fedify command, the Fedify CLI toolchain, installed on your system. If you haven't installed it yet, please follow the following instructions:

sh
npm install -g @fedify/cli
sh
bun install -g @fedify/cli
sh
deno install -g -A --unstable-fs --unstable-kv --unstable-temporal -n fedify jsr:@fedify/cli

There are other ways to install the fedify command. Please refer to the Installation section in the CLI toolchain docs.

Project setup

After installing the fedify command, you can create a new Fedify project by running the following command:

sh
fedify init your-project-dir

The above command will start a wizard to guide you through the project setup. You can choose the JavaScript runtime, the package manager, and the web framework you want to integrate Fedify with, and so on. After the wizard finishes, you will have a new Fedify project in the your-project-dir directory.

For more information about the fedify init command, please refer to the fedify init section in the CLI toolchain docs.

The “fedify init” command demo

Manual installation

Fedify is available on JSR for Deno and on npm for Bun and Node.js.

Deno

Deno is the primary runtime for Fedify. As a prerequisite, you need to have Deno 1.41.0 or later installed on your system. Then you can install Fedify via the following command:

sh
deno add jsr:@fedify/fedify

Since Fedify requires Temporal API, which is an unstable feature in Deno as of July 2024, you need to add the "temporal" to the "unstable" field of the deno.json file:

json
{
  "imports": {
    "@fedify/fedify": "jsr:@fedify/fedify"
  },
  "unstable": ["temporal"]
}

Bun

Fedify can also be used in Bun. You can install it via the following command:

sh
bun add @fedify/fedify

Node.js

Fedify can also be used in Node.js. As a prerequisite, you need to have Node.js 20.0.0 or later installed on your system. Then you can install Fedify via the following command:

sh
npm add @fedify/fedify

Fedify is an ESM-only package, so you need to add "type": "module" to the package.json file:

json
{
  "type": "module",
  "dependencies": {
    "@fedify/fedify": "^1.1.0"
  }
}