AI has lastly began to trickle into the Linux command line. Because of the likes of Ollama, this actuality is now not avoidable: it is right here, and it isn’t going wherever. That is to not say you have to make use of AI in your Linux terminal, however you can. For individuals who profit from AI and sometimes use the Linux Command Line Interface (CLI), the mixture of the 2 could be a very highly effective productiveness enhance.
Sure, you may get the facility of Gemini AI immediately in your Linux terminal.
Gemini CLI is a domestically put in software that can be utilized for a variety of duties, resembling content material era, downside fixing, deep analysis, and even job administration. Though the unique focus of Gemini CLI was on builders, it can be utilized by finish customers who need to entry AI with out having to make use of an online browser or a third-party GUI.
The issue with Gemini CLI is that it is a bit difficult to put in. Fortuitously, I am right here that will help you with that.
set up Gemini CLI on Ubuntu
What you may want: The one belongings you’ll want are a working occasion of Ubuntu Linux (or a distribution based mostly on Ubuntu), a consumer with sudo privileges, and a working Google account. Ensure you’ve already signed in to your Google account together with your default net browser earlier than working Gemini CLI for the primary time.
The very first thing to do is open your default terminal window app.
Present extra
Subsequent, we’ll set up Node.js (as a result of Gemini CLI is put in with the Node.js package deal supervisor, npm). To put in Node.js, concern the command:
Present extra
sudo apt-get set up nodejs -y
Now, we will set up NPM with the command:
Present extra
sudo apt-get set up npm -y
I’ve come throughout a number of items of documentation that instruct how one can set up Gemini CLI with npm, however a lot of them wind up with the gemini command not discovered. The one positive method to set up Gemini CLI correctly is with the command:
Present extra
sudo npm set up -g @google/gemini-cli
When that finishes, you are able to run Gemini.
Notice: In the event you get an error when making an attempt to run Gemini, you may need to put in the newest model of Node.js, which will be finished with the next instructions:
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
sudo -E bash nodesource_setup.sh
sudo apt-get set up nodejs -y
After working the above, you may must reinstall npm with:
sudo apt-get set up npm -y
Gemini first run steps
1. Run Gemini
The very first thing you could do is run Gemini with the command:
gemini
2. Choose your theme
Gemini will immediate you to pick out a theme. Since this can be a curses-based utility, use your arrow keys to pick out the theme you need, then hit Enter in your keyboard.
3. Choose your authentication technique
You learn that proper: it’s important to log in together with your Google account. There are different methods to authenticate (Gemini API Key or Vertex AI), however utilizing your Google account is the best technique. Be sure that “Login with Google” is chosen, then hit Enter in your keyboard.
4. Authenticate
While you hit Enter in your keyboard, your default net browser will open, the place you may choose the Google account you need to use. As soon as you’ve got authenticated, the terminal window will change to a Gemini immediate, the place you may kind your first question.
And that’s how you put in the Gemini CLI software on Linux. Benefit from the energy of AI in your terminal.
Get the morning’s prime tales in your inbox every day with our Tech Immediately publication.