Introducing the “DevLog” Category

A Look Behind the Scenes I’ve created this new category to document the journey of building my apps. Here, I’ll be sharing the stories behind the code—including my thought process during development, the specific details I focused on, and the unique features of each application Think of this as a behind-the-scenes look at how my apps are made.

【Ubuntu】Node.jsを更新してGemini CLIをインストール!手順を解説

普段使っているターミナルから離れずにAIにサクッと質問できたら便利だな、と思いGemini CLIをインストールしてみました。 インストール要件を調べるとNode.js v20以降が必要とのこと。そこで、最新LTS版であるv22をインストールすることにしました。ただ、Ubuntu標準のNode.jsはバージョンが古いため、リポジトリを追加してバージョンアップする必要がありました。 今回はその手順をブログに残しておきます。 手順1:古いNode.jsのアンインストール まず、競合を避けるために、Ubuntuに標準で入っている古いNode.jsをアンインストールしておきましょう。 あわせて sudo apt autoremove を実行して、不要な依存パッケージも掃除しておくとクリーンな状態になります。 手順2:NodeSourceリポジトリの追加 Node.jsの最新版は、NodeSourceというリポジトリからインストールするのが一般的です。公式サイトの手順はこちらです: https://nodesource.com/products/distributions リポジトリ追加用のスクリプトをダウンロードするために、curlコマンドを使います。入っていない場合は、先にインストールしておきましょう。 続いて、curlでセットアップスクリプトを実行し、Node.js v22のリポジトリをシステムに追加します。 手順3:Node.js v22のインストール リポジトリの準備ができたので、aptコマンドでNode.js v22をインストールします。 インストール後、node -v コマンドを打って、バージョンが “v22” で始まっていれば成功です。 手順4:Gemini CLIのインストール いよいよGemini CLI本体をインストールします。npmを使い、グローバル(-g)にイン ストールするためsudoを付けて実行します。 最後に – 使ってみた感想 これまでは、AIにちょっとしたことを聞きたいだけでも、いちいちブラウザに移動するのが地味にストレスでした。Gemini CLIを導入してからは、そのストレスから解放され、すべての作業がターミナル上で完結するようになり、とても快適になりました。返答がターミナルに表示されるだけでなく、テキストファイルとして出力してもらうこともできるので、ブラウザ上のチャットAIを使用するよりも便利です。

How to Install the Gemini CLI on Ubuntu by Upgrading Node.js

I installed the Gemini CLI because I want to ask an AI questions without leaving my terminal. The installation requires Node.js v20 or newer, so I chose to install version 22, as it is the latest Long-Term Support (LTS) release, ensuring stability. Since the Node.js version in Ubuntu’s official repository is older, I had to add a new repository to install it. Here are the detailed steps I took to get it working: 1. Remove the old Node.js version First, you need to remove the outdated Node.js package that was installed from Ubuntu’s default repositories. Running sudo apt autoremove afterward is also a good idea to clean up any leftover … Read more