Command reference
Run hack help <command> for the same content in the terminal. Global options: --no-interactive (or HACK_NO_INTERACTIVE=1); JSON shapes vary by command and backend. See Command and output contracts for envelopes, bare reports and streamed records.
Project
hack project
Inspect or manage project metadata
Usage
hack project <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack project owner | Inspect project ownership |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack project owner
Inspect project ownership
Usage
hack project owner <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack project owner show | Show the local ownership metadata for the current project |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack init
Initialize a repo (generate .hack/ with compose + config)
Usage
hack init [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--manual | Skip discovery and define services manually (or generate a minimal compose in --auto) |
--auto | Run non-interactive init with sensible defaults |
--name <slug> | Project slug (default: repo name) |
--dev-host <host> | DEV_HOST override |
--oauth | Enable OAuth-safe alias host |
--oauth-tld <tld> | OAuth alias TLD override (default: gy) |
--no-discovery | Skip discovery and generate a minimal compose |
| `--with <claude | codex |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack up [services...]
Start project services (docker compose up)
Usage
hack up [services...] [options]Arguments
| Arg | Description |
|---|---|
services |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--branch <name> | Run against a branch-specific instance (compose name + hostnames) |
--detach, -d | Run in background (docker compose up -d) |
--profile <name[,name...]> | Enable one or more compose profiles (comma-separated) |
| `--target <auto | local |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack down
Stop project services (docker compose down)
Usage
hack down [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--branch <name> | Run against a branch-specific instance (compose name + hostnames) |
--profile <name[,name...]> | Enable one or more compose profiles (comma-separated) |
| `--target <auto | local |
--prune-caches | After down, remove confirmed Compose-owned disposable cache volumes |
--yes | Confirm --prune-caches without prompting |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack restart [services...]
Restart the project or selected services
Usage
hack restart [services...] [options]Arguments
| Arg | Description |
|---|---|
services |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--branch <name> | Run against a branch-specific instance (compose name + hostnames) |
--profile <name[,name...]> | Enable one or more compose profiles (comma-separated) |
| `--target <auto | local |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack ps
Show project status (docker compose ps)
Usage
hack ps [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--branch <name> | Run against a branch-specific instance (compose name + hostnames) |
--profile <name[,name...]> | Enable one or more compose profiles (comma-separated) |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack tui
Open the project TUI (services + logs)
Usage
hack tui [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack run <service> [cmd...]
Run a one-off command in a service container (docker compose run --rm)
Usage
hack run <service> [cmd...] [options]Arguments
| Arg | Description |
|---|---|
service | |
cmd |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--branch <name> | Run against a branch-specific instance (compose name + hostnames) |
--workdir <path> | Working directory inside the container (docker compose run -w) |
--profile <name[,name...]> | Enable one or more compose profiles (comma-separated) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack exec <service> [cmd...]
Run a command in an already-running service container (docker compose exec)
Usage
hack exec <service> [cmd...] [options]Arguments
| Arg | Description |
|---|---|
service | |
cmd |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--branch <name> | Run against a branch-specific instance (compose name + hostnames) |
--workdir <path> | Working directory inside the container (docker compose run -w) |
--profile <name[,name...]> | Enable one or more compose profiles (comma-separated) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack logs [service]
Tail logs (compose by default; Loki for queries/history via --loki/--query)
Usage
hack logs [service] [options]Arguments
| Arg | Description |
|---|---|
service |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--branch <name> | Run against a branch-specific instance (compose name + hostnames) |
--follow, -f | Follow logs (default for hack logs) |
--no-follow | Print logs and exit (do not follow) |
--tail <n> | Tail last N log lines (default: 200) |
--pretty | Pretty-print logs (best-effort JSON parsing + formatting) |
--json | Output JSON (machine-readable) |
--profile <name[,name...]> | Enable one or more compose profiles (comma-separated) |
--compose | Read logs directly from docker compose (bypass Loki) |
--loki | Force Loki backend (do not fall back to docker compose logs) |
--services <csv> | Filter Loki logs by service(s), comma-separated (e.g. api,www) |
--query <logql> | Raw LogQL selector/query (overrides auto selector built from project + services) |
--since <time> | Start time for Loki logs (RFC3339 or duration like 15m) |
--until <time> | End time for Loki logs (RFC3339 or duration like 15m) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack open [target]
Open a project URL (OAuth alias by default when enabled; otherwise dev host)
Usage
hack open [target] [options]Arguments
| Arg | Description |
|---|---|
target |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--branch <name> | Run against a branch-specific instance (compose name + hostnames) |
| `--prefer <auto | alias |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack branch
Manage branch aliases for a project
Usage
hack branch <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack branch add <name> | Register a branch alias for this project |
hack branch list | List registered branch aliases for this project |
hack branch remove <name> | Remove a branch alias for this project |
hack branch open <name> | Open the branch host in a browser |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack branch add <name>
Register a branch alias for this project
Usage
hack branch add <name> [options]Arguments
| Arg | Description |
|---|---|
name |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--note <text> | Optional note for the branch entry |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack branch list
List registered branch aliases for this project
Usage
hack branch list [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack branch remove <name>
Remove a branch alias for this project
Usage
hack branch remove <name> [options]Arguments
| Arg | Description |
|---|---|
name |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack branch open <name>
Open the branch host in a browser
Usage
hack branch open <name> [options]Arguments
| Arg | Description |
|---|---|
name |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--prefer <auto | alias |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack config
Read/write hack.config.json values
Usage
hack config <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack config get <key> | Read a value from hack.config.json |
hack config set <key> <value> | Update a value in hack.config.json |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack config get <key>
Read a value from hack.config.json
Usage
hack config get <key> [options]Arguments
| Arg | Description |
|---|---|
key |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--global | Read/write global ~/.hack/hack.config.json |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack config set <key> <value>
Update a value in hack.config.json
Usage
hack config set <key> <value> [options]Arguments
| Arg | Description |
|---|---|
key | |
value |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--global | Read/write global ~/.hack/hack.config.json |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session
Manage persistent project workspaces with tmux-first onboarding
Usage
hack session <subcommand> [options]Sessions keep a project workspace alive across terminal restarts, SSH reconnects, and long-running agent work. The guided default is tmux, including hack setup tmux for a popup picker. Other mux backends such as zellij still exist through sessions.mux, but the interactive session tooling is tmux-first today.
Subcommands
| Command | Summary |
|---|---|
hack session list | List active workspaces |
hack session start [project] | Reuse the default project workspace or create an isolated one |
hack session stop <workspace> | Stop a workspace |
hack session attach <workspace> | Attach to an existing workspace |
hack session exec <workspace> <command> | Send a command to a running workspace |
hack session panes <workspace> | List panes in a tmux workspace |
hack session capture <workspace> | Capture recent output from a tmux workspace |
hack session tail <workspace> | Tail output from a tmux workspace |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session list
List active workspaces
Usage
hack session list [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session start [project]
Reuse the default project workspace or create an isolated one
Usage
hack session start [project] [options]Reuse the default project workspace when it already exists, or create an isolated long-running workspace with --new or --name. Use --detach when another tool should keep the workspace alive without attaching your terminal.
Arguments
| Arg | Description |
|---|---|
project | Project name or path |
Options
| Option | Description |
|---|---|
--up | Run hack up -d before creating or attaching |
--new | Create an isolated workspace instead of reusing the default project workspace |
--name <value> | Suffix for an isolated workspace name (for example: agent-1 -> project--agent-1) |
--detach, -d | Create or reuse the workspace without attaching (for GUI/non-TTY use) |
| `--env <name | base>` |
| `--service <global | service>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session stop <workspace>
Stop a workspace
Usage
hack session stop <workspace> [options]Arguments
| Arg | Description |
|---|---|
workspace | Workspace name |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session attach <workspace>
Attach to an existing workspace
Usage
hack session attach <workspace> [options]Attach to a running workspace by name. Tmux switches clients instead of nesting tmux inside tmux, while zellij attaches to the named session directly.
Arguments
| Arg | Description |
|---|---|
workspace | Workspace name |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session exec <workspace> <command>
Send a command to a running workspace
Usage
hack session exec <workspace> <command> [options]Queue a command in the workspace without opening a new interactive attach flow. Tmux sends it to the active pane; zellij opens a new pane for the command. This is useful for long-running agents, background checks, or remote follow-up work.
Arguments
| Arg | Description |
|---|---|
workspace | Workspace name |
command | Command to execute in workspace |
Options
| Option | Description |
|---|---|
| `--env <name | base>` |
| `--service <global | service>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session panes <workspace>
List panes in a tmux workspace
Usage
hack session panes <workspace> [options]Arguments
| Arg | Description |
|---|---|
workspace | Workspace name |
Options
| Option | Description |
|---|---|
--json | Output JSON (machine-readable) |
--pretty | Pretty-print logs (best-effort JSON parsing + formatting) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session capture <workspace>
Capture recent output from a tmux workspace
Usage
hack session capture <workspace> [options]Arguments
| Arg | Description |
|---|---|
workspace | Workspace name |
Options
| Option | Description |
|---|---|
--target <target> | Tmux pane target (default: active pane) |
--lines <n> | Number of lines to capture (default: 200) |
--json | Output JSON (machine-readable) |
--pretty | Pretty-print logs (best-effort JSON parsing + formatting) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack session tail <workspace>
Tail output from a tmux workspace
Usage
hack session tail <workspace> [options]Arguments
| Arg | Description |
|---|---|
workspace | Workspace name |
Options
| Option | Description |
|---|---|
--target <target> | Tmux pane target (default: active pane) |
--lines <n> | Number of lines to capture (default: 200) |
--interval-ms <ms> | Polling interval in milliseconds (default: 500) |
--max-ms <ms> | Stop tailing after N milliseconds (default: 5000) |
--json | Output JSON (machine-readable) |
--pretty | Pretty-print logs (best-effort JSON parsing + formatting) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
Global infrastructure
hack global
Manage machine-wide infra (DNS/TLS, Caddy proxy, logs)
Usage
hack global <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack global install | Bootstrap ~/.hack and start Caddy + Grafana/Loki/Alloy |
hack global up | Start global infra containers |
hack global down | Stop global infra containers |
hack global status | Show status for global infra (containers + networks) |
hack global logs [service] | Tail global infra logs (caddy|grafana|loki|alloy) |
hack global ca | Export Caddy Local CA cert (print path or PEM) |
hack global cert <hosts...> | Generate local TLS certs via mkcert (for non-Caddy services) |
hack global trust | Trust Caddy Local CA (macOS) so https://*.hack is trusted |
hack global logs-reset | Wipe Loki/Grafana volumes (fresh logs + dashboards) |
hack global authorize | Authorize passwordless DNS recovery commands on macOS |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global install
Bootstrap ~/.hack and start Caddy + Grafana/Loki/Alloy
Usage
hack global install [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global up
Start global infra containers
Usage
hack global up [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global down
Stop global infra containers
Usage
hack global down [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global status
Show status for global infra (containers + networks)
Usage
hack global status [options]Options
| Option | Description |
|---|---|
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global logs [service]
Tail global infra logs (caddy|grafana|loki|alloy)
Usage
hack global logs [service] [options]Arguments
| Arg | Description |
|---|---|
service |
Options
| Option | Description |
|---|---|
--follow, -f | Follow logs (default for hack logs) |
--no-follow | Print logs and exit (do not follow) |
--tail <n> | Tail last N log lines (default: 200) |
--pretty | Pretty-print logs (best-effort JSON parsing + formatting) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global ca
Export Caddy Local CA cert (print path or PEM)
Usage
hack global ca [options]Options
| Option | Description |
|---|---|
--print | Print the CA cert PEM to stdout (instead of printing its path) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global cert <hosts...>
Generate local TLS certs via mkcert (for non-Caddy services)
Usage
hack global cert <hosts...> [options]Uses mkcert to generate a cert/key pair under ~/.hack/certs (or --out).
Arguments
| Arg | Description |
|---|---|
hosts |
Options
| Option | Description |
|---|---|
--install | Run mkcert -install before generating certs |
--out <dir> | Directory for generated cert/key (default: ~/.hack/certs) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global trust
Trust Caddy Local CA (macOS) so https://*.hack is trusted
Usage
hack global trust [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global logs-reset
Wipe Loki/Grafana volumes (fresh logs + dashboards)
Usage
hack global logs-reset [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack global authorize
Authorize passwordless DNS recovery commands on macOS
Usage
hack global authorize [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack status
Show project status (shortcut for hack projects --details)
Usage
hack status [options]Options
| Option | Description |
|---|---|
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--include-global | Include global infra projects under ~/.hack (e.g. logging stack) |
--all | Include unregistered docker compose projects (best-effort) |
--meta | Include git/worktree/session/env metadata (implies --details) |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack usage
Show resource usage across running projects
Usage
hack usage [options]Options
| Option | Description |
|---|---|
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--details | Show per-container usage and mount types |
--include-global | Include global infra projects under ~/.hack (e.g. logging stack) |
--watch | Refresh usage continuously |
--interval <value> | Refresh interval (ms) for --watch |
--no-host | Skip host process metrics |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack projects
Show all projects (registry + running docker compose)
Usage
hack projects <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack projects prune | Remove stale registry entries and stop orphaned containers |
Options
| Option | Description |
|---|---|
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--details | Show per-project service tables |
--summary | Return compact project counts with --json; load details with --project |
--timings | Write numeric listing phase timings to stderr (requires --json) |
--no-daemon | Read runtime directly instead of the daemon cache |
--meta | Include git/worktree/session/env metadata (implies --details) |
--include-global | Include global infra projects under ~/.hack (e.g. logging stack) |
--all | Include unregistered docker compose projects (best-effort) |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack projects prune
Remove stale registry entries and stop orphaned containers
Usage
hack projects prune [options]Options
| Option | Description |
|---|---|
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--include-global | Include global infra projects under ~/.hack (e.g. logging stack) |
--dry-run | Report prune candidates without changing registry entries or containers |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
Diagnostics
hack log-pipe
Read log lines from stdin and pretty-print them (best-effort JSON parsing)
Usage
hack log-pipe [options]Options
| Option | Description |
|---|---|
| `--format <auto | docker-compose |
| `--stream <stdout | stderr>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack doctor
Validate local setup (docker, networks, DNS, global infra, project config)
Usage
hack doctor [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--fix | Attempt safe auto-remediations (network + CoreDNS + CA) |
--migrate-env-config | Migrate legacy hack.env.json/.env state to the new env config files |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack crash-capture
Capture OrbStack/system/docker diagnostics into .tmp for post-failure triage
Usage
hack crash-capture [options]Collects structured snapshots after a runtime failure: hack status/logs, docker state, OrbStack process details, and filtered macOS unified logs.
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--since <duration> | Look-back window for system logs (for example: 30m, 2h) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon
Manage the local hack daemon (hackd)
Usage
hack daemon <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack daemon start | Start hackd (local daemon) |
hack daemon stop | Stop hackd |
hack daemon restart | Restart hackd |
hack daemon status | Show hackd status |
hack daemon metrics | Show hackd metrics |
hack daemon logs | Show hackd logs |
hack daemon clear | Clear stale hackd pid/socket files |
hack daemon install | Install hackd as a launchd service (macOS) |
hack daemon uninstall | Uninstall hackd launchd service (macOS) |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon start
Start hackd (local daemon)
Usage
hack daemon start [options]Options
| Option | Description |
|---|---|
--foreground | Run hackd in the foreground (debug) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon stop
Stop hackd
Usage
hack daemon stop [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon restart
Restart hackd
Usage
hack daemon restart [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon status
Show hackd status
Usage
hack daemon status [options]Options
| Option | Description |
|---|---|
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon metrics
Show hackd metrics
Usage
hack daemon metrics [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon logs
Show hackd logs
Usage
hack daemon logs [options]Options
| Option | Description |
|---|---|
--tail <n> | Tail last N log lines (default: 200) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon clear
Clear stale hackd pid/socket files
Usage
hack daemon clear [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon install
Install hackd as a launchd service (macOS)
Usage
hack daemon install [options]Options
| Option | Description |
|---|---|
--run-at-load | Start hackd automatically on login |
--no-run-at-load | Do not start hackd automatically on login |
--gui-only | Only run in GUI sessions (default) |
--no-gui-only | Run in all session types (including SSH) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack daemon uninstall
Uninstall hackd launchd service (macOS)
Usage
hack daemon uninstall [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack update
Update hack to the latest release
Usage
hack update [options]Downloads and installs the latest stable hack release from GitHub.
Notes:
- Refuses to self-update when running from a Homebrew install, local dev wrapper, or symlink install.
- Updates the current hack binary and refreshes assets.
Options
| Option | Description |
|---|---|
--check | Check for updates (do not install) |
--yes | Apply update without prompting |
--tag <tag> | Update to a specific release tag (e.g. v1.4.0) |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack version
Print version
Usage
hack version [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack help [path...]
Show help for a command (e.g. hack help global logs)
Usage
hack help [path...] [options]Arguments
| Arg | Description |
|---|---|
path |
Options
| Option | Description |
|---|---|
--all | Include experimental (unsupported) commands in help output |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
Agents
hack mcp
Manage MCP server integrations for coding agents
Usage
hack mcp <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack mcp serve | Run the MCP server over stdio |
hack mcp install | Install MCP config for supported clients |
hack mcp print | Print MCP config snippets |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack mcp serve
Run the MCP server over stdio
Usage
hack mcp serve [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack mcp install
Install MCP config for supported clients
Usage
hack mcp install [options]Options
| Option | Description |
|---|---|
| `--scope <user | project>` |
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--all | Target all supported clients |
--cursor | Target Cursor MCP config |
--claude | Target Claude CLI MCP config |
--codex | Target Codex MCP config |
--docs | Update AGENTS.md and CLAUDE.md with hack usage |
--agents-md | Update AGENTS.md with hack usage |
--claude-md | Update CLAUDE.md with hack usage |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack mcp print
Print MCP config snippets
Usage
hack mcp print [options]Options
| Option | Description |
|---|---|
| `--scope <user | project>` |
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--all | Target all supported clients |
--cursor | Target Cursor MCP config |
--claude | Target Claude CLI MCP config |
--codex | Target Codex MCP config |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack setup
Install integrations for coding agents
Usage
hack setup <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack setup tmux | Install the recommended tmux binding for hack workspaces |
hack setup cursor | Install Cursor rules for hack CLI usage |
hack setup claude | Install Claude Code hooks for hack CLI usage |
hack setup codex | Install Codex skill for hack CLI usage |
hack setup agents | Install AGENTS.md / CLAUDE.md snippets for hack CLI usage |
hack setup sync | Refresh project/global agent guidance |
hack setup mcp | Install MCP configs for hack CLI usage (no-shell only) |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack setup tmux
Install the recommended tmux binding for hack workspaces
Usage
hack setup tmux [options]Options
| Option | Description |
|---|---|
--check | Check whether integration is installed |
--remove | Remove integration files/config |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack setup cursor
Install Cursor rules for hack CLI usage
Usage
hack setup cursor [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--global | Use global (user) scope instead of project scope |
--check | Check whether integration is installed |
--remove | Remove integration files/config |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack setup claude
Install Claude Code hooks for hack CLI usage
Usage
hack setup claude [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--global | Use global (user) scope instead of project scope |
--check | Check whether integration is installed |
--remove | Remove integration files/config |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack setup codex
Install Codex skill for hack CLI usage
Usage
hack setup codex [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--global | Use global (user) scope instead of project scope |
--check | Check whether integration is installed |
--remove | Remove integration files/config |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack setup agents
Install AGENTS.md / CLAUDE.md snippets for hack CLI usage
Usage
hack setup agents [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--all | Target all supported clients |
--agents-md | Target AGENTS.md |
--claude-md | Target CLAUDE.md |
--check | Check whether integration is installed |
--remove | Remove integration files/config |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack setup sync
Refresh project/global agent guidance
Usage
hack setup sync [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--global | Use global (user) scope instead of project scope |
--all-scopes | Target both project and global (user) scopes |
--check | Check whether integration is installed |
--remove | Remove integration files/config |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack setup mcp
Install MCP configs for hack CLI usage (no-shell only)
Usage
hack setup mcp [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--global | Use global (user) scope instead of project scope |
--all | Target all supported clients |
--cursor | Target Cursor integration |
--claude | Target Claude integration |
--codex | Target Codex integration |
--check | Check whether integration is installed |
--remove | Remove integration files/config |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack agent
Agent utilities
Usage
hack agent <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack agent prime | Print agent primer text |
hack agent patterns | Print agent init patterns guide |
hack agent init | Print agent init prompt |
hack agent onboard | Print the project onboarding prompt (agent-assisted setup) |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack agent prime
Print agent primer text
Usage
hack agent prime [options]Options
| Option | Description |
|---|---|
--check | Include a read-only project and global integration inventory |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack agent patterns
Print agent init patterns guide
Usage
hack agent patterns [options]Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack agent init
Print agent init prompt
Usage
hack agent init [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
| `--client, -c <cursor | claude |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack agent onboard
Print the project onboarding prompt (agent-assisted setup)
Usage
hack agent onboard [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
Secrets & env
hack secrets
Manage secrets in OS keychain (Bun.secrets)
Usage
hack secrets <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack secrets set [name] | Store a secret |
hack secrets get [name] | Print a secret (exit 1 if missing) |
hack secrets delete [name] | Delete a stored secret |
Options
| Option | Description |
|---|---|
--service <service> | Override Bun.secrets service name (default: hack-cli) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack secrets set [name]
Store a secret
Usage
hack secrets set [name] [options]Arguments
| Arg | Description |
|---|---|
name |
Options
| Option | Description |
|---|---|
--service <service> | Override Bun.secrets service name (default: hack-cli) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack secrets get [name]
Print a secret (exit 1 if missing)
Usage
hack secrets get [name] [options]Arguments
| Arg | Description |
|---|---|
name |
Options
| Option | Description |
|---|---|
--service <service> | Override Bun.secrets service name (default: hack-cli) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack secrets delete [name]
Delete a stored secret
Usage
hack secrets delete [name] [options]Arguments
| Arg | Description |
|---|---|
name |
Options
| Option | Description |
|---|---|
--service <service> | Override Bun.secrets service name (default: hack-cli) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
Integrations
hack env
Set project env vars and local secrets
Usage
hack env <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack env list | List resolved env values for the selected overlay |
hack env explain <key> | Explain a resolved env value without revealing it |
hack env apply | Recreate one service with its resolved env |
hack env add [key] [value] | Add or update an env value |
hack env set [key] [value] | Alias for env add |
hack env materialize | Write a compatibility .env file from the selected overlay |
hack env exec [command...] | Run a host command with project env injected |
hack env shell | Open a host shell with project env injected |
hack env unset [key] | Remove an env value from the canonical config |
hack env backend | Manage env/secret storage backend strategy |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env list
List resolved env values for the selected overlay
Usage
hack env list [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--json | Output JSON (machine-readable) |
--show-secrets | Print secret values (keychain) in plaintext |
| `--service <global | service>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env explain <key>
Explain a resolved env value without revealing it
Usage
hack env explain <key> [options]Arguments
| Arg | Description |
|---|---|
key |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--json | Output JSON (machine-readable) |
| `--service <global | service>` |
| `--target <host | compose>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env apply
Recreate one service with its resolved env
Usage
hack env apply [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--json | Output JSON (machine-readable) |
| `--service <global | service>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env add [key] [value]
Add or update an env value
Usage
hack env add [key] [value] [options]Arguments
| Arg | Description |
|---|---|
key | |
value |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--secret | Store value as an encrypted secure entry |
--local | Write to the worktree-local env override file instead of the shared repo env file |
| `--service <global | service>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env set [key] [value]
Alias for env add
Usage
hack env set [key] [value] [options]Arguments
| Arg | Description |
|---|---|
key | |
value |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--secret | Store value as an encrypted secure entry |
--local | Write to the worktree-local env override file instead of the shared repo env file |
| `--service <global | service>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env materialize
Write a compatibility .env file from the selected overlay
Usage
hack env materialize [options]Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
| `--service <global | service>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env exec [command...]
Run a host command with project env injected
Usage
hack env exec [command...] [options]Inject the selected Hack env overlay directly into a one-off host command without materializing .hack/.env. To inspect a value, prefer printenv KEY or sh -lc 'printf "%s\n" "$KEY"'; echo $KEY expands in your current shell before Hack injects env.
Arguments
| Arg | Description |
|---|---|
command |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
| `--service <global | service>` |
| `--target <host | compose>` |
--shell <command> | Run a shell command string via /bin/sh -lc after env injection so $VAR expansion happens inside the child shell |
--timeout <seconds> | Bound a non-TTY host command; terminate its process group and return 124 on expiry |
| `--lifetime <command | persistent>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env shell
Open a host shell with project env injected
Usage
hack env shell [options]Start an interactive host shell with the selected Hack env overlay injected into the process environment.
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
| `--service <global | service>` |
| `--target <host | compose>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env unset [key]
Remove an env value from the canonical config
Usage
hack env unset [key] [options]Arguments
| Arg | Description |
|---|---|
key |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
--local | Write to the worktree-local env override file instead of the shared repo env file |
| `--service <global | service>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack env backend
Manage env/secret storage backend strategy
Usage
hack env backend <subcommand> [options]Subcommands
| Command | Summary |
|---|---|
hack env backend status | Show configured env/secret backend strategy |
hack env backend use <backend> | Select env/secret backend strategy |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack host
Run host-side commands with project env injected
Usage
hack host <subcommand> [options]Use hack host when a command should run on your host machine, not inside the compose network, but still needs Hack-resolved env and host-local rewrites.
Subcommands
| Command | Summary |
|---|---|
hack host ps | Inspect host command lifetimes, CPU and lifecycle ownership (read-only) |
hack host exec [command...] | Run a host command with project env injected |
hack host shell | Open a host shell with project env injected |
Options
| Option | Description |
|---|---|
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack host ps
Inspect host command lifetimes, CPU and lifecycle ownership (read-only)
Usage
hack host ps [options]Options
| Option | Description |
|---|---|
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
--json | Output JSON (machine-readable) |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack host exec [command...]
Run a host command with project env injected
Usage
hack host exec [command...] [options]Run a one-off command on the host with the selected Hack env overlay injected. Use --scope when you want service-scoped values without running inside that service container. To inspect a value, prefer printenv KEY or sh -lc 'printf "%s\n" "$KEY"'; echo $KEY expands in your current shell before Hack injects env.
Arguments
| Arg | Description |
|---|---|
command |
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
| `--scope <global | service>` |
| `--target <host | compose>` |
--shell <command> | Run a shell command string via /bin/sh -lc after env injection so $VAR expansion happens inside the child shell |
--timeout <seconds> | Bound a non-TTY host command; terminate its process group and return 124 on expiry |
| `--lifetime <command | persistent>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
hack host shell
Open a host shell with project env injected
Usage
hack host shell [options]Start an interactive host shell with the selected Hack env overlay injected. Use --scope when you want service-scoped values without running inside that service container.
Options
| Option | Description |
|---|---|
--path, -p <dir> | Run a project command against a repo path (overrides cwd search) |
--project <name> | Target a registered project by name (from ~/.hack/projects.json) |
| `--env <name | base>` |
| `--scope <global | service>` |
| `--target <host | compose>` |
--no-interactive | Never prompt: apply documented defaults or fail with E_INTERACTIVE_REQUIRED (also via HACK_NO_INTERACTIVE=1) |
--help, -h | Show help |
--version, -v | Show version |
Source: v4.2.4 · docs/reference/cli.md.