The xenohost command-line tool ships inside the app and shares its engine. Everything you can do in the app, you can script, and the CLI works whether the app is open or not.
Everyday commands
$ xenohost status # services, ports, PHP versions and what needs attention
$ xenohost list # sites with hostnames, PHP, TLS and database
$ xenohost start # or stop, restart; all services or one
$ xenohost add ~/Sites/mysite --host mysite.local --php 8.5.10 --tls
$ xenohost doctor # engines, signatures, config drift, ports and your CAUse the site’s PHP
xenohost exec <site> -- <command> runs a command in the site’s folder with the site’s exact PHP first on your PATH:
$ xenohost exec mysite -- composer install
$ xenohost exec mysite -- php artisan migrateSwitch a site’s version with xenohost php <site> <version>.
Read logs
xenohost logs --site <site> shows the site’s latest Apache, PHP and application log entries, then exits. Narrow it with --since 15m, --level, --source and --limit, follow it live with --follow, or see the original lines with --raw. Reading logs never restarts anything or changes your config.
For scripts and AI agents
--jsonprints JSON Lines: one record per line, errors included.--dry-run, on every command that changes something, shows the plan without applying it.--non-interactivenever stops to ask; a command that would need an answer fails with a clear error instead.- Exit codes are documented and shared by every XenoTool, so a script can tell “nothing to do” from “failed”.
Commands that need administrator rights go through XenoHost’s helper. The CLI never runs sudo.