Installation
Every Slingshot app starts here:
bun add @lastshotlabs/slingshot hono zodInstalls defineApp(), createServer(), createApp(), the CLI, route discovery, OpenAPI helpers, and the entity/operations authoring tools.
Feature packages
Section titled “Feature packages”Install only what your app needs:
bun add @lastshotlabs/slingshot-auth # accounts, sessions, JWT, MFA, OAuth, passkeysbun add @lastshotlabs/slingshot-community # forums, threads, replies, reactions, moderationbun add @lastshotlabs/slingshot-permissions # RBAC/ABAC — required when using community or orgsbun add @lastshotlabs/slingshot-organizations # teams, membership, invite flowsbun add @lastshotlabs/slingshot-search # full-text search across entitiesbun add @lastshotlabs/slingshot-mail # transactional emailbun add @lastshotlabs/slingshot-push # push notificationsbun add @lastshotlabs/slingshot-webhooks # outbound webhook deliverybun add @lastshotlabs/slingshot-admin # admin panel surfacebun add @lastshotlabs/slingshot-m2m # machine-to-machine tokensbun add @lastshotlabs/slingshot-scim # SCIM provisioning for enterprise SSOBuilding your own domain packages
Section titled “Building your own domain packages”If you’re building config-driven domain packages with defineEntity() and createEntityPlugin():
bun add @lastshotlabs/slingshot-entityRuntime
Section titled “Runtime”Slingshot runs on Bun or Node.js. On Bun, the runtime is auto-detected — no extra install needed. For Node.js, install the Node runtime package and its dependencies:
# Node.js only — Bun users can skip thisbun add @lastshotlabs/slingshot-runtime-nodebun add better-sqlite3 argon2 @hono/node-server ws fast-glob// Node.js only — pass the runtime explicitlyimport { defineApp } from '@lastshotlabs/slingshot';import { nodeRuntime } from '@lastshotlabs/slingshot-runtime-node';
export default defineApp({ runtime: nodeRuntime(), port: 3000 });On Bun, omit runtime entirely — @lastshotlabs/slingshot-runtime-bun is auto-detected.
Database drivers
Section titled “Database drivers”Slingshot adapters are peer dependencies — install the driver for the databases you use:
# MongoDBbun add mongoose
# Redis (for sessions, cache, queues)bun add ioredis
# PostgreSQLbun add @lastshotlabs/slingshot-postgresSQLite is handled by the runtime package — bun:sqlite on Bun, better-sqlite3 on Node.
Optional auth features
Section titled “Optional auth features”These are peer dependencies — install only when the feature is enabled in your config:
# OAuth social loginbun add @lastshotlabs/slingshot-oauth arctic
# TOTP / time-based MFAbun add otpauth
# WebAuthn passkeysbun add @simplewebauthn/server
# File uploads to S3 / R2 / GCSbun add @aws-sdk/client-s3 @aws-sdk/s3-request-presigner @aws-sdk/lib-storage
# Durable queues (BullMQ event bus)bun add bullmqSearch providers
Section titled “Search providers”# Meilisearchbun add meilisearch
# Typesensebun add typesense
# Elasticsearchbun add @elastic/elasticsearch
# Algoliabun add algoliasearchEmail providers
Section titled “Email providers”# Resendbun add resend
# Postmarkbun add postmark
# SendGridbun add @sendgrid/mail
# Nodemailer (SMTP)bun add nodemailer@lastshotlabs/slingshot ships the slingshot CLI. After installing:
# Start the server — discovers app.config.ts in the current directoryslingshot start
# Run database migrations (Prisma-style flow)slingshot migrate generate --name init # write a new migration from entity diffsslingshot migrate apply # apply pending migrations to the DBslingshot migrate status # show applied vs pendingslingshot migrate dev --name init # generate + apply, the inner-loop shortcut
# Generate entity source files (types, adapters) without applying SQLslingshot generate --config ./app.config.ts --outdir ./src/generatedPrerequisites
Section titled “Prerequisites”- Bun v1.2 or later — recommended. Use Bun as your package manager and runtime.
- Node.js 20+ — only if using the Node.js runtime adapter (
@lastshotlabs/slingshot-runtime-node).
All examples in these docs use Bun. The only difference on Node.js is passing runtime: nodeRuntime() to defineApp.