Skip to content
hokan

Completion sources

Understand the context Hokan combines and how suggestions are ranked.

Hokan merges independent providers into one ranked list. A suggestion can come from the current shell, the project around it, or an explicit AI action.

SourceExamples
Shell historyzsh, bash, and fish history with fuzzy search and failure penalties
Command specsBuilt-in recipes, flags, subcommands, argument slots, and risk levels
Help pagesDocumented flags and subcommands from help and man pages, supplementing built-in recipes
FilesystemFiles, directories, executable scripts, quoting, spaces, and Unicode paths
Project metadatanpm, pnpm, yarn, bun, Deno, Cargo, Make, just, and workspace members
Git stateContextual init, clone, status, add, commit, push, and pull
Shell definitionsAliases, functions, abbreviations, and inferred argument slots
System stateRunning processes, PIDs, and network interfaces
AI actionAn explicit OpenAI-compatible request selected by you

Suggestions are inserted into the command line for review. The ranking layer can prefer a recent successful command, a project script, or an argument that fits the current slot without taking execution away from you.

The list keeps all matching candidates by default and shows them in pages. Arrow keys and PageUp/PageDown wrap at both ends. An exact command or subcommand does not hide longer names sharing its prefix. Slower providers continue adding results after the first batch; an explicit completion.max_candidates limit can still cap the final list.

Help-based discovery follows the installed CLI's command tables and nested scopes. It accepts commands with no description, single-space columns, long names, grouped sections, and colored or hyperlinked help text. Cargo's installed command list supplements its abbreviated root help, so installed extensions can also appear. Python module recommendations keep all discovered matches rather than stopping at 500.

Help probes run in the background with bounded time and output. A CLI that does not document its commands in a recognized format may still need a command specification; an explicitly abbreviated help table is not treated as an exhaustive list for validating history.