Completion System

Fast, smart, no config needed.

Three-tier architecture

Hash tries completers in priority order:

TierSourceLatencyExample
1Tool-native (Cobra)10–200mskubectl get po<TAB> → pods
2Filesystem<10ms./sr<TAB>./src/
3Agent fallback200–800msComplex context-aware completions

How it works

  1. Parse current word and cursor position
  2. Try Tier 1: Run tool __complete args... if tool supports Cobra
  3. Try Tier 2: List matching files/directories
  4. Try Tier 3: Ask agent (if configured and no results yet)
  5. Return first non-empty result

Supported tools (Tier 1)

Any tool built with Cobra that supports __complete:

  • kubectl, helm
  • docker, podman
  • aws, gcloud, az
  • terraform
  • And many more...

File completion details

  • Tilde expansion: ~/ → home directory
  • Hidden files: shown if prefix starts with .
  • Directory indicator: / appended
  • Preserves ./ prefix (e.g., ./src<TAB>./src/)

Fuzzy matching

When enabled, completion items are fuzzy-filtered by subsequence matching:

  • idx matches index.js, index.html
  • mnts matches main_test.go
config.toml
[completions]
fuzzy = true

Icons

File type icons (requires Nerd Font):

  • .go → Go gopher
  • .py → Python
  • .js/.ts → JavaScript/TypeScript
  • Directories → folder icon
config.toml
[completions]
file_icons = true # default