Skip to main content
When something breaks, an agent should not have to guess. npx @insforge/cli diagnose turns the backend’s own signals into something an agent can fetch and act on directly: advisor findings with remediations, database health checks, instance metrics, and aggregated error logs. Each finding comes with a fix, so “what is wrong” and “what to do about it” arrive together. The agent pulls all of this itself, with no dashboard in the loop, which is what lets it close security gaps like a permissive RLS policy before they leak data.
Backend Advisor finding: a permissive RLS policy on public.messages with a Copy Remediation button

A Backend Advisor finding: the problem, the affected table, and a remediation the agent can copy and apply.

Full health report

Run diagnose with no subcommand for everything at once:
The report bundles the advisor scan, database health, instance metrics, and recent error logs into one output. In --json mode the agent gets it all as structured data.

Backend Advisor

The advisor scans for security, performance, and health issues and writes a remediation for each one. The dashboard shows the findings with a “Copy Remediation” button, but the agent does not need the dashboard: it fetches the same scan directly with --json and applies the fix itself, so a security issue gets closed without waiting for a human to notice it.
A typical finding is a permissive RLS policy that exposes a table to anonymous users. The advisor names the table, the severity, and the SQL to fix it. The agent reads the finding, applies the remediation as a migration, and re-scans to confirm it cleared.

Targeted checks

Each part of the report is also available on its own: For raw logs from a single source, use the top-level command:
Sources include insforge.logs, postgREST.logs, postgres.logs, function.logs, and function-deploy.logs.

Let the agent interpret it

diagnose --ai hands the collected diagnostic data to a model and returns a plain-language analysis:
This is the difference between dumping a stack trace and explaining the fix. The agent asks a question about the live backend and gets an answer grounded in the actual signals.

Next steps

  • Apply advisor remediations as migrations so the fix is versioned.
  • Rehearse a risky fix on a backend branch before it touches production.
  • Read the CLI harness for the rest of the command surface.