refactor: rename to openclaw

This commit is contained in:
Peter Steinberger
2026-01-30 03:15:10 +01:00
parent 4583f88626
commit 9a7160786a
2357 changed files with 16688 additions and 16788 deletions
+4 -10
View File
@@ -1,17 +1,11 @@
import path from "node:path";
export const DEFAULT_CLI_NAME = "moltbot";
export const LEGACY_CLI_NAME = "moltbot";
export const DEFAULT_CLI_NAME = "openclaw";
const KNOWN_CLI_NAMES = new Set([DEFAULT_CLI_NAME, LEGACY_CLI_NAME]);
const CLI_PREFIX_RE = /^(?:((?:pnpm|npm|bunx|npx)\s+))?(moltbot|moltbot)\b/;
const KNOWN_CLI_NAMES = new Set([DEFAULT_CLI_NAME]);
const CLI_PREFIX_RE = /^(?:((?:pnpm|npm|bunx|npx)\s+))?(openclaw)\b/;
export function resolveCliName(
argv: string[] = process.argv,
env: Record<string, string | undefined> = process.env as Record<string, string | undefined>,
): string {
const override = env.MOLTBOT_CLI_NAME?.trim() || env.CLAWDBOT_CLI_NAME?.trim();
if (override) return override;
export function resolveCliName(argv: string[] = process.argv): string {
const argv1 = argv[1];
if (!argv1) return DEFAULT_CLI_NAME;
const base = path.basename(argv1).trim();