DEV Community

Alessio Leodori
Alessio Leodori

Posted on

Why terminal autocomplete is still terrible (and what I built instead)

Terminal autocomplete hasn’t really evolved.

It’s still:

  • prefix-based
  • fragile to typos
  • unaware of how you actually work

It’s fast, sure. But it’s not helpful.

The problem with terminal autocomplete

Most shells do one thing well:

👉 complete what you already started typing

That’s it.

If you type:

dokcer logs
Enter fullscreen mode Exit fullscreen mode

You get nothing.

If you type:

docker rec
Enter fullscreen mode Exit fullscreen mode

You also get nothing.

Even though:

  • you meant docker
  • you probably ran docker logs 100 times before

The shell doesn’t care.

It doesn’t learn.
It doesn’t adapt.
It just matches prefixes.

What I wanted instead

I wanted something that:

  • learns from my actual command history
  • fixes typos automatically
  • understands intent, not just prefixes
  • stays instant (no lag while typing)

So I built a different kind of autocomplete.

A better autocomplete (Agensic Autocomplete)

Instead of treating commands as static strings, I treat them as patterns.

That enables things like:

  • dokcerdocker
  • docker recordsdocker logs

And importantly:

👉 it stays local-first and fast

agensic autocomplete

AI is only used as a fallback when your history isn’t enough.

Most of the time, suggestions come from:

  • your own repo-aware past commands, ranked on usage
  • semantic matching
  • typo correction

It feels closer to an IDE than a shell.

But autocomplete wasn’t the real problem

Once I started using AI agents in the terminal (Codex CLI, Claude Code, etc...), I realized something else:

Autocomplete helps you write commands.

But it doesn’t help you understand what actually happened.

The missing layer: command provenance (Agensic Provenance)

When an agent runs commands for you, things get blurry fast.

Shell history doesn’t track commands ran by agents, it's as if they are acting in a black box.

So I added a provenance layer.

Every command gets classified and tracked:

  • HUMAN_TYPED
  • AI_SUGGESTED_HUMAN_RAN
  • AI_EXECUTED
  • etc.

And for agent-executed commands, there’s cryptographic proof.

So instead of guessing:

👉 you get a clear, auditable timeline of what actually ran and why

agensic provenance

Then came sessions (Agensic Sessions)

The next problem showed up quickly:

Even if you know what ran…

👉 you still can’t easily reconstruct the full session

So I added session tracking.

Now you can:

  • replay entire terminal sessions
  • inspect command timelines
  • export runs for debugging or incident review

agensic sessions

And the most useful feature:

Time travel for your repo

You can jump back to the exact state your repository was in at a specific moment.

Not “roughly what I remember”
Not “git reflog archaeology”

👉 the exact state tied to a session checkpoint

Putting it together

What started as “better autocomplete” turned into something else:

  • autocomplete → helps you write faster
  • provenance → helps you understand what happened
  • sessions → help you reconstruct and debug

Because once AI agents enter the terminal:

👉 speed is no longer the bottleneck
👉 understanding is

Final thoughts

Terminal tooling hasn’t really caught up with how we work today.

We’re no longer:

  • just typing commands
  • just running scripts

We’re:

  • collaborating with agents
  • delegating execution
  • moving faster than we can track

And without visibility, that breaks down quickly.

If you’re curious

I open sourced the project here:
👉 https://github.com/Alex188dot/agensic

Would love feedback, especially from people using AI agents in the terminal.

Top comments (0)