Repository navigation
localghost v4.0.0
Localghost 4.0 brings a project back with one command: localghost restart NAME stops it if it's running and starts it again the way it last ran. localghost sessions becomes the one view of your projects, showing which are running and whether in the foreground or detached, and the hub's welcome page shows the same.
Upgrade
uvx --refresh localghost --versionThe hub image is rebuilt on the first localghost run or hub up, which brings in the new welcome and offline pages. Existing registry entries and session records keep working; a project last started before the upgrade shows as running in the foreground until its next run records how it was started. Check the two breaking changes below if you script against sessions list --json or still use [run].framework.
Highlights
localghost restart [NAME]stops a running project and starts it again from its remembered directory, re-reading.localghost.tomland the rest of its setup. It comes back the way it last ran, in the foreground or detached;--foregroundor--detachpicks the other way, sorestart NAME --foregroundbrings a background app into your terminal. With no name it restarts the project you're standing in.- Taking over a foreground run. Foreground runs are now recorded as sessions while they run.
restartcan take over a project running in another terminal after you confirm, andsessions stopcan end it. - Sessions by name.
sessions logsandsessions stoptake a project name; session IDs still work, and an exact ID wins. - One list of projects.
localghost sessionslists every remembered project with whether it's running and how.statusshows the same state. - Running state on the hub.
http://localhostmarks each project "Running in the foreground", "Running detached", or when it last started, using Traefik's own router list. - Worktrees can't collide.
runrefuses to start a project whose name is already served from another directory, such as a second worktree of the same repository, and suggests--name. Starting a project clears its stopped session records.
Breaking changes
sessions list --jsonreturns a list of projects (the registry entry plusstateand the newestsessionrecord, ornull) instead of a list of session records.status --json'srememberedlist holds the same objects.[run].frameworkin.localghost.toml, deprecated since 2.0, is rejected with the fix: rename it to[run].type.
Command changes
| Before | Now |
|---|---|
localghost summon NAME |
localghost restart NAME |
localghost forget NAME |
localghost sessions forget NAME |
sessions logs SESSION_ID |
sessions logs NAME (IDs still work) |
sessions stop SESSION_ID |
sessions stop NAME (IDs still work) |
summon and the top-level forget still work as hidden commands and print a deprecation notice. sessions forget also removes the project's stopped session records and refuses a project that's still running. Compose labels, the localghost network and project name, and hostname conventions are unchanged.
The full list is in CHANGELOG.md.