feat(cli): add corps search command and intuitive aliases

- Implement hose-use corps search <keyword> with case-insensitive fuzzy matching across id, name, corpId, staffId, staffName, and accountId
- Format terminal table output with matched cell brackets, hit labels, active corp markers, and friendly no-match fallback
- Support --json structured output conforming to CliResult specification
- Add intuitive aliases for frequently guessed commands: auth list -> auth accounts, corps find -> corps search, config show -> config paths
- Enhance CorpSummary and CorpContext with corpId, staffName, and getAllCorps
- Add comprehensive unit tests in corps.test.ts, auth.test.ts, and config.test.ts
This commit is contained in:
gitea committed 2026-09-09 14:42:58 +08:00
1 parent 8efce4342a
commit 1cd8901f7a
10 files changed
+630 -11

No files matched your search

+10
View File
@@ -31,16 +31,26 @@ export async function handleAuthCommand(
return handleLogin(parsed, runtime);
case "status":
case "whoami":
case "current":
return handleStatus(parsed, runtime);
case "refresh":
case "renew":
return handleRefresh(parsed, runtime);
case "import":
case "add":
return handleImport(parsed, runtime);
case "add-link":
case "link":
case "import-link":
return handleAddLink(parsed, runtime);
case "accounts":
case "list":
case "account":
case "accs":
return handleAccounts(parsed, runtime);
case "switch-account":
case "switch":
case "use-account":
return handleSwitchAccount(parsed, runtime);
default:
return {