Skip to main content
0 reactions

How to Check Your Better Auth Setup with npx auth info

A Terminal window showing the first part of npx auth@latest info: system information, Node.js v26.13.1, npm 12.2.3, the frameworks next 16.4.6 and react 19.3.1, the database client pg 8.23.1, and Better Auth version 1.7.25.
The first part of the report from npx auth@latest info.

When something in Better Auth doesn’t work, the first question is usually: which versions are you running, and what does your setup look like? Better Auth’s command-line tool answers both with one command, npx auth info. This guide runs it in a Next.js project and explains what each part of the report means.

The short answer: run npx auth@latest info in your project folder. It prints your system, Node.js, package manager, frameworks, database client, Better Auth version and settings, with secrets replaced by [REDACTED].

Syntax

Bash
npx auth@latest info [options]
  • npx auth@latest runs Better Auth’s command-line tool, the auth package, at its newest version.
  • info prints the report.
  • --config <path> points to your settings file, if the tool doesn’t find auth.ts by itself.
  • -j or --json prints the same report as JSON, for sharing or for scripts.
  • -c or --copy copies the report to the clipboard.
  • --cwd <folder> runs it for a project in another folder.

The reference: Info (opens in a new tab) in the Better Auth CLI documentation, and the tool’s own help, npx auth@latest info --help.

Prerequisites

Step 1: Run npx auth info

Open Terminal (PowerShell on Windows) in your project folder, and run:

Bash
npx auth@latest info

On the Next.js project from Part 2, it printed:

Plain text
npm notice run bookshop@0.1.0 npx
npm notice run 'auth' info

📊 Better Auth System Information

==================================================

🖥  System Information:
  platform: darwin
  arch: arm64
  version: Darwin Kernel Version 25.6.0: Fri Oct 30 17:30:20 PDT 2026; root:xnu-12377.161.15.702.13~1/RELEASE_ARM64_T6000
  release: 25.6.0
  cpuCount: 10
  cpuModel: Apple M1 Pro
  totalMemory: 16.00 GB
  freeMemory: 0.13 GB

📦 Node.js:
  version: v26.13.1
  env: development

📦 Package Manager:
  name: npm
  version: 12.2.3

🚀 Frameworks:
  name: next
  version: 16.4.6
  name: react
  version: 19.3.1

💾 Database Clients:
  name: pg
  version: 8.23.1

🔐 Better Auth:
  Version: 1.7.25
  Configuration:
    database:
      _events:
        {}
      _eventsCount: 0
      options:
        connectionString: [REDACTED]
        max: 10
        min: 0
        maxUses: N/A
        allowExitOnIdle: false
        maxLifetimeSeconds: 0
        idleTimeoutMillis: 10000
      _clients: []
      _idle: []
      _expired:
        {}
      _pendingQueue: []
      ending: false
      ended: false

==================================================

💡 Tip: Use --json flag for JSON output
💡 Use --copy flag to copy output to clipboard
💡 When reporting issues, include this information
A Terminal window showing the first part of npx auth@latest info: system information, Node.js v26.13.1, npm 12.2.3, the frameworks next 16.4.6 and react 19.3.1, the database client pg 8.23.1, and Better Auth version 1.7.25.
The first part of the report from npx auth@latest info.

Step 2: Read the Report

  • System Information: your operating system, processor and memory.
  • Node.js and Package Manager: the versions that ran the command. Better Auth’s command-line tool needs Node.js 22.12 or later.
  • Frameworks: the frameworks it found in your project, here Next.js and React.
  • Database Clients: the database packages it found, here pg for PostgreSQL.
  • Better Auth: the installed version, then your settings from auth.ts. With a pg Pool, the settings show the pool’s own fields, such as max: 10 connections.

The database address appears as [REDACTED]: the tool hides secrets, API keys and database addresses, so the report is safe to share when you ask for help.

Common Mistakes

MistakeWhat happensDo this instead
Running it outside the project folderIt can’t find your settings or your packagesRun it in the folder with package.json, or use --cwd
Sharing the report without reading itIt includes your machine’s detailsRead it first; the tool hides secrets, not everything

Troubleshooting

ProblemCauseFix
npx asks Ok to proceed? (y)It’s the first time you run the toolType y and press Return
A MODULE_TYPELESS_PACKAGE_JSON warning comes firstpackage.json has no "type" fieldAdd "type": "module" (the fix)

FAQ

Why does it show my settings?

Settings explain most problems. Values such as secrets and database addresses are replaced with [REDACTED].

How do I share it as a file?

Add --json to get the report as JSON, which is easy to attach to a question.

Conclusion

npx auth@latest info gives you, in one command, every version and setting that matters for Better Auth, with secrets hidden. Run it first whenever something doesn’t work.

Additional Resources

Better Auth, Next.js and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by Better Auth, Inc. or Vercel.

0 comments