Pulse isn’t in the stores yet. This documentation describes the app as it will ship. Notify me at launch ›

npx @pulse-si/init

One command links a NestJS or Next.js project to Pulse. It installs the package, writes the key, and wires up startup.

NestJS and Next.js, Node 18.17 or later. Laravel, Symfony, Python and Go are installed by hand.

Run the command#

Run it at the project root, with the key the Pulse app shows you.

zsh
$ npx @pulse-si/init pk_live_…NestJS project detected (pnpm).Choose what your app sends to Pulse. The heartbeat is always sent.Found in package.json: Prisma, Redis (ioredis), BullMQ, scheduled jobs.  Dependency health (database, Redis, queues)? [Y/n]  Scheduled jobs? [Y/n]  App logs (Pro and Team)? [Y/n]  Versions (app, framework, deployment)? [Y/n] n  Checks or jobs to skip (comma-separated names, * allowed, empty for none): File emails  Minimum log level (DEBUG, INFO, WARN, ERROR) [DEBUG]: INFOSecure mode (Pro and Team): everything is sent encrypted, Pulse can’t read any of it.  Public key pulse_pub_… shown in the app (empty to skip):✓ @pulse-si/nest installed✓ Key added in .env✓ Settings written: PULSE_SEND, PULSE_EXCLUDE, PULSE_LOG_LEVEL✓ PulseModule wired in src/app.module.ts.env stays on this computer. Where the app runs (Vercel, Docker, your server), add:  PULSE_KEY=pk_live_…  PULSE_SEND=checks,crons,logs  PULSE_EXCLUDE=File emails  PULSE_LOG_LEVEL=INFORestart your app: the first signal shows up in Pulse.

The questions cover, in order: dependency state, scheduled jobs, logs, versions, names to ignore, the minimum log level, and the secure mode public key. Return keeps the suggested answer. The environment file doesn’t ship with your code: copy the lines shown at the end to wherever the app runs in production. Then restart the app. The first report goes out 2 seconds after startup.

What it touches#

FileChange
package.jsonAdds @pulse-si/nest or @pulse-si/next with your package manager. The rest of the file keeps its formatting.
.env (NestJS), .env.local (Next.js)Adds PULSE_KEY and any settings that differ from the defaults. An existing line is replaced, never duplicated. The file becomes readable only by you (600).
.gitignoreAdds the environment file, if it isn’t already ignored.
src/app.module.ts or src/app/app.module.tsNestJS: adds PulseModule.forRoot() to imports, plus its import line.
instrumentation.ts or .jsNext.js: created if missing, in src/ if the project has src/app or src/pages.

The command never calls Pulse, so the key is written only to your project. The only network access is the install by your package manager. Running the command again with a new key is safe.

How it recognizes the project

  • The framework comes from package.json: @nestjs/core for NestJS, otherwise next for Next.js.
  • The package manager comes from the lockfile: pnpm-lock.yaml, yarn.lock, bun.lockb or bun.lock, package-lock.json. With none of them, it’s npm.
  • A tsconfig.json gives you instrumentation.ts, otherwise instrumentation.js.
  • Run from the root of a monorepo, it lists the NestJS and Next.js projects found up to two levels down and gives the command with --dir.

Run without questions#

Use these options for a script or CI. --yes keeps the default settings, and any of the data options below also skips the questions. --dir, --endpoint and --fingerprint leave them on. Without an interactive terminal, no questions are asked.

zsh
npx @pulse-si/init pk_live_… --yesnpx @pulse-si/init pk_live_… --send checks,crons --exclude "File *" --log-level WARNnpx @pulse-si/init pk_live_… --dir apps/helio-api --no-install
OptionPurposeWritten to the file
--dir <path>Project folder, if it isn’t the current folderNothing
--no-installDoesn’t install the packageNothing
--yesNo questions, default settingsNothing
--send <list>Data to send: checks, crons, logs, versions, or nonePULSE_SEND
--include <list>Only these checks and jobs, * allowedPULSE_INCLUDE
--exclude <list>Checks and jobs to ignore, * allowedPULSE_EXCLUDE
--log-level <level>DEBUG, INFO, WARN, ERROR or FATALPULSE_LOG_LEVEL
--public-key <key>Secure mode public keyPULSE_PUBLIC_KEY
--clear <list>In secure mode, what stays in the clear: status, checks, crons, versions or nonePULSE_CLEAR
--endpoint <address>Your Pulse Relay, as https://PULSE_ENDPOINT
--fingerprint <value>Certificate fingerprint of a relay without a domainPULSE_RELAY_FINGERPRINT

A wrong setting stops everything before anything is written. Default values aren’t written, which keeps the file readable.

If it stops or asks you for something#

MessageWhat to do
Clé invalideInvalid key: copy the whole key, pk_live_… or pk_test_….
Aucun projet NestJS ou Next.js iciNo project found: run the command at the project root, or pass --dir (in a monorepo, the command suggests the folders it found). For another framework, install by hand.
Installation impossibleInstall failed: run the command it shows, then run npx @pulse-si/init again. Nothing was written.
À faire à la main dans …NestJS module not found, or instrumentation already exists: the command prints the lines to add and leaves your file alone.
Attention : sans @nestjs/configLoad .env yourself, for example node --env-file=.env, so PULSE_KEY gets read.
Next.js 14 : active experimental.instrumentationHookSet this option to true in next.config.
  • NestJS

    What the module finds, and how to tune it.

  • Next.js

    Passing your clients to startPulse.

  • All variables

    What the environment file can contain.

Still missing an answer? Contact support