Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

872 B
Raw Blame
/** Scope belongs to the invocation; a suggested command must keep the same target. */
export type CommandScope = {
  readonly projectRoot?: string;
  readonly runtimeProfile?: string;
};

/** Display copyable arguments for POSIX shells or PowerShell, without expanding their contents. */
export function commandHint(
  args: readonly string[],
  scope: CommandScope = {},
  shell: "posix" | "powershell" = process.platform === "win32" ? "powershell" : "posix",
): string {
  const quote = (value: string): string => /^[a-zA-Z0-9_./:@=+-]+$/u.test(value)
    ? value
    : `'${value.replaceAll("'", shell === "powershell" ? "''" : "'\"'\"'")}'`;
  return ["hypit", ...args,
    ...(scope.projectRoot === undefined ? [] : ["--project", scope.projectRoot]),
    ...(scope.runtimeProfile === undefined ? [] : ["--runtime", scope.runtimeProfile]),
  ].map(quote).join(" ");
}