Sites
Every site gets its own https://name.test host, PHP version and FPM pool.
Create a site
Click New Site… in the sidebar, or from a terminal:
bothy site add shop --php 8.3 --db bothy site open shop # https://shop.test
Clone from git or GitHub
Choose Clone from Git in New Site and paste a repository URL. If the GitHub CLI is installed and signed in, Bothy lists your repositories so you can pick one instead - it never stores a token itself. Bothy clones the repo, optionally runs composer install, and creates the database. From a terminal:
bothy site add app.client --git git@github.com:you/client.git --composer --db
Git tab
Any site whose folder is a git working tree shows a branch mark in the sidebar and gets a Git tab: the current branch, plus every new, modified, deleted, renamed or conflicted file (untracked files are listed individually). It's a read-only view for checking what you've changed - commit, push and pull from your editor or terminal as usual. Use Reveal in Finder on any file, or refresh after switching branches.
Subdomains
Sites can be subdomains: app.wasteprime is served at app.wasteprime.test.
Document root
By default the site folder is served. public/, web/ and htdocs/ are auto-detected; you can set any folder in the site's General tab.
.htaccess
A site's .htaccess RewriteRules are translated into its Caddy vhost automatically, so Apache-era projects run unchanged. Edit the file and Bothy regenerates the config; anything it can't translate is listed in the site's Routing tab.
Environment, Xdebug and commands
bothy site env app.client APP_ENV local bothy site xdebug app.client on bothy site exec app.client -- wp plugin list
Xdebug is installed for that PHP version on first use and listens on 127.0.0.1:9003 in debug,develop mode. site exec runs in the site folder with the site's PHP first on PATH, so composer, artisan, wp and phpunit all use the right version.
Rename, label and folders
bothy site rename shop store # now https://store.test bothy site label api.client "Client API" bothy site folder api.client Clients # sidebar group; --none for top level
Drag a site onto another to make a folder, or onto a folder header to move it in. Folders and pins only affect the sidebar; the site itself doesn't change.
Export and share
Export zips the files, a dump of each assigned database and the site's Bothy config (_bothy/site.json) - handy for moving to another Mac. Share opens a temporary public URL through a Cloudflare quick tunnel; it lives as long as the app does and installs cloudflared on first use.
Remove
bothy site remove shop # removes the vhost and pool; files and databases are kept