The xenohost command line

The commands you’ll use most, running tools with a site’s PHP, reading logs, and --json and --dry-run.

5-minute read Applies to XenoHost 1.0.4 Updated

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

Terminal
$ 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 CA

Use 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:

Terminal
$ xenohost exec mysite -- composer install
$ xenohost exec mysite -- php artisan migrate

Switch 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

  • --json prints JSON Lines: one record per line, errors included.
  • --dry-run, on every command that changes something, shows the plan without applying it.
  • --non-interactive never 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.

XenoHost is an independent app and is not affiliated with, endorsed or sponsored by Apple Inc. iPhone, Safari, AirDrop, Bonjour, Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other countries.

MAMP PRO is a trademark of its respective owner. XenoHost is independent and is not affiliated with or endorsed by its owner.

Questions about XenoHost?

Check the help pages first, or send us a message and we’ll get back to you within 24 hours.

Need help with an app or a license? Open a support ticket →

We reply within 24 hours on business days.