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:
npm install -g @fedify/clibrew install fedifyscoop install fedifybun install -g @fedify/clideno install -gA --unstable-fs --unstable-kv --unstable-temporal -n fedify jsr:@fedify/cliThere 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:
fedify init your-project-dirThe 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.
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 2.0.0 or later installed on your system. Then you can install Fedify via the following command:
deno add jsr:@fedify/fedifySince Fedify requires Temporal API, which is an unstable feature in Deno as of November 2024, you need to add the "temporal" to the "unstable" field of the deno.json file:
{
"imports": {
"@fedify/fedify": "jsr:@fedify/fedify"
},
"unstable": ["temporal"]
}Bun
Fedify can also be used in Bun. You can install it via the following command:
bun add @fedify/fedifyNode.js
Fedify can also be used in Node.js. As a prerequisite, you need to have Node.js 22.0.0 or later installed on your system. Then you can install Fedify via the following command:
npm add @fedify/fedifypnpm add @fedify/fedifyyarn add @fedify/fedifyWe recommend using ESM with Fedify by adding "type": "module" to the package.json file. While Fedify also supports CommonJS for legacy compatibility, ESM is the preferred approach:
{
"type": "module",
"dependencies": {
"@fedify/fedify": "^1.8.1"
}
}