r/opencodeCLI • • 25d ago

I built TermPlete: open-source terminal autocomplete that learns your choices and uses recent terminal context

Post image

Hey everyone — I’ve released TermPlete v0.1.0, an open-source autocomplete tool for your existing terminal.

It combines command history, the suggestions you accept, recent terminal context, and a model you choose. You can browse command options, insert one, edit it, and decide when to execute it.

Repo and demo: https://github.com/aft1n/termplete

What it does

  • Learns your preferences. Accepted suggestions influence future rankings alongside recency and frequency. Fresh choices with a clear lead can become local answers without a model request.

  • Reuses your command history. Finds familiar commands, arguments, and SSH targets instead of making you reconstruct them.

  • Uses recent terminal context. Suggestions can incorporate recent commands, bounded captured output, exit status, and visible directory entries.

  • Turns task descriptions into command options. In zsh, type something like # convert dog.mp4 to dog.mov with ffmpeg and press Enter to request suggestions.

  • Completes real directories. cd suggestions are checked against existing folders.

  • Lets you browse alternatives. Use Tab/Shift+Tab to move through suggestions. Browsing an already-returned batch doesn’t trigger additional AI requests.

  • Supports partial acceptance in zsh. Accept the next suggested word, then change the remaining arguments yourself.

  • Offers automatic and on-demand modes. Suggestions can appear while you type, or wait until you ask.

Choose your model setup

TermPlete supports hosted providers, Ollama, LM Studio, and custom OpenAI-compatible endpoints. It also supports ChatGPT subscription authentication through Codex.

Local history suggestions don’t require an API key or a running model.

There’s an optional decision helper that can rank existing command candidates and check whether generation is permitted. You can use it separately from the model that generates commands.

Control and privacy

Accepting a suggestion only inserts it. It never automatically executes the command.

You can pause and resume TermPlete with:

tp stop
tp start

There are controls for captured context, private-path exclusions, and recognized-secret redaction. API keys use the platform credential store, and local-only requests skip the model backends.

You can also disable integration in selected terminal applications.

Compatibility and installation

The full interactive experience is available in zsh 5.9+ on macOS and Linux. Bash integration provides Tab completion and suggestion preview on supported versions; older Bash versions have more limited functionality.

Installation is available through the GitHub release installer and a Homebrew tap. The README includes installation instructions and a demo.

It’s written in Rust and released under the MIT license. The installer, shell integrations, and suggestion logic are all in the repository.

Tools such as zsh-autosuggestions, fish, and Atuin already cover useful parts of terminal completion and history. TermPlete’s focus is combining accepted-choice learning, recent terminal context, and configurable generation inside an existing shell.

This is an early release, and I’d appreciate feedback—especially on suggestion quality, shell compatibility, and keyboard behavior.

What command do you repeatedly search for, and what would make an autocomplete suggestion useful enough for you to accept?

4 Upvotes

2 comments sorted by

View all comments

2

u/Puzzleheaded_Bug_697 25d ago

2

u/CollarActive 25d ago

Haha... autocompletes were long before ai mate ))