npm package basenode-cli — operator-focused CLI around base/node — interactive setup, Azul-oriented preflight (Docker, USE_BASE_CONSENSUS, L1 RPC, disk, NTP skew, write throughput, execution peers), day‑2 docker compose helpers, and optional webhook monitoring. The published CLI binary is basenode (npm install -g basenode-cli → run basenode --help).
Official references: Run a Base node, Base Azul upgrade.
Registry: npmjs.com/package/basenode-cli
npm install -g basenode-cli
basenode --helpOne-off without a global install: npx basenode-cli --help (same basenode CLI).
- Node.js ≥ 20
- Docker + Docker Compose v2, daemon running
- Git (for clone / upgrade)
- Hardware/network expectations per Base docs (disk, bandwidth, open ports 30303, 9222)
git clone https://github.com/defidevrel/basenode-cli.git
cd basenode-cli
npm ci
npm run buildRun the CLI without a global install:
npm run basenode -- --help
# or
node dist/cli.js --help
npx . --helpOptional global command:
npm install -g basenode-cli # then: basenode --helpFrom a git checkout you can also use npm link in this repo (same basenode command).
-
Doctor — Docker / Compose / daemon:
npm run basenode -- doctor
-
Setup — clone/configure
base/node, write.env+ network envs (USE_BASE_CONSENSUS=true, Reth, Flashblocks when enabled):npm run basenode -- setup
Non-interactive example (use your real paths — not
/path/to/...):npm run basenode -- setup \ --node-dir "$HOME/base-node" \ --network mainnet \ --l1-rpc "https://YOUR_ETH_L1_EXECUTION_RPC" \ --l1-beacon "https://YOUR_ETH_L1_BEACON" \ --host-data-dir "$HOME/base-node-data/mainnet" \ --launch
-
Preflight — strict checks before/after upgrades:
npm run basenode -- preflight --node-dir "$HOME/base-node" --strictFlags:
--skip-ntp,--skip-disk-bench,--skip-peers,--execution-rpc http://127.0.0.1:8545.
| Command | Purpose |
|---|---|
setup |
Wizard + patch .env.mainnet / .env.sepolia + repo .env; optional --launch |
preflight |
Docker + repo/Azul env + L1 probe + disk + ports + NTP + disk write bench + net_peerCount |
doctor |
Docker toolchain checks only |
status |
docker compose ps |
stop |
docker compose down |
logs |
docker compose logs (-f to follow) |
upgrade |
git pull --ff-only + docker compose pull |
monitor |
Poll EL RPC; POST Discord webhook or generic JSON URL on state change |
npm run basenode -- monitor \
--node-dir "$HOME/base-node" \
--webhook "https://discord.com/api/webhooks/..." \
--execution-rpc http://127.0.0.1:8545 \
--interval 60--once runs a single poll and exits.
npm test # build + node:test
npm auditMIT — see LICENSE.