Skip to content

Commit fb2ca2d

Browse files
sjsyrekclaude
andauthored
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>
1 parent 57f4e30 commit fb2ca2d

12 files changed

Lines changed: 70 additions & 43 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Changed
1515

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.
1617
- **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.
1718
- **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.
1819
- **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
2324
- **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`.
2425
- **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.
2526

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+
2631
### Removed
2732

2833
- **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.

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ project maintainer.
1212

1313
## Prerequisites
1414

15-
- **Node.js** >= 20.0.0
15+
- **Node.js** >= 24.0.0
1616
- **npm** >= 9.0.0
1717
- A [DeepL API key](https://www.deepl.com/pro-api) (free tier works for development)
1818

1919
## Getting Started
2020

2121
```bash
2222
# Clone the repository
23-
git clone https://github.com/DeepLcom/deepl-cli.git
23+
git clone https://github.com/DeepL/deepl-cli.git
2424
cd deepl-cli
2525

2626
# Install dependencies
@@ -228,4 +228,4 @@ When filing a bug report, include:
228228
- [docs/API.md](./docs/API.md) -- Complete CLI command reference
229229
- [DeepL API Docs](https://www.deepl.com/docs-api) -- Official API documentation
230230

231-
[issues]: https://github.com/DeepLcom/deepl-cli/issues
231+
[issues]: https://github.com/DeepL/deepl-cli/issues

‎README.md‎

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
> A next-generation command-line interface for DeepL translation and writing enhancement
44
5-
[![CI](https://github.com/DeepLcom/deepl-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/DeepLcom/deepl-cli/actions/workflows/ci.yml)
5+
[![CI](https://github.com/DeepL/deepl-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/DeepL/deepl-cli/actions/workflows/ci.yml)
66
[![License: MIT](https://img.shields.io/badge/license-MIT-blueviolet.svg)](https://opensource.org/licenses/MIT)
77

88
**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).
5353

5454
## 📦 Installation
5555

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`.
76+
5677
### From Source
5778

5879
```bash
5980
# Clone the repository
60-
git clone https://github.com/DeepLcom/deepl-cli.git
81+
git clone https://github.com/DeepL/deepl-cli.git
6182
cd deepl-cli
6283

6384
# Install dependencies
@@ -71,21 +92,8 @@ npm link
7192

7293
# Verify installation
7394
deepl --version
74-
# Output: deepl-cli 1.x.x
7595
```
7696

77-
> **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-
8997
## 🚀 Quick Start
9098

9199
### 1. Get Your DeepL API Key
@@ -1331,7 +1339,7 @@ Cache location: `~/.cache/deepl-cli/cache.db` (or `~/.deepl-cli/cache.db` for le
13311339

13321340
```bash
13331341
# Clone repository
1334-
git clone https://github.com/DeepLcom/deepl-cli.git
1342+
git clone https://github.com/DeepL/deepl-cli.git
13351343
cd deepl-cli
13361344

13371345
# Install dependencies

‎SECURITY.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
| Version | Supported |
66
|---------|--------------------|
7-
| 1.1.x | :white_check_mark: |
8-
| 1.0.x | :white_check_mark: |
9-
| < 1.0 | :x: |
7+
| 2.x | :white_check_mark: |
8+
| < 2.0 | :x: |
9+
10+
Versions before 2.0.0 were never published to a package registry (source installs only) and are not supported.
1011

1112
## Reporting a Vulnerability
1213

‎docs/SYNC.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ jobs:
808808
runs-on: ubuntu-latest
809809
steps:
810810
- uses: actions/checkout@v4
811-
- run: npm install -g deepl-cli
811+
- run: npm install -g @deepl/cli
812812
- name: Check translations are up to date
813813
run: deepl sync --frozen
814814
env:
@@ -832,7 +832,7 @@ jobs:
832832
runs-on: ubuntu-latest
833833
steps:
834834
- uses: actions/checkout@v4
835-
- run: npm install -g deepl-cli
835+
- run: npm install -g @deepl/cli
836836
- name: Sync and commit translations
837837
run: |
838838
git config user.name "github-actions[bot]"
@@ -863,7 +863,7 @@ i18n-check:
863863
stage: test
864864
image: node:20
865865
script:
866-
- npm install -g deepl-cli
866+
- npm install -g @deepl/cli
867867
- deepl sync --frozen
868868
variables:
869869
DEEPL_API_KEY: $DEEPL_API_KEY

‎docs/TROUBLESHOOTING.md‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -417,19 +417,13 @@ rm ~/.cache/deepl-cli/cache.db # or ~/.deepl-cli/cache.db for legacy installat
417417
deepl cache enable
418418
```
419419

420-
### "Translation cache backend failed to load" with NODE_MODULE_VERSION mismatch
420+
### "Translation cache backend failed to load"
421421

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.
423423

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.
425425

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.
433427

434428
---
435429

@@ -534,7 +528,7 @@ If you encounter an issue not covered here, check the [DeepL API documentation](
534528

535529
## Still Having Issues?
536530

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:
538532

539533
- The command you ran
540534
- The full error output

‎examples/05-document-translation.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Key Features:
8383
- Real-time file watching
8484
8585
Installation:
86-
npm install -g deepl-cli
86+
npm install -g @deepl/cli
8787
8888
Usage:
8989
deepl translate "Hello, world!" --to es

‎examples/18-cicd-integration.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
node-version: '20'
140140
141141
- name: Install DeepL CLI
142-
run: npm install -g deepl-cli
142+
run: npm install -g @deepl/cli
143143
144144
- name: Configure API Key
145145
env:

‎examples/31-sync-ci.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ cat << 'WORKFLOW'
117117
runs-on: ubuntu-latest
118118
steps:
119119
- uses: actions/checkout@v4
120-
- run: npm install -g deepl-cli
120+
- run: npm install -g @deepl/cli
121121
- name: Check translations are up to date
122122
run: deepl sync --frozen
123123
env:
@@ -133,7 +133,7 @@ cat << 'GITLAB'
133133
stage: test
134134
image: node:20
135135
script:
136-
- npm install -g deepl-cli
136+
- npm install -g @deepl/cli
137137
- deepl sync --frozen
138138
variables:
139139
DEEPL_API_KEY: $DEEPL_API_KEY
@@ -158,7 +158,7 @@ cat << 'AUTOSYNC'
158158
runs-on: ubuntu-latest
159159
steps:
160160
- uses: actions/checkout@v4
161-
- run: npm install -g deepl-cli
161+
- run: npm install -g @deepl/cli
162162
- name: Sync translations
163163
run: deepl sync --format json
164164
env:

‎examples/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ This directory contains practical, real-world examples of using the DeepL CLI.
7373

7474
All examples assume you have:
7575

76-
1. Installed DeepL CLI (`npm install -g deepl-cli` or `npm link`)
76+
1. Installed DeepL CLI (`npm install -g @deepl/cli` or `npm link`)
7777
2. A DeepL API key configured (`deepl auth set-key YOUR_API_KEY`)
7878

7979
## Running Examples

0 commit comments

Comments
 (0)