/** * Cloudflare Worker for install.jarviscli.dev * * curl -sSL https://install.jarviscli.dev | sudo bash → serves install.sh * Browser visit → shows landing page */ const SCRIPT_URL = 'https://raw.githubusercontent.com/everestmcarthur/pelican-installer/main/install.sh'; function isCurl(request) { const ua = (request.headers.get('User-Agent') || '').toLowerCase(); const accept = (request.headers.get('Accept') || ''); return ua.includes('curl') || ua.includes('wget') || ua.includes('httpie') || ua.includes('powershell') || !accept.includes('text/html'); } async function serveScript() { const resp = await fetch(SCRIPT_URL, { cf: { cacheTtl: 300, cacheEverything: true } }); if (!resp.ok) { return new Response('#!/bin/bash\necho "Error: Could not fetch installer. Try: curl -sSL https://raw.githubusercontent.com/everestmcarthur/pelican-installer/main/install.sh | sudo bash"\nexit 1', { status: 502, headers: { 'Content-Type': 'text/plain' } }); } const script = await resp.text(); return new Response(script, { headers: { 'Content-Type': 'text/plain; charset=utf-8', 'Cache-Control': 'public, max-age=300', 'X-Content-Type-Options': 'nosniff' } }); } function serveLanding() { const html = ` Pelican Installer — install.jarviscli.dev

🐦 Pelican Installer

The best way to install Pelican Panel & Wings — one command, fully automated.

Quick Install
curl -sSL https://install.jarviscli.dev | sudo bash click to copy
Or with options
curl -sSL https://install.jarviscli.dev | sudo bash -s -- install \\
--panel --domain panel.example.com --webserver nginx \\
--database postgres --ssl --email you@example.com \\
--cache-driver redis --session-driver redis \\
--queue-driver redis --admin-email admin@example.com \\
--admin-user admin --admin-pass MyPassword -y
click to copy
Features
Nginx, Apache & Caddy
MySQL, MariaDB, PostgreSQL, SQLite
Auto SSL via Let's Encrypt
Redis cache, session & queue
Wings reverse proxy (all 3 web servers)
Fully non-interactive mode
Auto admin user creation
Post-install health checks
Update & uninstall commands
ARM64 support

Powered by JarvisCLI

`; return new Response(html, { headers: { 'Content-Type': 'text/html; charset=utf-8' } }); } export default { async fetch(request) { const url = new URL(request.url); if (url.pathname === '/install.sh' || url.pathname === '/script') { return serveScript(); } if (url.pathname === '/' || url.pathname === '') { if (isCurl(request)) { return serveScript(); } return serveLanding(); } return new Response('Not Found', { status: 404 }); } };