Quickstart
Prerequisites
Section titled “Prerequisites”- Node.js 20+
- pnpm
- A Slack app with signing secret + bot token
- Redis URL
- A Vercel account
Create a new app
Section titled “Create a new app”Start with the initializer. This is the default path for a new project.
npx @sentry/junior init my-botcd my-botpnpm installjunior init already creates the core runtime wiring for you:
server.tsnitro.config.tsandvite.config.tsvercel.jsonapp/SOUL.md,app/WORLD.md, andapp/DESCRIPTION.mdapp/skills/andapp/plugins/.env.example
SOUL.md defines Junior’s voice, WORLD.md carries operational context, and DESCRIPTION.md is the app description shown on user-facing surfaces. If you need extra context files, add more app/*.md documents and Junior will make them available as optional reference docs at runtime. Do not recreate the old ABOUT.md; use WORLD.md and DESCRIPTION.md instead.
For a new app, you usually do not need to hand-create routes or runtime wrapper files.
Configure environment
Section titled “Configure environment”Copy values into your local env file. The scaffold includes .env.example with the core runtime variables.
Required:
SLACK_SIGNING_SECRETSLACK_BOT_TOKENREDIS_URL
Recommended:
JUNIOR_BOT_NAMEAI_MODELAI_FAST_MODELAI_VISION_MODEL
See Config & Environment for the full reference.
Run locally
Section titled “Run locally”pnpm devThis starts the local app on http://localhost:3000 by default.
Verify locally
Section titled “Verify locally”Check the health route first, then verify a real Slack thread.
GET http://localhost:3000/healthreturns JSON withstatus: "ok".- Set your Slack Event Subscriptions and Interactivity URLs to
http://<your-tunnel-or-dev-host>/api/webhooks/slack. - Mention the bot in Slack and confirm it replies in the same thread.
Add plugins
Section titled “Add plugins”The initializer creates local app/plugins and app/skills directories, so you can start there without extra runtime config.
If you want to use npm-distributed plugins, install them explicitly:
pnpm add @sentry/junior-datadog @sentry/junior-github @sentry/junior-linear @sentry/junior-notion @sentry/junior-sentryList the plugin packages in juniorNitro so they are bundled and available at runtime:
import { defineConfig } from "nitro";import { juniorNitro } from "@sentry/junior/nitro";
export default defineConfig({ preset: "vercel", modules: [ juniorNitro({ pluginPackages: [ "@sentry/junior-datadog", "@sentry/junior-github", "@sentry/junior-linear", "@sentry/junior-notion", "@sentry/junior-sentry", ], }), ], routes: { "/**": { handler: "./server.ts" }, },});See Plugins for the local-vs-package model.
What junior init created
Section titled “What junior init created”If you need to wire Junior into an existing app, this is what junior init creates.
Server entry point
Section titled “Server entry point”import { initSentry } from "@sentry/junior/instrumentation";initSentry();
import { createApp } from "@sentry/junior";
const app = await createApp();
export default app;Vercel config
Section titled “Vercel config”junior init generates a nitro.config.ts that uses Nitro’s Vercel preset to build and deploy the app. The juniorNitro() module copies app/**/* and any declared pluginPackages content into the Vercel function bundle at build time.
Deploy to Vercel
Section titled “Deploy to Vercel”junior init does not configure your Vercel project. You still need to add the deploy-specific pieces below.
Link the project
Section titled “Link the project”pnpm dlx vercel@latest loginpnpm dlx vercel@latest linkConfigure build command
Section titled “Configure build command”The scaffold includes a build script that runs snapshot warmup:
{ "scripts": { "dev": "vite dev", "build": "junior snapshot create && vite build" }}Configure production environment
Section titled “Configure production environment”Required:
SLACK_SIGNING_SECRETSLACK_BOT_TOKEN(orSLACK_BOT_USER_TOKEN)REDIS_URL
Also required for build-time snapshot warmup:
- Vercel OIDC enabled so
VERCEL_OIDC_TOKENis available during build
Recommended:
JUNIOR_BOT_NAMEAI_MODELAI_FAST_MODELAI_VISION_MODELAI_WEB_SEARCH_MODEL
Optional:
JUNIOR_BASE_URLAI_GATEWAY_API_KEY
Configure Slack request URL
Section titled “Configure Slack request URL”Set Event Subscriptions and Interactivity URLs to:
https://<your-domain>/api/webhooks/slackVerify in production
Section titled “Verify in production”GET https://<your-domain>/healthsucceeds.- A Slack mention produces a thread reply.
- Queue callback logs show successful processing.
Common failures
Section titled “Common failures”401or signature failures: verifySLACK_SIGNING_SECRET.- No thread processing: confirm the API handler and queue trigger are configured.
- No bot post: verify bot token scopes and Slack app installation.
- Slack timeouts in production: check Vercel config
maxDurationand function deployment. - OAuth callback issues for plugins: set
JUNIOR_BASE_URLto production URL. - Snapshot warmup build failures: verify
REDIS_URLis available to builds and OIDC is enabled forVERCEL_OIDC_TOKEN.
Next step
Section titled “Next step”Now that the scaffold is running, move to Plugins to add packaged or local extensions, then use Verify & Troubleshoot for post-deploy checks.