diff --git a/docs/setup.md b/docs/setup.md index 89a61c01..58b3b55f 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -11,7 +11,7 @@ Local first time setup guide for VibSDK - get your AI coding platform running lo Before getting started, make sure you have: ### Required -- **Node.js** (v18 or later) +- **Node.js** (v22 or later) - **Cloudflare account** with API access - **Cloudflare API Token** with appropriate permissions diff --git a/scripts/setup.ts b/scripts/setup.ts index f68f62cf..939f30f5 100755 --- a/scripts/setup.ts +++ b/scripts/setup.ts @@ -2113,7 +2113,12 @@ async function main() { await setup.setup(); } -if (import.meta.url === `file://${process.argv[1]}`) { +// Run if this is the main module (supports both direct execution and tsx) +const isMainModule = import.meta.url.endsWith('setup.ts') || + import.meta.url === `file://${process.argv[1]}` || + process.argv[1]?.endsWith('setup.ts'); + +if (isMainModule) { main().catch((error) => { console.error('Setup failed:', error); process.exit(1);