Inline Tab autocomplete for the prompts you type into terminal coding agents — Claude Code, Codex, or any CLI. As you type, a grey ghost-text suggestion appears right after your cursor. Press Tab to accept, keep typing to ignore.
❯ add a dark mode toggle␣that persists the preference in localStorage
└ you typed ──────────┘ └─ grey ghost text, press Tab ──────────────┘
Terminal agents own their input box — there's no plugin hook for autocomplete. acomplete wraps the agent in a pseudo-terminal, watches what you type, and renders context-aware suggestions inline. It works with any terminal program; it's tuned for coding agents.
- Inline ghost text — dim suggestion at the cursor, not a popup.
- Context-aware — uses your partial prompt, the recent conversation on screen, and your installed Claude Code skills.
- One key —
Tabaccepts the whole suggestion,→accepts one word,Shift+Backspaceundoes the last accept, typing dismisses. - Rephrase in place —
Ctrl+Rrewrites your whole prompt to be clearer;Shift+Backspaceputs the original back. - Zero-setup auth — reuses your existing Claude Code login by default. No API key needed.
- Bring your own model — or plug in Anthropic / DeepSeek / OpenAI / Gemini.
- Never in your way — on any error it degrades to a plain transparent passthrough.
npm install -g acompleteOr straight from GitHub:
npm install -g github:dilyorm/autocompleteRequires Node ≥ 18.
Wrap any agent:
acomplete claude # Claude Code
acomplete codex # Codex
acomplete <anything> # any CLIType a prompt, pause briefly, and a grey suggestion appears. Tab to accept.
| Key | Action |
|---|---|
Tab |
accept the whole suggestion |
→ (Right arrow) |
accept one word |
Ctrl+R |
rephrase the whole prompt in place |
Shift+Backspace |
undo the last accept / rephrase |
| keep typing | dismiss / refine |
acomplete config # show current config
acomplete config <key>=<value> ... # set values| Key | Values | Default |
|---|---|---|
mode |
auto · free · byo |
auto |
provider |
anthropic · deepseek · openai · gemini |
anthropic |
apiKey |
your provider key (for byo) |
– |
model |
model id (blank = a fast default) | – |
debounceMs |
ms of idle before suggesting | 400 |
Auth modes
auto(default) — reuses the Claude Code login token in~/.claude/.credentials.jsonto call a fast model. Zero setup.byo— your own provider key:acomplete config mode=byo provider=deepseek apiKey=sk-... model=deepseek-chat
free— a hosted, rate-limited proxy (setproxyUrl). (optional / self-host)
your keyboard ──▶ acomplete (PTY wrapper) ──▶ agent (claude / codex)
│ mirrors your prompt buffer from keystrokes
│ debounced call to a fast model for a completion
▼
grey ghost text drawn at the cursor; Tab injects it
It mirrors your input from raw keystrokes (decoding Windows win32-input-mode records), so it never has to parse the agent's screen. Suggestions come from a separate fast model call — the agent's own loop is too slow for live completion.
Shift+Backspaceundo needs a terminal that reports key modifiers (Windowswin32-input-mode, kitty, or xtermmodifyOtherKeys). On terminals that don't, it falls back to a plain backspace.- The ghost is truncated to the current row rather than wrapping, so it never collides with the agent's own footer.
automode reuses the Claude Code login token — convenient but undocumented; it falls back silently if the token is missing or rejected.- Bracketed-paste and Ctrl-modified characters are best-effort in the buffer mirror.
- Self-hostable free-tier proxy
- Demo (see
docs/demo.svg)
Issues and PRs welcome. Run the tests:
npm testDebug log (writes to ~/.acomplete/debug.log):
ACOMPLETE_DEBUG=1 acomplete claudeMIT © dilyorm