This is a Prototype feature. A Prototype feature is something we are still actively iterating and gathering feedback on, without guarantees on what the end state looks like. Read more on our philosophy of Prototype features here.
Background on the Terminal and Motivation
For the first year of Codeium, we were focused on the IDE experience, creating the most advanced autocomplete and chat systems to help accelerate workflows centered around writing code. But software engineers do a lot more than write code, and spend a lot of time outside of the standard code editor. Our goal at Codeium has always been to help accelerate every part of the software development life cycle with AI, and very quickly, we focused on the terminal as the next logical surface.
The terminal is a crucial part of the developer’s experience. We use the terminal to execute code, do source code management, inspect logs and infrastructure, and much, much more. Clearly, there would be a lot of value in accelerating a developer’s experience in the terminal. However, in classic Codeium fashion, we wanted to make sure we could use AI in a way that helps consistently and keeps the developer in the loop.
We realized there were a number of simple boilerplate patterns that developers do repetitively. When pushing local edits, we often use git status to know which files to git add, and use git diff to know what commit message to write with git commit -m. Could we use AI to autocomplete the files to add or the commit message to write? Or when inspecting kubernetes pods, there are always some copy-pastes to get the right pod name to call kubectl logs on (usually the result of a kubectl get pods call on a namespace). Could we autocomplete the pod and namespace names in these commands? These kinds of ideas seemed achievable and more importantly, able to be productionized.
Termium
So what happens when we combine the AI powers of Codeium with the terminal? Termium. (yes, we are leaning into the naming).
We knew we did not want to come up with a new type of terminal. Just like with IDEs, we believe in meeting developers where they are. We will have more technical details on how we achieved this, but Termium essentially acts as a layer between you and your existing terminal. This allows us to intercept both keystrokes from the user and outputs from the terminal execution, as well as add UI elements, such as the gray “ghost text” that developers have gotten to love within the editor for autocomplete.
Termium autocomplete works by looking at the history of your past commands, as well as the outputs of them, to help autocomplete your current command, perhaps after you have typed the start of said command. It is the same autocomplete experience as in the editor, where you use the Tab key to complete the suggestion if you like it, or just keep typing (or press Esc) if you want to ignore.
The results actually came pretty quickly. Our internal Codeium team was hooked in days. The source code management process mentioned earlier? Simplified:
Looking through kubernetes logs? No more copy-pasting:
The more we played with it, the more we discovered how powerful it is, helping us remember flags or commands that we normally would search for:
Getting Started
To install Termium, simply run the following in your existing terminal:
curl -L https://github.com/Exafunction/codeium/releases/download/termium-v0.2.0/install.sh | bash
and follow the instructions it prints. Once you install Termium, you need to start a new terminal session for it to take effect. Termium is currently supported on MacOS and Linux.
Comparisons
The simple reality is that no one else is doing autocomplete in the terminal. Some others, such as GitHub Copilot, are trying to do chat in the terminal, but we tried it, and it wasn’t that useful. We are much more often running commands that we already know, just need to populate the arguments with the relevant information at the time, and that is where autocomplete excels. And if you really want to instruct for a brand new command using natural language, you could just use the quick hack echo "[natural language description]" and autocomplete will be able to pull the echoed description as context for the next suggestion (we used this in both the kubectl and discovery examples earlier). Chat in the terminal makes for a nice demo, but in reality, doesn’t drive that much value because it addresses a small sliver of what developers need and it requires developers to change their habits to remember to use the tool.
Looking Forward
To be very clear, Termium is still in alpha. There is a lot of polish to be done, and we are sure there are places where it conflicts with existing systems and expectations. We would love if you would join the #discussion-termium channel on our Discord to provide feedback.
That being said, autocomplete is just the start of Termium. When we developed in-IDE chat, we realized that having both AI in the editor and AI in a chat panel, while useful separately, were significantly more powerful together. By owning multiple “surfaces” of the developer experience, we can drive value that is compounding rather than additive. For example, it isn’t hard to imagine that Termium can intercept stack traces, which we can then explain in the chat panel and use as context for autocomplete suggestions in the editor. These kinds of integrated workflows are what excite us moving forwards.