Guide · make
Makefile target autocomplete, with your ## help as descriptions
Last checked 19 November 2026
In short: type make and Termhint's popup lists the targets of the Makefile in the folder you are in, in file order. If your Makefile follows the common self-documenting style, the ## help becomes each target's description and ##@ lines name its section. Targets tagged [prod] or [danger] show in red. Termhint reads the Makefile as text and never runs it.
A Makefile and what the popup lists
This Makefile:
.PHONY: help dev test lint deploy db-reset
##@ Development
dev: ## Start the app with live reload
npm run dev
test: ## Run the test suite
npm test
lint: ## Check formatting and types
npm run lint
##@ Release
deploy: build ## [prod] Deploy to production
./scripts/deploy.sh
db-reset: ## [danger] Drop and recreate the local database
./scripts/db-reset.sh
# Build the release bundle
build:
npm run build
gives this list (real output of termhint complete, the command the popup is built from; options left out):
$ termhint complete "make "
script dev Development · Start the app with live reload
script test Development · Run the test suite
script lint Development · Check formatting and types
script deploy Release · Deploy to production
script db-reset Release · Drop and recreate the local database
script build Release · Build the release bundle
In the popup, deploy and db-reset show in red with a warning sign: their help starts with [prod] and [danger]. The tag itself is left out of the description. .PHONY is not a target you run, so it isn't listed.
The rules
- Descriptions. The text after
##on the rule's line. Without it, the#comment lines just above the rule, as forbuildabove. - Sections. A
##@ Sectionline puts its name in front of the descriptions of every target after it, until the next##@line. - Red targets. Help that starts with
[prod],[production],[danger]or[caution](any case) marks the target as dangerous. - Which Makefile. The one make would read in the folder you are in:
GNUmakefile,makefile, thenMakefile. Folders above are not searched. - Includes. Files named in
include(or-include) by a plain relative path are read too, one level deep. - Not listed. Targets made from variables or patterns (
$(OUT),%.o) need make to expand them; special targets such as.PHONYaren't run by hand.
The targets are kept until the Makefile or a file it includes changes, so a keystroke costs a file check.
Read as text, never run
Fig's make completion ran make -qp, which evaluates the Makefile: a $(shell …) call in it runs whatever a project put there, including a project you just cloned. Termhint reads the file as text instead, only when it is a regular file under a size limit. Nothing in it runs until you press Enter on make yourself.
Where it works
Termhint is a Mac app (macOS 14 or later, Apple silicon) for zsh. The popup shows in the terminals on the terminals page, and inside tmux, its split panes too. make's own options complete with descriptions like the other zsh autocomplete suggestions, and the same popup lists git branches, ssh hosts and Docker containers and images. npm run, yarn, pnpm and bun list your package.json scripts the same way.
FAQ
How do I give a make target a description?
Put ## and the text after the rule, as in deploy: build ## Deploy to production. Without ##, the # comment lines just above the rule are used. A ##@ Section line puts the section's name in front of the descriptions of the targets after it.
How do I mark a target as dangerous?
Start its help with [prod], [production], [danger] or [caution]. The popup shows that target in red with a warning sign, and leaves the tag itself out of the description.
Does Termhint run make or my Makefile?
No. It reads the Makefile as text. Asking make for its targets evaluates the Makefile, and a $(shell …) call in it can run anything, so Termhint never does.
Why is one of my targets missing?
Targets whose names come from variables or patterns, such as $(OUT) or %.o, need make to expand them and are not listed; neither are special targets like .PHONY. Only the Makefile in the folder you are in is read, plus files it includes by a plain relative path.
What it costs
Every feature works for 7 days with no account and no card. After that, a one-time license: $11.99 for 1 Mac, $19.99 for 3, $29.99 for 5, plus VAT or sales tax where it applies (pricing).