Files
triggershell/examples/scripts/cleanup.js
T
valknarandClaude Sonnet 5 ced99a8e75 Initial implementation of TriggerShell
A Python CLI (typer) that bootstraps Node/pnpm and launches a Next.js 16 web
app for running configured shell scripts: YAML config validated by a shared
Zod schema, dynamic per-script forms mapped to shadcn controls, argv-safe
execa execution with live WebSocket streaming, SQLite/Drizzle run history,
and optional argon2 session + API token auth.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 18:37:30 +02:00

18 lines
530 B
JavaScript

#!/usr/bin/env node
const args = process.argv.slice(2);
function getArg(name) {
const index = args.indexOf(name);
return index === -1 ? undefined : args[index + 1];
}
const targetDir = getArg("--dir");
const olderThanDays = getArg("--days");
const types = getArg("--types");
console.log(`Scanning ${targetDir} for files older than ${olderThanDays} days (types: ${types})`);
if (process.env.CLEANUP_API_KEY) {
console.log("Using configured external API key.");
}
console.log("No matching files found. Cleanup complete.");