Skip to Content
Senri

Installation

Create a new app with npm create senri, or add Senri to an existing project

Create a new app

npm create senri@latest my-app

You are asked for the runtime (Bun, Node.js, Deno or Cloudflare Workers). When it finishes, it prints the commands to run the app.

cd my-app
npm install
npm run dev   # → http://localhost:3927

Pass both the folder name and --template to create the app without any questions.

npm create senri@latest my-app -- --template bun
--templateRuntimeStartURL
bunBunbun install → bun run devhttp://localhost:3927
nodeNode.jsnpm install → npm run devhttp://localhost:3927
denoDenodeno task devhttp://localhost:3927
workersCloudflare Workersnpm install → npm run devhttp://localhost:8787

When started with dev, the app restarts when you edit a file.

What you get

The Bun template (--template bun) creates these files.

index.ts
.gitignore
package.json
README.md
tsconfig.json
src/index.ts
import {  } from "@senrijs/senri";
import {  } from "@senrijs/senri/dev";
import {  } from "@senrijs/senri/serve";

const  = ({ : () });

.("/", () => "Hello, Senri!");
.("/users/:id", ({  }) => ({  }));

();
  • The Node.js template has the same layout
  • The Deno template has deno.json instead of package.json, and its entry is src/main.ts
  • The Cloudflare Workers template writes export default app instead of serve(app), and has wrangler.jsonc

Add Senri to an existing project

npm i @senrijs/senri

On Deno, install it from JSR (deno add jsr:@senrijs/senri in the "deno" tab).

Supported versions

  • Node.js: 22 or later. The Node.js template runs TypeScript as is, so it needs 22.18 or later
  • Bun and Deno: tested in CI with the latest versions at the time
  • Cloudflare Workers: the template's compatibility_date is 2026-10-01

On this page