---
title: "Install evlog"
description: "Install evlog in your TypeScript project. Supports Nuxt, Next.js, SvelteKit, Hono, Express, Fastify, Elysia, NestJS, and standalone scripts."
canonical_url: "https://www.evlog.dev/start/installation"
---
# Install evlog

> Install evlog in your TypeScript project. Supports Nuxt, Next.js, SvelteKit, Hono, Express, Fastify, Elysia, NestJS, and standalone scripts.

evlog supports Nuxt, Next.js, SvelteKit, Nitro, NestJS, and any TypeScript server framework.

<prompt :actions="["copy","cursor","claude"]" description="Install evlog in my project" icon="i-lucide-download">

Add evlog ([https://www.evlog.dev](https://www.evlog.dev)) to this project.

1. Run `npx --yes evlog init --yes`. It detects the framework, installs evlog with this project's package manager, writes evlog.config.ts, wires the integration and adds the evlog rules to AGENTS.md. Do every manual step it prints, and fix what its final check flags.
2. If it reports the framework as unsupported, or you cannot run commands, install `evlog` and follow the framework's guide from [https://www.evlog.dev/llms.txt](https://www.evlog.dev/llms.txt). With no guide for it, use [https://www.evlog.dev/extend/custom-framework](https://www.evlog.dev/extend/custom-framework) for a server, or [https://www.evlog.dev/integrate/frameworks/standalone](https://www.evlog.dev/integrate/frameworks/standalone) for scripts and jobs.
3. In server code from now on: one wide event per request through the integration's logger and `log.set({ ... })`, `throw createError({ message, status, why, fix })` instead of `new Error()`, and no `console.log`.

</prompt>

## Install

<code-group>

```bash [pnpm]
pnpm add evlog
```

```bash [bun]
bun add evlog
```

```bash [yarn]
yarn add evlog
```

```bash [npm]
npm install evlog
```

</code-group>

### Using Agent Skills

If you use an AI assistant (Claude Code, Cursor, etc.), install the evlog skill for guided setup and code review:

```bash [Terminal]
npx skills add https://www.evlog.dev
```

Your AI assistant can then help you set up evlog, review your logging patterns, and migrate existing code to wide events. See [Agent Skills](https://www.evlog.dev/reference/agent-skills) for details.

<callout color="neutral" icon="i-lucide-radar">

**Try evlog map.** The `evlog` executable comes with the package. Early days, but one command scores which entry points are still dark:

```bash
npx evlog map
# or: pnpm evlog map
```

See [CLI overview](https://www.evlog.dev/cli/overview) and [`evlog map`](https://www.evlog.dev/cli/map).

</callout>

## Create the config

Run `npx evlog init`, or add `evlog.config.ts` at the root of your app by hand:

```typescript [evlog.config.ts]
import { defineEvlog } from 'evlog'

export default defineEvlog({
  service: 'my-app',
})
```

This one file holds every option: sampling, drains, enrichers, route filters. Your framework guide shows how it loads. See [Configuration](https://www.evlog.dev/reference/configuration).

## Wire it into your framework

Then follow the setup guide for your framework:

<card-group>
<card color="neutral" icon="i-simple-icons-nuxtdotjs" title="Nuxt" to="https://www.evlog.dev/integrate/frameworks/nuxt">

Module with auto-imported `useLogger` and `parseError`.

</card>

<card color="neutral" icon="i-simple-icons-nextdotjs" title="Next.js" to="https://www.evlog.dev/integrate/frameworks/nextjs">

`createEvlog()` factory with `withEvlog()` handler wrapper.

</card>

<card color="neutral" icon="i-simple-icons-svelte" title="SvelteKit" to="https://www.evlog.dev/integrate/frameworks/sveltekit">

Handle and handleError hooks with `event.locals.log`.

</card>

<card color="neutral" icon="i-custom-nitro" title="Nitro" to="https://www.evlog.dev/integrate/frameworks/nitro">

Module for Nitro v2 and v3 with plugin-based hooks.

</card>

<card color="neutral" icon="i-custom-tanstack" title="TanStack Start" to="https://www.evlog.dev/integrate/frameworks/tanstack-start">

Uses Nitro v3 module with async context.

</card>

<card color="neutral" icon="i-custom-reactrouter" title="React Router" to="https://www.evlog.dev/integrate/frameworks/react-router">

Middleware with `context.get(loggerContext)`.

</card>

<card color="neutral" icon="i-simple-icons-nestjs" title="NestJS" to="https://www.evlog.dev/integrate/frameworks/nestjs">

`EvlogModule.forRoot()` with global middleware.

</card>

<card color="neutral" icon="i-simple-icons-express" title="Express" to="https://www.evlog.dev/integrate/frameworks/express">

Middleware with `req.log`.

</card>

<card color="neutral" icon="i-simple-icons-hono" title="Hono" to="https://www.evlog.dev/integrate/frameworks/hono">

Middleware with `c.get('log')`.

</card>

<card color="neutral" icon="i-simple-icons-fastify" title="Fastify" to="https://www.evlog.dev/integrate/frameworks/fastify">

Plugin with `request.log`.

</card>

<card color="neutral" icon="i-custom-elysia" title="Elysia" to="https://www.evlog.dev/integrate/frameworks/elysia">

Plugin with `log` in route context.

</card>

<card color="neutral" icon="i-lucide-network" title="oRPC" to="https://www.evlog.dev/integrate/frameworks/orpc">

`withEvlog()` handler wrapper + `evlog()` procedure middleware.

</card>

<card color="neutral" icon="i-simple-icons-effect" title="Effect" to="https://www.evlog.dev/integrate/frameworks/effect">

Beta. `routerLayer` for `HttpRouter`, `yield* EvlogLogger` in handlers.

</card>

<card color="neutral" icon="i-simple-icons-cloudflare" title="Cloudflare Workers" to="https://www.evlog.dev/integrate/frameworks/cloudflare-workers">

Factory for request-scoped loggers.

</card>
</card-group>

<callout color="neutral" icon="i-lucide-arrow-right">

See the full [Framework Integrations](https://www.evlog.dev/integrate/frameworks/overview) page for a comparison table and all available integrations including [Standalone TypeScript](https://www.evlog.dev/integrate/frameworks/standalone), [Astro](https://www.evlog.dev/integrate/frameworks/astro), and [Custom Integration](https://www.evlog.dev/extend/custom-framework).

</callout>

## Type the fields you add

evlog ships with full TypeScript type definitions. No additional configuration is required.

<callout color="success" icon="i-lucide-check">

evlog requires TypeScript 5.0 or higher for optimal type inference.

</callout>

## Next Steps

- [Quick Start](https://www.evlog.dev/start/quick-start) - Learn the core concepts and start using evlog
- [Wide Events](https://www.evlog.dev/learn/wide-events) - Understand the wide event pattern
- [Adapters](https://www.evlog.dev/integrate/adapters/overview) - Send logs to Axiom, PostHog, Sentry, and more

---

- [Frameworks](https://www.evlog.dev/integrate/frameworks/overview)


## Sitemap

See the full [sitemap](https://www.evlog.dev/sitemap.md) for all pages.
