hammerkit

ls

Inspect the tasks and services available in a build file.

ls prints every task and service hammerkit can see, including the ones pulled in through references and includes. It's the fastest way to understand a repo you just cloned — before guessing task names.

hammerkit ls

Example output

Services:
• postgres
   ports: 127.0.0.1:5432 -> 5432
   image: postgres:16-alpine

Tasks:
• install
   image: node:24-alpine
   labels: stage=build
   src: package.json package-lock.json
   generates: node_modules
• api
   needs: postgres
   deps: install
   image: node:24-alpine
   labels: stage=run app=example
   src: index.js config.json package.json package-lock.json
   generates: node_modules

Each entry shows the image (or nothing, for a local task), labels, sources, generated outputs, and the deps/needs wiring — the same fields you set in the build file.

JSON

--json prints the same tasks and services as JSON, for scripts and agents:

hammerkit ls --json
{
  "tasks": [
    {
      "name": "test",
      "description": "run the unit tests",
      "type": "container-task",
      "image": "node:24-alpine",
      "deps": ["install"],
      "needs": [],
      "labels": {},
      "command": "npx vitest run"
    }
  ],
  "services": [
    {
      "name": "api",
      "description": "",
      "type": "container-service",
      "image": "node:24-alpine",
      "ports": [{ "host": 3000, "container": 3000 }],
      "labels": { "app": ["api"] },
      "command": "node server.js"
    }
  ]
}

command is the task's last command, or the service's cmd: where arguments after -- are appended. It is null when there is none.

Options

Options:
  -f, --filter <labels...>   filter task and services with labels
  -e, --exclude <labels...>  exclude task and services with labels
  --json                     emit the tasks and services as JSON (default: false)
  -h, --help                 display help for command

The label options take key=value pairs, so you can scope the listing to one part of a monorepo, for example hammerkit ls -f project=api. See labels.

On this page