:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
#!/usr/bin/env bash
set -euo pipefail
REPO_ROOT="$(dirname "$0")/.."
TEAM_ID="${1:-1}"
if ! command -v stripe &> /dev/null; then
echo "Error: Stripe CLI is not installed."
echo "Install it with: brew install stripe/stripe-cli/stripe"
echo "Install the apps plugin: stripe plugin install apps"
exit 1
fi
# Generate (or reuse) PostHog OAuth tokens for the Stripe App.
echo "Generating PostHog OAuth tokens for team ${TEAM_ID}..."
python "$REPO_ROOT/manage.py" generate_stripe_app_tokens --team-id="$TEAM_ID"
cd "$REPO_ROOT/services/stripe-app"
pnpm install --frozen-lockfile
exec pnpm run dev