better-push
Operate in production

Run Studio locally

npx @better-push/cli studio - the studio against your own database, on localhost.

The fastest way to look at your notification data is the CLI studio. It needs no code change and no mounted route: point it at a database and it serves the same SPA the mounted studio does.

npx @better-push/cli studio
  better-push studio

  http://127.0.0.1:4983
  bound to localhost only - there is no authentication here
  read-only - pass --allow-writes to enable operator actions

Options

FlagDefaultMeaning
--database-url <url>-Postgres connection string
--cwd <dir>current directorywhere to look for .env files
--port <port>4983port to listen on
--allow-writesoffenable the operator actions

Where the connection comes from

Resolved in this order, so the common case needs no flag at all:

  1. --database-url
  2. DATABASE_URL in the environment
  3. DATABASE_URL in .env.local, then .env, in --cwd

If none of those has one, it says so and names all three rather than failing on a connection attempt.

It binds to localhost, and that is not configurable

There is no authentication in the CLI studio - it is a developer tool against a database you already have full access to. That is exactly why it binds to 127.0.0.1 only and why the bind address cannot be changed. Do not put it behind a tunnel or a reverse proxy; if you want a studio other people can reach, mount it in your app where your own auth protects it.

Read-only by default

Without --allow-writes the operator actions are refused by the server, not just hidden in the UI - retry, purge, disable, delete, reset preferences, and send test all answer 403.

With --allow-writes they are enabled, and the audit trail records the actor as cli:<your-os-username> so a local action is still attributable:

npx @better-push/cli studio --allow-writes

Content is always visible in the CLI studio - masking it would be theatre when the same person can open psql - but reveals are still audited, so the trail is complete wherever it was read from.

Pointing it at production

You can, with the usual care: it is a read-only console by default, and every query is time-bounded and capped. Prefer a read replica if you have one, and do not pass --allow-writes unless you mean it.

DATABASE_URL="postgres://…" npx @better-push/cli studio

For a studio your team can reach without handing out database credentials, mount it in the app instead.

On this page