🔨 chore: improve start up scripts (#13318)

update scripts
This commit is contained in:
Arvin Xu 2026-03-27 00:49:23 +08:00 committed by GitHub
parent edc8920703
commit 53c5708c9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,6 @@
.\" Code generated by `npm run man:generate`; DO NOT EDIT.
.\" Manual command details come from the Commander command tree.
.TH LH 1 "" "@lobehub/cli 0.0.1\-canary.12" "User Commands"
.TH LH 1 "" "@lobehub/cli 0.0.1\-canary.14" "User Commands"
.SH NAME
lh \- LobeHub CLI \- manage and connect to LobeHub services
.SH SYNOPSIS
@ -27,7 +27,7 @@ For command-specific manuals, use the built-in manual command:
.SH COMMANDS
.TP
.B login
Log in to LobeHub via browser (Device Code Flow)
Log in to LobeHub via browser (Device Code Flow) or configure API key server
.TP
.B logout
Log out and remove stored credentials

View file

@ -8,9 +8,13 @@ const NEXT_HOST = 'localhost';
/**
* Resolve the Next.js dev port.
* Respects the PORT environment variable, falls back to 3010.
* Priority: -p CLI flag > PORT env var > 3010.
*/
const resolveNextPort = (): number => {
const pIndex = process.argv.indexOf('-p');
if (pIndex !== -1 && process.argv[pIndex + 1]) {
return Number(process.argv[pIndex + 1]);
}
if (process.env.PORT) return Number(process.env.PORT);
return 3010;
};