Tiny, local-only directory autocomplete for zsh.
dx watches directories you visit, keeps a small background index, and shows a
terminal-native list while you type cd .... Press Tab/Shift-Tab to cycle,
then Enter to open the selected directory.
% cd ~/dev/s
dx directories
› ~/dev/sites
~/dev/services
Tab next · Shift-Tab previous · Enter open
Modern terminal autocomplete is excellent, but the useful directory layer does
not need a large AI application. dx isolates that job in one small binary and
one zsh hook.
- one self-contained Go binary;
- shared background daemon over a user-private Unix socket;
- filesystem-prefix and frequency/recency ranking;
- terminal-native menu; no Accessibility permission or macOS input method;
- no network, account, telemetry, AI model, or secret access;
- Linux and macOS; zsh 5.8+;
- MIT licensed.
dx is an independent implementation. It does not copy or embed code from
Kiro, Fig, Amazon Q, or another proprietary autocomplete product. The menu is
terminal-native rather than an operating-system floating overlay.
Requirements: Go 1.22+, zsh 5.8+.
git clone https://github.com/dmdfami/dx.git
cd dx
make test e2e
make install
exec zshThen type:
cd ~/dev/dx daemon start|stop|status
dx add /path
dx query --plain web
dx init zsh
dx doctor
dx version
- State:
${XDG_STATE_HOME:-~/.local/state}/dx/state.json - Socket:
${XDG_RUNTIME_DIR:-/tmp/dx-$UID}/dx/dx.sock - Log:
${XDG_STATE_HOME:-~/.local/state}/dx/daemon.log
The daemon accepts only a tiny JSON protocol, caps request sizes, validates
existing directories, binds a Unix socket with mode 0600, and never executes
stored paths as commands.
bash scripts/uninstall.sh # keep ranking state
bash scripts/uninstall.sh --purge # remove state toogo test ./...
bash test/e2e.shThe E2E test starts an isolated daemon, validates socket permissions and ranking,
opens a real zsh through a pseudo-terminal, checks that the live menu is drawn,
and uses Tab + Enter to change directory.