Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: setup cursor background agent (#7251)

Marc Klingendd203a1f185b
diff --git a/.cursor/Dockerfile b/.cursor/Dockerfile
new file mode 100644
index 0000000000..ab17a75c21
--- /dev/null
+++ b/.cursor/Dockerfile
@@ -0,0 +1,47 @@
+FROM node:20
+
+# ---------- System packages --------------------------------------------------
+# The buildpack-deps base already ships git, build-essential, python, etc.
+# Add a few extra tools handy during Langfuse development.
+RUN apt-get update && \
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
+ openssl \
+ wget \
+ curl \
+ ca-certificates \
+ postgresql-client \
+ redis-tools \
+ less nano \
+ && rm -rf /var/lib/apt/lists/*
+
+# ---------- pnpm -------------------------------------------------------------
+# Langfuse monorepo relies on pnpm 9.5.0 (see CONTRIBUTING.md)
+ENV PNPM_HOME="/pnpm"
+ENV PATH="$PNPM_HOME:$PATH"
+RUN corepack enable && \
+ corepack prepare [email protected] --activate
+
+# ---------- golang-migrate ----------------------------------------------------
+# CLI used for database migrations during development.
+ENV MIGRATE_VERSION=4.18.2
+RUN wget -qO- "https://github.com/golang-migrate/migrate/releases/download/v${MIGRATE_VERSION}/migrate.linux-amd64.tar.gz" \
+ | tar -xz -C /usr/local/bin && \
+ chmod +x /usr/local/bin/migrate
+
+# ---------- Non-root user -----------------------------------------------------
+# Use root for convenience in development containers
+WORKDIR /workspace
+
+# Create non-root user
+RUN useradd -ms /bin/bash ubuntu
+
+# Pre-create pnpm store and set correct ownership to avoid first-run cost & permission issues
+RUN pnpm store path > /dev/null && \
+ chown -R ubuntu:ubuntu /pnpm
+
+USER ubuntu
+WORKDIR /home/ubuntu
+ENV HOME=/home/ubuntu
+
+# Container starts with a bash shell ready for hacking.
+CMD ["bash"]
diff --git a/.cursor/environment.json b/.cursor/environment.json
new file mode 100644
index 0000000000..3e08b61fa8
--- /dev/null
+++ b/.cursor/environment.json
@@ -0,0 +1,8 @@
+{
+ "install": "cp .env.dev.example .env && pnpm i",
+ "build": {
+ "context": ".",
+ "dockerfile": "Dockerfile"
+ },
+ "start": "pnpm dx-f"
+}
diff --git a/.cursor/rules/general-info.mdc b/.cursor/rules/general-info.mdc
new file mode 100644
index 0000000000..5cc978e808
--- /dev/null
+++ b/.cursor/rules/general-info.mdc
@@ -0,0 +1,8 @@
+---
+description:
+globs:
+alwaysApply: true
+---
+# General rules
+
+- Linting in this repo only works if the development server is running
\ No newline at end of file