What Is Node.js — The Ultra-Simple Explanation
In Part 1 about Claude Code, we ran the command npm install -g @anthropic-ai/claude-code to install it.
This npm command won't work unless you have Node.js installed.
Node.js = Software that lets you run JavaScript on your PC.
JavaScript used to only run inside a browser. Node.js made it possible to run on your PC as well.
What Is npm — Think of It Like an App Store
npm = Node Package Manager.
It's like the App Store or Google Play for your phone. It lets you install useful tools (packages) built by developers around the world with a single command.
Here are the tools I've installed via npm:
| Tool | Command | Purpose |
|---|---|---|
| Claude Code | npm i -g @anthropic-ai/claude-code |
AI development assistant |
| wrangler | npm i -g wrangler |
Cloudflare deployment |
| clasp | npm i -g @google/clasp |
Google Apps Script management |
| firebase-tools | npm i -g firebase-tools |
Firebase deployment |
They all install with npm install -g package-name. That's the only command you need to remember.
What's Actually Running — My Node.js Usage Map
It's not just for installing tools. Many of my own products run directly on Node.js.
- Discord Bot (daemon.js) — A bot where 8 AI characters respond on Discord. It calls the Claude Code CLI using Node.js's child_process module
- Automated blog generation (build-blog.js) — Reads Markdown → converts to HTML → generates OGP images → translates to English → generates RSS. Runs automatically every day
- Automated social media posting — Posting scripts for X (Twitter) and Instagram. With the
twitter-api-v2package, you can tweet in just 3 lines of code - Kagemusha core build (build.js) — Source management and automated build script for GAS code delivered to customers
In other words, Node.js is both "a foundation for installing tools" and the engine that powers your own programs.
Take the Discord Bot as an example — without Node.js, it couldn't communicate with the Discord API or launch the Claude Code CLI as a subprocess. The automated blog generation also uses Node.js's canvas library to render OGP images (thumbnails).
I said "even if you can't write JavaScript," and here's what I mean — if you tell Claude Code "build me a Discord Bot," it produces the Node.js code for you. I don't fully understand every line of that code, but I type node daemon.js and it runs. That's enough.
How to Install
- Go to the official Node.js website
- Download the LTS version (recommended)
- Run the installer (just keep clicking "Next")
- Type
node -vin your terminal — if a version number appears, you're good to go
$ node -v
v24.14.0
$ npm -v
11.9.0
That's it. Takes about 5 minutes.
Essential Commands
There are only 3 npm commands a beginner needs to know.
| Command | Meaning | When to use |
|---|---|---|
npm install -g package-name |
Install globally | When installing a tool for the first time |
npm install |
Install project dependencies | When starting a new project |
npx command-name |
Run without installing | When you need something temporarily |
Next Time
[Part 3] Git — The Peace of Mind of Being Able to "Undo"
You're editing code and think "oh no, I broke it." With Git, you can always go back to a previous state. Here are the Git basics that every beginner should know.
Still managing tutor attendance manually?
Discover Kagemusha System