Changelog

New features, improvements, and fixes shipped to InsForge.

PostHog Analytics Integration

InsForge now connects to PostHog in one OAuth click. From Analytics in the dashboard, click Connect PostHog — we provision a PostHog project for you, store the credentials encrypted, and the page fills with live data.

What ships on day one:

  • Web Analytics KPIs — visitors, page views, sessions, and bounce rate, each with a trend line and percent change vs. the previous window
  • Breakdowns — top pages, countries, and device types
  • Retention — weekly retention cohort, computed against $pageview events
  • Session replays — the most recent recordings, openable in a modal without leaving InsForge
  • API key card — copy the phc_ project key and host for anything the dashboard doesn't cover

A time-range selector at the top of the page controls every card in one place.

Setup for Agents

After connecting, the Analytics page shows a copyable prompt for Claude Code, Cursor, or any coding agent that runs the InsForge skill — the skill directs the agent to the official PostHog wizard, which detects your framework, installs the right SDK, and wires the provider with your project key. Or run it directly:

bash
npx @insforge/cli posthog setup

Blog post

Config as Code

Your project's auth and deployment settings can now live in a single, version-controlled insforge.toml instead of the dashboard. The CLI gives you a Terraform-style loop over it:

bash
npx @insforge/cli config plan     # diff insforge.toml against the live project
npx @insforge/cli config apply    # push the diff (with confirmation)
npx @insforge/cli config export   # pull live config into a fresh insforge.toml

Already configured a project through the dashboard? Run config export once to generate the file, commit it, and you're set.

What the File Covers

toml
[auth]
require_email_verification = true
allowed_redirect_urls = ["https://app.example.com/auth/callback"]

[auth.password]
min_length = 12
require_uppercase = true

[auth.smtp]
host = "smtp.sendgrid.net"
port = 587
password = "env(SENDGRID_API_KEY)"

[deployments]
subdomain = "acme-prod"
  • [auth] — allowed redirect URLs, email verification mode, password-reset method
  • [auth.password] — length and character-class policy
  • [auth.smtp] — full SMTP sender configuration
  • [deployments] — your project subdomain

Fine-Grained Control for Agents

This hands your coding agent fine-grained control over the backend. The agent reads insforge.toml to know the exact intended state, edits any field, previews the change with config plan, and pushes it with config apply — then commits the diff. Every auth, password, SMTP, and deployment setting becomes a reviewable line in a file the agent can version and roll back, instead of an opaque dashboard click or a one-shot API call.

Docs

OpenRouter Model Gateway

Model Gateway now gives developers the active OpenRouter API key directly, so AI features can be built against OpenRouter's OpenAI-compatible API instead of going through InsForge's old AI proxy.

Open Model Gateway > Overview to copy the active key, or run the CLI setup command from a linked project to write it into your local server-side env file:

bash
npx @insforge/cli ai setup

The command writes OPENROUTER_API_KEY to .env.local by default. Use --env-file <path> if your app keeps server-side env vars somewhere else.

Then use the OpenAI SDK with OpenRouter's base URL:

ts
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://openrouter.ai/api/v1",
  apiKey: process.env.OPENROUTER_API_KEY,
});

const completion = await openai.chat.completions.create({
  model: "openai/gpt-5.5",
  messages: [{ role: "user", content: "Build something useful." }],
});

The new Quick Start page includes copyable examples for text, image, and video generation, while the Models page exposes the live OpenRouter catalog with provider, modality, release, and pricing filters.

Model Gateway dashboard showing the active OpenRouter key, quick-start code, and usage overview

What Changed

We removed the old InsForge-managed AI configuration and usage tables, and the dashboard no longer asks you to create per-model AI configs before building. In cloud projects, InsForge provisions the OpenRouter key for you and the CLI can pull it into local development. In self-hosted projects, set OPENROUTER_API_KEY on the backend environment.

The dashboard Overview now shows key-level spend, requests, and token activity when OpenRouter activity data is available.

Deprecation Notice

The old InsForge AI feature proxy is deprecated. Existing proxy endpoints such as /api/ai/chat/completion, /api/ai/image/generation, and /api/ai/embeddings are compatibility surfaces for older apps; new AI integrations should use OpenRouter directly with the provided key and follow the official OpenRouter docs for advanced capabilities, model-specific options, and newly released models.

Backend Branching

Every project can now spawn an isolated branch — its own EC2, its own Postgres, its own auth / storage / functions / realtime / schedules state — to test schema migrations, auth tweaks, or edge function rewrites without touching production. Pick full (schema + data) or schema-only at create time, and the branch starts at parity with the parent at T0.

Branching is available for projects on InsForge OSS 2.1.0+.

Merge with Diff Preview

branch merge computes a three-way diff (parent at T0 / parent now / branch now) and renders the apply plan as one migration-style SQL preview, organized into [DDL] / [DATA] / [MIGRATION] sections. Use --dry-run to inspect, or --save-sql <path> to keep the preview as a file. If parent and branch both edited the same table / policy / function / config row since T0, the merge is blocked with a conflict report instead of silently overwriting — leading with a -- ⚠️ MERGE BLOCKED banner so it's impossible to miss.

Mergeable platform config (auth providers, storage buckets, edge function definitions, schedules, …) is upserted by stable key. User-data row inserts on a branch are not auto-merged.

Branch Reset

insforge branch reset <name> rolls a branch's database back to its T0 snapshot — including dropping any tables, views, functions or schemas that were added on the branch. Reset works from ready and from merged, runs in place against the existing EC2, and lands the branch back at ready for a fresh attempt.

CLI Surface

text
insforge branch create <name> [--mode full|schema-only]
insforge branch list
insforge branch switch <name> [--parent]
insforge branch merge <name> [--dry-run] [--save-sql <path>]
insforge branch reset <name>
insforge branch delete <name>

Blog post