[PR #6362] [MERGED] feat(cli): better-auth-command #23517

Closed
opened 2026-04-15 21:47:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6362
Author: @Ridhim-RR
Created: 11/27/2025
Status: Merged
Merged: 11/28/2025
Merged by: @Bekacru

Base: canaryHead: feat/cli-better-auth-command


📝 Commits (3)

  • 6613989 feat(cli): better-auth-command
  • ed955be fix: cli path issue resolved
  • 46b1ab2 chore(type): typecheck issue resolved

📊 Changes

2 files changed (+9 additions, -2 deletions)

View changed files

📝 packages/cli/package.json (+3 -1)
📝 packages/cli/test/utils.ts (+6 -1)

📄 Description

Fix: Change CLI binary name from "cli" to "better-auth"

Problem

When @better-auth/cli is installed as a dev dependency, it creates a generic cli command in node_modules/.bin/cli,

Solution

Change the bin field in package.json from a string to an object with a named key:

// Before
"bin": "./dist/index.mjs"

// After  
"bin": {
  "better-auth": "./dist/index.mjs"
}

Changes Made

File: packages/cli/package.json


Summary by cubic

Renamed the CLI binary to better-auth to avoid conflicts with generic cli commands. package.json maps better-auth to ./dist/index.mjs, and tests now handle both string and object bin formats to resolve the CLI path.

Written for commit 46b1ab2c96. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6362 **Author:** [@Ridhim-RR](https://github.com/Ridhim-RR) **Created:** 11/27/2025 **Status:** ✅ Merged **Merged:** 11/28/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `feat/cli-better-auth-command` --- ### 📝 Commits (3) - [`6613989`](https://github.com/better-auth/better-auth/commit/6613989bbde5d28f43cbf0396eb2049023244327) feat(cli): better-auth-command - [`ed955be`](https://github.com/better-auth/better-auth/commit/ed955be1e4cb89f1cd3d04d3d943ec1aae4ced34) fix: cli path issue resolved - [`46b1ab2`](https://github.com/better-auth/better-auth/commit/46b1ab2c96e3207deb87c4e58e5f84b258aaac71) chore(type): typecheck issue resolved ### 📊 Changes **2 files changed** (+9 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/cli/package.json` (+3 -1) 📝 `packages/cli/test/utils.ts` (+6 -1) </details> ### 📄 Description # Fix: Change CLI binary name from "cli" to "better-auth" ## Problem When `@better-auth/cli` is installed as a dev dependency, it creates a generic `cli` command in `node_modules/.bin/cli`, ## Solution Change the `bin` field in `package.json` from a string to an object with a named key: ```json // Before "bin": "./dist/index.mjs" // After "bin": { "better-auth": "./dist/index.mjs" } ``` ## Changes Made **File:** `packages/cli/package.json` <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Renamed the CLI binary to better-auth to avoid conflicts with generic cli commands. package.json maps better-auth to ./dist/index.mjs, and tests now handle both string and object bin formats to resolve the CLI path. <sup>Written for commit 46b1ab2c96e3207deb87c4e58e5f84b258aaac71. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 21:47:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#23517