Skip to content

Warn when the CLI runs on an unsupported Node.js version - #89

Merged
hamzahskafi merged 1 commit into
mainfrom
claude/cli-node-version-warning
Oct 15, 2026
Merged

hamzahskafi merged 1 commit into
mainfrom
claude/cli-node-version-warning

Conversation

@hamzahskafi

Copy link
Copy Markdown
Contributor

Before: running the CLI on Node.js older than 22.12 (for example 20.19) worked with no hint that the version is no longer supported.

After: on Node.js older than 22.12 the CLI prints one warning to stderr and then runs as usual:

Warning: AugmentWorks supports Node.js 22.12 or newer. You're running v20.19.0. Upgrade to the current LTS release: https://nodejs.org/en/download

It is a warning, not a hard stop, because the CLI still works on Node 20.

How: src/system/node-support.ts holds the 22.12 minimum and builds the message; src/index.ts writes it only when the CLI is invoked directly, so library imports and tests stay quiet. Unit tests cover versions below, at and above the floor. CHANGELOG entry added under Changed.

Replaces #88.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GDyUamKnmW15VzoFLkwnX5


Generated by Claude Code

engines.node is >=22.12, but the CLI still runs on Node.js 20 (checked:
--version and demo exit 0 on 20.19.0), and npm's EBADENGINE warning is
easy to miss under npx. When the CLI is run directly on an older
release, print one stderr line with the supported floor and the
nodejs.org download link, then carry on. Library imports and stdout
(including --json) are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GDyUamKnmW15VzoFLkwnX5
@hamzahskafi
hamzahskafi merged commit eb865cf into main Oct 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants