Add CLI version command

This commit is contained in:
gitea committed 2026-06-09 12:02:27 +08:00
1 parent 871bef3e4f
commit aa6f6321e5
4 files changed
+34 -2

No files matched your search

+11
View File
@@ -6,6 +6,8 @@ import { resolveLiveSealEnterpriseConfig } from "./domains/seal/source.js";
import { sealTools, type SealTool } from "./domains/seal/tools.js";
import { CorpConfig } from "./core/config/types.js";
const VERSION = "0.3.0";
type ParsedArgs = {
command: string[];
options: Record<string, string | boolean>;
@@ -21,6 +23,14 @@ async function main() {
return;
}
if (area === "version") {
printJson({
name: "seal-home",
version: VERSION
});
return;
}
if (area === "tools" && action === "list") {
printJson(sealTools.map((tool) => ({ name: tool.name, description: tool.description })));
return;
@@ -210,6 +220,7 @@ function printHelp() {
console.log(`seal-home CLI
Usage:
seal-home version
seal-home tools list
seal-home corps list [--corp <corpId>]
seal-home source config [--corp <corpId>]