Skip to main content
Command hints know git, npm, docker and hundreds of other tools out of the box. For anything else, such as a personal script, an internal tool or a brand-new CLI, you describe the command once in a spec file and the hints work for it from then on.

Add a spec

  1. Create the folder ~/.coder/completions/ if it doesn’t exist. (Dev builds of Coder use ~/.coder-dev/completions/.)
  2. Save a JSON file named after the command, exactly as you type it: the spec for devscan is devscan.json.
  3. Open a Coder terminal and type the command followed by a space.
There is nothing to restart. Coder re-reads the file whenever it changes, so you can edit it while a terminal is open and see the result on the next keystroke.
You don’t have to write the file by hand. Install the coder-command-hints skill from the coder-skills repo (it syncs into ~/.coder/skills/ with the other default skills, and works in Claude Code and Codex too), then ask your AI agent to “write Coder terminal hints for mytool”. It reads the tool’s --help output, writes the spec, and checks it with the skill’s validator.

A small example

With that saved as mytool.json:
  • mytool lists scan and deploy (and ship, the alias).
  • mytool scan -- lists --path and --verbose, because --verbose is marked persistent and applies in every subcommand.
  • mytool scan --path lists the folders in your current directory.
  • mytool deploy lists staging and production.

Reference

A generators script may only run the same command you are typing (mytool in the example), and it runs as you type, so keep it quick. Results are cached for a few seconds.
The format is a subset of the open Fig autocomplete spec format, so specs from that project work here if they are plain data (no functions).

Built-in specs

A spec in your completions folder replaces the built-in one of the same name. Use that to trim a noisy built-in list, or to add your own subcommands. Delete the file to go back to the built-in.

Cloud CLIs: aws, gcloud and az

To keep the app small, the huge subcommand trees for the AWS CLI (aws), Google Cloud (gcloud) and Azure CLI (az) are not bundled. Typing aws , gcloud or az still lists the services or command groups, but hints stop below that level (aws s3 and az vm show nothing). If you want hints for one of them, ask your AI agent to use the coder-command-hints skill to generate a spec for the part you use, for example “write Coder terminal hints for the aws s3 and aws ec2 commands”. Keep it to the services you actually run: your file replaces the built-in spec for that command, so anything you leave out is no longer suggested.

If hints don’t show up

  • The file name must match the command exactly. Mytool.json won’t match mytool.
  • The JSON must be valid. No comments, no trailing commas. Coder ignores a file it can’t parse and writes a line about it to the app log. Check it with node -e "JSON.parse(require('fs').readFileSync('mytool.json','utf8'))".
  • Hints only work in zsh and bash terminals opened inside Coder, and only when Settings > General > Terminal > Command hints is on.
  • A flag that takes a value but has no args makes the next word complete as a flag instead of a value, and the reverse for a switch that has args.