Import from Herd, Valet or Flock
On this page
If you used Herd, Valet or Flock before, Short Leash can read that tool's site list once and add the same sites: parked folders, linked sites, HTTPS and PHP versions. It shows you a checklist first and changes nothing until you choose Import. It never changes, stops or writes to the other tool.
Where Short Leash looks
| Tool | macOS | Windows |
|---|---|---|
| Herd | ~/Library/Application Support/Herd |
%USERPROFILE%\.config\herd |
| Valet | ~/.config/valet |
— |
| Flock | ~/Library/Application Support/Flock |
%AppData%\Flock |
On first run, the Add your sites step checks whether the tool's settings file exists in one of these folders. It never opens or reads that file. If it finds one, Import from Herd (or Valet, or Flock) is the main choice, beside Park a folder and Link one project.
Later, open Settings › Import and choose Look for other tools, the same check. Short Leash looks then, or when the import screen sends you back to Settings › Import, and at no other time.
What it reads, and what it never opens
Once you choose Import from …, Short Leash reads:
- the tool's settings file, for its parked folders and the address ending it uses;
- the names of its linked sites and the folders they point to (the links are read, never followed to open a file);
- its per-site web server files, only for each site's PHP version and whether it uses HTTPS;
- whether a site has a certificate (the certificate itself isn't opened);
- the names of the folders inside its parked folders;
- a project's
herd.ymlor.flockrc, when you convert project files.
It never opens the tool's services folder, private keys, certificate requests, its certificate authority, any .env file, or the tool's own databases. Each file it reads is capped at 64 KB. A file that's bigger, missing, behind a link or unreadable goes on a Couldn't read list instead of stopping the import.
The checklist
The import screen groups what Short Leash would add, each with a box:
- Folders to park;
- Sites, the linked projects and the folders they point to;
- HTTPS and PHP for each site;
- PHP versions to install that those sites use;
- Project files, a
leash.tomlfor a project that has aherd.ymlor.flockrc(unticked to begin with).
Untick what you don't want, then choose Import. A toast says what was added ("Imported 2 folders and 5 sites"), and PHP versions install in the background, shown on the Runtimes screen.
- What Short Leash already has is listed under Already in Short Leash and is never added twice, so importing again adds nothing new.
- A link whose name is already another Short Leash site is offered unticked, with a note.
- Short Leash answers only at
.test. A tool set to another ending gets a note, and its sites answer at.test. - Short Leash runs PHP 8.0 to 8.5. A site on PHP 7.4 or a version Short Leash can't read gets a note and isn't pinned.
- Import reads the settings again first. An item that changed since you saw the list says "Changed since you reviewed it", and one that's gone says "No longer found". Neither is added; choose Review again to see the list as it is now.
Short Leash doesn't import the other tool's services. From Flock it also leaves out a site's extra domains, its server and worker settings, its Node version and Flock's default PHP version; the checklist lists what it left out, so you can set those up in Short Leash.
Flock is in beta and may change how it keeps its settings. Anything Short Leash can't read from it lands under Couldn't read, and nothing from that entry is imported.
From the terminal
leash import herd --dry-run # what would be added, with each item's id
leash import herd # asks before it imports
leash import herd --skip link:legacy --yes
leash import projects # leash.toml from your sites' herd.yml or .flockrc files
With no tool named, leash import uses the one it finds, and asks you to name one when it finds several. --project-files also writes the leash.toml files, which are left out unless you ask.
Project files
A project's herd.yml or .flockrc can become a leash.toml in the same folder, only when you tick it, and never over a leash.toml that's there.
- From
herd.yml: the PHP version, HTTPS, aliases, its name (as one more alias) and its services. Redis becomes Valkey and MinIO becomes RustFS, which Short Leash runs in their place. - From
.flockrc: the PHP and Node versions.
Ports aren't copied: they stay as your .env sets them. Short Leash never reads .env, so a value like ${DB_PORT} stays as it's written.
Bring a database across
Short Leash doesn't open the other tool's database files. Instead, Import a database (after an import, or in Settings › Import) takes you through three steps:
- Dump it with the other tool. Choose MySQL, MariaDB or PostgreSQL, type the database's name and the other tool's port, and copy the command Short Leash shows. Short Leash never runs it: run it yourself in a terminal while the other tool's database is running. If the name has anything but letters, digits,
_and-, the command saysDATABASE_NAMEinstead, with a line telling you to put the name in, quoted as your terminal needs. - Quit the other tool's database. Short Leash's own service uses the same port, so stop the other one first.
- Restore into Short Leash. Choose the version of Short Leash's service, and the dump file:
.sqlor.sql.gzfor MySQL and MariaDB,.dumpfor PostgreSQL. Restore adds or turns on that service, copies the file into Short Leash's backups as Imported, and restores it into a new database. A MariaDB dump goes into Short Leash's MariaDB.
Then follow the restore on the Backups screen, where the copy is kept like any other backup. Restoring the same file into the same name again uses that copy instead of making another.
- An import never replaces a database. If the service already has one with that name (compared without case), choose another under Name in Short Leash.
- Short Leash won't restore into a server's own databases:
mysql,information_schema,performance_schema,sys,postgres,template0ortemplate1. - The first time you use a service version, Short Leash downloads and sets it up. The import screen shows the download and restores once the service is running, trying once more; if that fails too, it says why. Cancel stops waiting, not the download: the service keeps setting up in Services, and you choose Restore once it runs. If the service is turned off or fails meanwhile, the screen says so and restores nothing.
- A MySQL or MariaDB dump is checked before anything starts, the same way as every restore in Backups: one that holds a
mysqlclient command or switches to another database is refused, with the line it found.
From the terminal:
leash import database --kind mysql --database shop # prints the dump command
leash import database --kind mysql --database shop shop.sql # restores the file
Quit the other tool
Short Leash needs ports 80 and 443 to serve .test sites. If the other tool is still running, Short Leash's setup names the program holding them; quit it yourself. See Port 80 or 443 in use.
How Short Leash decides what it may read is written up in ADR 0079.