#!/usr/bin/env bun import { program } from './setup' const isCliUser = process.env.USER === 'cli' const noArgs = process.argv.length <= 2 const isTTY = !!process.stdin.isTTY // SSH login shell passes commands as: toes -c "command args" const shellExec = process.argv[1] === '-c' ? process.argv.slice(2).join(' ') : null if (shellExec) { const tokens = shellExec.split(/\s+/).filter(Boolean) program.parse(['node', 'toes', ...tokens]) } else if (isCliUser && noArgs && isTTY) { const { shell } = await import('./shell') await shell() } else { program.parse() }