fix(FN-000): backup routine uses npx runfusion.ai; alias exposes fn/fusion

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>
This commit is contained in:
gsxdsm
2026-04-22 19:19:07 -07:00
parent 88ccd2d4e2
commit dd37cdc5b4
6 changed files with 31 additions and 20 deletions

View File

@@ -420,11 +420,11 @@ export async function syncBackupAutomation(
throw new Error(`Invalid backup schedule: ${schedule}`);
}
// Build the backup command
// The CLI command will be: fn backup --auto
// The --auto flag indicates this is an automated run (can add special handling if needed)
const command = "fn backup --create";
// Build the backup command.
// Uses `npx runfusion.ai` so backups work even when only the zero-install
// path (`npx runfusion.ai`) has been used and `fn` is not on PATH.
const command = "npx runfusion.ai backup --create";
if (existingSchedule) {
// Update existing schedule
return await automationStore.updateSchedule(existingSchedule.id, {
@@ -474,7 +474,7 @@ export async function syncBackupRoutine(
throw new Error(`Invalid backup schedule: ${schedule}`);
}
const command = "fn backup --create";
const command = "npx runfusion.ai backup --create";
const input = {
name: BACKUP_SCHEDULE_NAME,
description: "Automatic database backup based on project settings",