Backup automation now emits `npx runfusion.ai backup --create` so scheduled backups work for users on the zero-install path where `fn` is not on PATH. `runfusion.ai` also exposes `fn` and `fusion` bins, so `npm i -g runfusion.ai` puts them on PATH (npm does not link dep bins globally). Alias only defaults to the dashboard when invoked as `runfusion.ai` / `runfusion`; `fn` / `fusion` forward args verbatim so bare `fn` still prints help. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
26 lines
1.0 KiB
JavaScript
Executable File
26 lines
1.0 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
// runfusion.ai — tiny alias for @runfusion/fusion.
|
|
//
|
|
// Exposes four bins: runfusion.ai, runfusion, fn, fusion. Installing this
|
|
// package globally (`npm i -g runfusion.ai`) therefore also puts `fn` and
|
|
// `fusion` on PATH, even though `@runfusion/fusion` is only a dependency
|
|
// (npm does not link dep bins globally).
|
|
//
|
|
// When invoked as `runfusion.ai` / `runfusion` with no args, defaults to
|
|
// launching the dashboard. When invoked as `fn` / `fusion`, forwards args
|
|
// verbatim so behavior matches the main CLI exactly (e.g. bare `fn` prints
|
|
// help, not `fn dashboard`).
|
|
|
|
import { basename } from "node:path";
|
|
|
|
const args = process.argv.slice(2);
|
|
const invokedAs = basename(process.argv[1] || "").replace(/\.(js|cjs|mjs|exe)$/i, "");
|
|
const isAliasInvocation = invokedAs === "runfusion.ai" || invokedAs === "runfusion";
|
|
|
|
if (isAliasInvocation && args.length === 0) {
|
|
// No subcommand → default to dashboard.
|
|
process.argv = [process.argv[0], process.argv[1], "dashboard"];
|
|
}
|
|
|
|
await import("@runfusion/fusion/dist/bin.js");
|