You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fb2ca2d
Browse filesBrowse the repository at this point in the historyBrowse files
docs: retarget all install instructions to @deepl/cli and document Homebrew (#100)
Replace all 10 occurrences of the unpublished install string with
npm install -g @deepl/cli — including src/services/git-hooks.ts, the
one PR #70 missed, which the CLI emits into generated hook output. A
regression test now asserts generated hooks never reference an
unpublished package name.
README installation now documents Homebrew (brew install
deepl/tap/deepl), npm, and from-source, with a Node 24 prerequisite,
and drops the better-sqlite3 native-compilation caveat. The
TROUBLESHOOTING NODE_MODULE_VERSION entry is replaced with accurate
guidance for the remaining degradation cause (Node < 24). Six stale
DeepLcom URLs now point at the DeepL org. CONTRIBUTING gains the Node
24 prerequisite; SECURITY.md's supported-versions table reflects that
only 2.x is a published line.
Credit to @maa-xx (#70) for reporting the broken install instructions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
14
14
### Changed
15
15
16
+
-**docs**: All install instructions now target `@deepl/cli` (10 occurrences across `docs/SYNC.md`, four example scripts, `examples/README.md`, and the git-hook template in `src/services/git-hooks.ts`). The README installation section documents three install paths — Homebrew (`brew install deepl/tap/deepl`, which manages Node itself), npm (`npm install -g @deepl/cli`), and from source — with an explicit Node.js 24 prerequisite, replacing the `better-sqlite3` native-compilation caveat (Xcode CLT / python3-make-gcc), which no longer applies. The `TROUBLESHOOTING.md``NODE_MODULE_VERSION` / `npm rebuild better-sqlite3` entry is replaced by accurate guidance for the one remaining cache-degradation cause (running on Node < 24). Six stale `DeepLcom` GitHub URLs now point at the `DeepL` org directly. `CONTRIBUTING.md` states the Node 24 development prerequisite, and `SECURITY.md`'s supported-versions table reflects that only 2.x is a published, supported line.
16
17
-**tests**: Jest's haste map no longer indexes `.claude/` (via `modulePathIgnorePatterns`). A leftover agent worktree under `.claude/worktrees/` duplicated the manual mocks in `tests/__mocks__/` and made every jest run emit a `jest-haste-map: duplicate manual mock found` warning; test files in worktrees were already excluded, but module indexing was not. Verified warning-free with a worktree present.
17
18
-**BREAKING — package**: The package is now published as the scoped **`@deepl/cli`** (previously the unpublished working name `deepl-cli`). Scoped packages default to restricted visibility, so `publishConfig.access: "public"` is set explicitly — without it the publish fails. The `bin` name is unchanged: the command is still `deepl`, and scoping changes only the install string (`npm install -g @deepl/cli`). Repository, bugs, and homepage metadata now point at `github.com/DeepL/deepl-cli` directly instead of relying on the redirect from the legacy `DeepLcom` org name.
18
19
-**BREAKING — cache/runtime**: The translation cache now uses Node's built-in `node:sqlite` module instead of the `better-sqlite3` native addon, and the CLI consequently requires **Node.js >= 24** (`engines.node` is now `>=24.0.0`). Node 24 is the first release where `node:sqlite` is non-experimental; Node 18/20 lack the module entirely and Node 22 would both warn on every invocation and downgrade the bundled SQLite (3.50.4 vs 3.53.1). Existing cache databases are read in place with no migration — the on-disk format is unchanged (SQLite 3.53.2-written files verified readable, WAL mode and `user_version` stamp included). **Migration**: upgrade to Node 24 (current LTS), e.g. `nvm install 24`; no other action is needed, and the cache keeps its contents.
@@ -23,6 +24,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
24
-**deps**: `commander` 14.0.3 → 15.0.0. commander 15 is ESM-only (`"type": "module"`) and requires Node >=22.12.0, so it was unmergeable until the Node 24 baseline landed. Jest's `transformIgnorePatterns` allowlist gains `commander` so ts-jest transforms it under CommonJS test execution; without that, 28 suites fail to load with `SyntaxError: Cannot use import statement outside a module`.
24
25
-**ci**: Test matrix, release workflow, and security workflow now target Node 24 (previously Node 20 and 22). Node 20 reached end-of-life in April 2026, and Node 24 is the current LTS. This aligns CI with the runtime the project is moving to; the `engines.node` range is unchanged in this entry and is bumped separately.
25
26
27
+
### Fixed
28
+
29
+
-**hooks**: Generated git hooks no longer emit a broken install instruction. The `pre-push` hook template told users to globally install the unpublished `deepl-cli` name — which fails with `ENOVERSIONS` — and now points at `@deepl/cli`. Reported by **@maa-xx** in #70, who correctly diagnosed that the documentation instructed readers to install a package that does not resolve; their docs fix was superseded by actually publishing the package, but this source-level occurrence was the one their PR missed and is now guarded by a regression test asserting generated hook output never references an unpublished package name.
30
+
26
31
### Removed
27
32
28
33
-**deps**: `better-sqlite3` and `@types/better-sqlite3`. The production dependency tree no longer contains any native addon, removing the entire class of ABI-mismatch failures (`ERR_DLOPEN_FAILED` / `NODE_MODULE_VERSION` errors after a Node major upgrade, e.g. via `brew upgrade node`), a 1.9 MB platform-specific binary, and the C++ compilation-toolchain requirement for installs from source. The cacheless-degradation safety net remains: a runtime whose `node:sqlite` is missing (Node < 22.5.0) warns once and runs uncached rather than crashing, and never touches the cache database.
**DeepL CLI** is a comprehensive, developer-friendly command-line tool that integrates DeepL's powerful translation API and cutting-edge Write API for grammar and style enhancement. Built with TypeScript and designed for modern development workflows.
@@ -53,11 +53,32 @@ For security policy and vulnerability reporting, see [SECURITY.md](SECURITY.md).
53
53
54
54
## 📦 Installation
55
55
56
+
> **Prerequisite:** Node.js **24 or later** (except for Homebrew, which installs Node for you). The cache uses Node's built-in [`node:sqlite`](https://nodejs.org/api/sqlite.html) module — no native compilation, no build toolchain needed.
57
+
58
+
### Homebrew (macOS / Linux)
59
+
60
+
```bash
61
+
brew install deepl/tap/deepl
62
+
```
63
+
64
+
Installs the `deepl` command and everything it needs, including Node.
65
+
66
+
### npm
67
+
68
+
```bash
69
+
npm install -g @deepl/cli
70
+
71
+
# Verify installation
72
+
deepl --version
73
+
```
74
+
75
+
The package is scoped, but the command is just `deepl`.
> **Note:** This project uses [`better-sqlite3`](https://github.com/WiseLibs/better-sqlite3) for local caching, which requires native compilation. If `npm install` fails with build errors, ensure you have:
78
-
>
79
-
> -**macOS**: Xcode Command Line Tools (`xcode-select --install`)
80
-
> -**Linux**: `python3`, `make`, and `gcc` (`apt install python3 make gcc g++`)
81
-
> -**Windows**: Visual Studio Build Tools or `windows-build-tools` (`npm install -g windows-build-tools`)
82
-
83
-
### From npm (not yet published)
84
-
85
-
An npm package is not yet published; install from source until then.
86
-
87
-
> **CI examples below** (and generated hook output) assume a published npm package; source-installed users should substitute the source-install path.
88
-
89
97
## 🚀 Quick Start
90
98
91
99
### 1. Get Your DeepL API Key
@@ -1331,7 +1339,7 @@ Cache location: `~/.cache/deepl-cli/cache.db` (or `~/.deepl-cli/cache.db` for le
Copy file name to clipboardExpand all lines: docs/TROUBLESHOOTING.md
+5-11Lines changed: 5 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -417,19 +417,13 @@ rm ~/.cache/deepl-cli/cache.db # or ~/.deepl-cli/cache.db for legacy installat
417
417
deepl cache enable
418
418
```
419
419
420
-
### "Translation cache backend failed to load" with NODE_MODULE_VERSION mismatch
420
+
### "Translation cache backend failed to load"
421
421
422
-
**Cause:** The `better-sqlite3` native addon was compiled for a different Node.js version than the one currently running. This happens when you switch Node.js versions (e.g., via `nvm use`, `fnm`, or a system upgrade) without rebuilding native modules.
422
+
**Cause:** The cache uses Node's built-in `node:sqlite` module, which requires Node.js 24 or later (the CLI's minimum supported version). On an older runtime the module doesn't exist, so caching cannot start.
423
423
424
-
Translation and write commands keep working with caching disabled for the run; your cache database is not modified. `deepl cache` subcommands fail until the backend loads again.
424
+
Translation and write commands keep working with caching disabled for the run; your cache database is not modified. `deepl cache` subcommands fail until the CLI runs on a supported Node.js version.
425
425
426
-
**Solution:**
427
-
428
-
```bash
429
-
npm rebuild better-sqlite3
430
-
```
431
-
432
-
or reinstall the CLI / switch back to the Node.js version it was installed with.
426
+
**Solution:** run the CLI with Node.js 24+ (e.g. `nvm install 24 && nvm use 24`), or install via Homebrew (`brew install deepl/tap/deepl`), which manages Node for you.
433
427
434
428
---
435
429
@@ -534,7 +528,7 @@ If you encounter an issue not covered here, check the [DeepL API documentation](
534
528
535
529
## Still Having Issues?
536
530
537
-
If your problem isn't listed above, [file a bug report](https://github.com/DeepLcom/deepl-cli/issues/new) with:
531
+
If your problem isn't listed above, [file a bug report](https://github.com/DeepL/deepl-cli/issues/new) with:
0 commit comments