Run and inspect
Use this after Getting started. The examples use the default Compose backend.
Start or restart
hack up --detach
hack ps
hack open
hack restart webReplace web with a declared service. Restarting one service skips the project
lifecycle; read the command reference before relying on
hooks or implicit dependencies. Check the app after a restart.
Read logs
hack logs web --no-follow --tail 100
hack logs web
hack logs --loki --since 2h --prettyThe first command is a finite snapshot. The second follows live output until Ctrl-C. Loki history needs the global logging stack running on that host and is unavailable in slim environments.
Stop
hack downUse ordinary shutdown after review. Inspect reported failures rather than issuing
broad cleanup commands. hack projects prune --project <name> scopes stale
registry and container cleanup to one project family.
Native backend
On the native backend, startup is foreground, logs are finite snapshots, and
--detach, following logs and some service subsets are not available. See
Native authored commands for the
exact supported forms.