星野誠 makoto hoshino

ブラウザから、ターミナルへ。AIエージェントと「git」という名のセーブポイント

2026.4.21

中島聡さんのブログを読んで、ターミナルとgitと格闘している。

ここ最近、AIの流れが変わってきたという話だった。

ブラウザで画面をポチポチ操作するタイプのAIエージェントより、ターミナル(黒い画面)で文字コマンドを打って操作する方が、圧倒的に効率がいいとわかってきた。Claude Codeがまさにそれだ。

なぜか。LLMはそもそも文字を読み書きする仕組みでできている。画面の画像を解釈してクリック位置を計算するより、文字でコマンドを打つ方が速いし正確だ。記事の表現を借りると、「同じ結果に到達するまでの手順が10分の1から100分の1で済む」。

自分は一応見よう見まねでClaude Codeでいくつかの社内ツールを作っている。ブログ生成、レビュー返信、タスク管理。その意味では「試してみよう」の段階はクリアしている。

でも記事を読んで、一つ気になったことがあった。gitだ。

「gitの使い方をマスターすることは必須だと考えてください」と中島さんは書いていた。

gitとは何か。Claudeに聞いてみた。

「ファイルの変更履歴を全部記録してくれるソフト」だという。

例えるなら、ヴィンテージフレームの修理履歴ノートみたいなものだと言われた。あのフレームをいつテンプルを直して、いつ鼻パッドを替えて、いつ丁番を打ち直したか。全部記録してあるから、「前回の修理で失敗したな、その前の状態に戻そう」ができる。gitはそれをファイルでやる。

今の自分の状況で言うと、Claude Codeでツールを改造するたびに「上書き保存」で進んでいる状態だ。「ここ直して」と頼んで、直したら前のコードは消える。

gitを入れておくと、改造を頼む前に現在の状態を記録しておける。動かなかったら即座に戻せる。動いたらまた記録して次に進む。壊しても絶対に戻れる安心感の中で開発できる。

料理で言えば「途中でセーブできる」感じだ。

実際に覚えるコマンドは5〜6個らしい。しかもClaude Code自体がgitに詳しいので、「今の状態を記録して」「昨日の状態に戻して」と日本語で頼めば、Claude Codeが裏でコマンドを打ってくれる。自分がやるべきなのは「節目で記録する」という習慣だけだという。

ターミナルとgitの格闘は、まだ続いている。

いままではターミナルなんて触ったことがなかった。それだけでも、半年前の自分とは違う場所にいる。

コードは書けなくていい。でもgitは押さえておけ。

そういうことらしい。とにかく、とりあえず触る。わからないままでも、触っておく。

ーーーー

ーーーー

From the Browser to the Terminal — AI Agents and Git as a “Save Point”

After reading a blog post by Satoshi Nakajima, I’ve been struggling my way through the terminal and Git.

It was about how the direction of AI has been shifting recently.

Instead of AI agents that click around in a browser like a human,
the more efficient approach is to operate through the terminal—the black screen—using text-based commands.

Claude Code is exactly that.

Why does this matter?

Because LLMs are built to read and write text.

Interpreting images on a screen and figuring out where to click is far less efficient than simply issuing commands in text.

As the article put it,
“the number of steps required to reach the same result can be reduced to one-tenth, or even one-hundredth.”

I’ve been experimenting a bit with Claude Code myself.

I’ve built a few internal tools—
a blog generator, a review reply tool, some task management scripts.

So in that sense, I’ve already moved past the “try it out” phase.

But one thing in the article caught my attention.

Git.

“Learning how to use Git is essential,” Nakajima wrote.

So I asked Claude:

What is Git?

The answer was simple.

It’s a system that records the full history of file changes.

The explanation that made it click for me was this:

It’s like a repair log for vintage frames.

You keep track of when you adjusted the temples,
when you replaced the nose pads,
when you fixed the hinges.

Because everything is recorded,
you can always go back to a previous state if something goes wrong.

Git does the same thing—but for files.

Looking at my current workflow,
I realized I’ve been doing everything through overwrite.

I ask Claude Code to fix something,
it makes changes,
and the previous version just disappears.

That’s not a great situation.

Something works yesterday,
breaks today,
and I don’t know what changed.

And I can’t go back.

With Git, the flow becomes very different.

Before making changes, you save the current state.

If something breaks, you can immediately return to where you were.

If it works, you save again and move forward.

It creates a kind of safety net.

You can experiment freely, knowing you can always go back.

It was described to me like this:

It’s like having a “save point” while cooking.

You can try something,
and if it fails,
you don’t have to start from scratch.

Apparently, you only need to learn five or six commands for everyday use.

And since Claude Code understands Git,
you can just say things like
“save the current state” or “go back to yesterday,”
and it will handle the commands behind the scenes.

So what I really need to build
is not technical skill,
but the habit of saving at the right moments.

I’m still figuring out the terminal and Git.

Honestly, I had never touched the terminal before.

Even that alone means I’m in a very different place than I was six months ago.

You don’t need to know how to code.

But you do need to understand Git.

At least, that’s what it seems.

For now, I’ll just keep touching it.

Even without fully understanding it.

Because that’s probably what will matter later.

カテゴリー

– Archives –

– other post –

– Will go to Mars Olympus –

– next journey Olympus on Mars through Space Travel –

– 自己紹介 インタビュー –

RSS *“Yesterday, I Went to Mars ♡”*