Use the hack CLI for local runtime orchestration (compose, DNS/TLS, logs, sessions, tickets) and agent setup. Trigger when asked to run/start/stop services, inspect logs, manage lifecycle/session workflows, or update agent integrations. Prefer CLI over MCP when shell access is available.
Use hack as the primary interface for local development.
hack over raw docker / docker compose.hack-managed repos..hack/.internal and .hack/.branch as hack-managed artifacts; avoid hand-editing generated files.hack doctor (and hack doctor --fix) before manual runtime/network repair..hack/hack.config.json~/.hack/hack.config.jsonhttps://schemas.hack/hack.config.schema.jsonhack config get/set.dev_host (default: <project>.hack).<sub>.<dev_host> (for example: api.myapp.hack).<dev_host>.<tld> and <sub>.<dev_host>.<tld> (default: gy).hack-dev network attachment are routable.caddy, caddy.reverse_proxy, caddy.tls=internal.hack open, hack open <sub>, hack open --json.hack global trust..hack is local-first and not a public suffix.*.hack.gy when provider callback validation rejects non-public-suffix hosts..hack/docker-compose.yml, .hack/hack.config.json, .hack/hack.env.json..hack/.env and .hack/.internal/ (gitignored; machine-specific state)..hack/.internal/compose.override.yml, .hack/.internal/compose.env.override.yml, .hack/.branch/compose.<branch>.override.yml..hack/.internal/extra-hosts.json using hack internal extra-hosts ... commands..hack/.internal/lifecycle/state.json, .hack/.internal/lifecycle/*.log.internal.extra_hosts in .hack/hack.config.json.hack internal extra-hosts set <hostname> <target>.hack internal extra-hosts list / hack internal extra-hosts unset <hostname>.host-gateway for host-local proxy targets when possible.hack restart; verify with hack doctor.hack inithack up --detachhack up -dhack restarthack open --jsonhack logs --prettyhack logs <service>hack logs --json --no-followhack logs --loki --since 2h --prettyhack run <service> <cmd...>hack downhack global installhack global up, hack global down, hack global statushack global logs <service> --no-follow --tail 200.hack/hack.config.json under startup / lifecycle.hack projects --details and hack logs <service-or-process>.Use branch instances to run parallel environments:
hack up --branch <name> --detachhack open --branch <name>hack logs --branch <name>hack down --branch <name>hack sessionhack session start <project>hack session start <project> --new --name agent-1hack session exec <session> "<command>"hack session stop <session>hack tickets create --title "..." --body-stdinhack tickets list, hack tickets show T-00001hack tickets status T-00001 in_progress, hack tickets sync--project <name> or --path <repo-root>.hack projects --json.HACK_SETUP_SYNC_MODE=warn to warn-only, or HACK_SETUP_SYNC_MODE=off to disable.hack setup sync --all-scopeshack setup sync --all-scopes --checkhack setup sync --all-scopes --removehack update then hack setup sync --all-scopeshack setup cursorhack setup claudehack setup codexhack setup ticketshack agent init (use --client cursor|claude|codex to open)hack agent patternshack setup mcphack mcp install --all --scope project