Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,21 @@ deepl --version
> - **Linux**: `python3`, `make`, and `gcc` (`apt install python3 make gcc g++`)
> - **Windows**: Visual Studio Build Tools or `windows-build-tools` (`npm install -g windows-build-tools`)

### From npm (not yet published)

An npm package is not yet published; install from source until then.

> **CI examples below** (and generated hook output) assume a published npm package; source-installed users should substitute the source-install path.
### From npm

The npm package has not been published yet. Until it is, install from source
using the **From Source** instructions above. The CI examples in this README,
in [`docs/SYNC.md`](docs/SYNC.md), and in [`examples/`](examples/) install from
the GitHub repository directly (`git clone … && npm ci && npm run build &&
npm link`) so they work today without a published package; they can be
shortened to `npm install -g deepl-cli` once the package is on the public
registry.

> **Security note.** Do not run `npm install -g deepl-cli` against the public
> registry today — there is no official package under that name yet, so any
> match would be a third-party publish. Use the source install (or pin a
> specific commit / signed release tag of this repository in CI) until an
> official scoped package is announced.

## 🚀 Quick Start

Expand Down
17 changes: 14 additions & 3 deletions docs/SYNC.md
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g deepl-cli
# The npm package is not yet published; install from source.
# Pin to a specific tag/commit for reproducible builds.
- name: Install DeepL CLI
run: |
git clone --depth 1 https://github.com/DeepLcom/deepl-cli.git /tmp/deepl-cli
cd /tmp/deepl-cli && npm ci && npm run build && npm link
- name: Check translations are up to date
run: deepl sync --frozen
env:
Expand All @@ -832,7 +837,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g deepl-cli
- name: Install DeepL CLI
run: |
git clone --depth 1 https://github.com/DeepLcom/deepl-cli.git /tmp/deepl-cli
cd /tmp/deepl-cli && npm ci && npm run build && npm link
- name: Sync and commit translations
run: |
git config user.name "github-actions[bot]"
Expand Down Expand Up @@ -862,8 +870,11 @@ The `.deepl-sync.lock` file is only staged when this sync run actually wrote an
i18n-check:
stage: test
image: node:20
before_script:
# The npm package is not yet published; install from source.
- git clone --depth 1 https://github.com/DeepLcom/deepl-cli.git /tmp/deepl-cli
- cd /tmp/deepl-cli && npm ci && npm run build && npm link && cd -
script:
- npm install -g deepl-cli
- deepl sync --frozen
variables:
DEEPL_API_KEY: $DEEPL_API_KEY
Expand Down
2 changes: 1 addition & 1 deletion examples/05-document-translation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Key Features:
- Real-time file watching

Installation:
npm install -g deepl-cli
See the project README for installation instructions.

Usage:
deepl translate "Hello, world!" --to es
Expand Down
6 changes: 1 addition & 5 deletions examples/12-cost-transparency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,7 @@ echo " Creating a technical document with code..."
cat > "$TEMP_DIR/technical.md" << 'EOF'
# Installation Guide

Run the following command:

```bash
npm install deepl-cli
```
Install DeepL CLI from source (see the project README).

Then configure your API key: `deepl auth set-key YOUR_KEY`
EOF
Expand Down
6 changes: 5 additions & 1 deletion examples/18-cicd-integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,12 @@ jobs:
with:
node-version: '20'

# The npm package is not yet published; install from source.
# Pin to a tag/commit for reproducible builds in production.
- name: Install DeepL CLI
run: npm install -g deepl-cli
run: |
git clone --depth 1 https://github.com/DeepLcom/deepl-cli.git /tmp/deepl-cli
cd /tmp/deepl-cli && npm ci && npm run build && npm link

- name: Configure API Key
env:
Expand Down
17 changes: 14 additions & 3 deletions examples/31-sync-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ cat << 'WORKFLOW'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g deepl-cli
# The npm package is not yet published; install from source.
- name: Install DeepL CLI
run: |
git clone --depth 1 https://github.com/DeepLcom/deepl-cli.git /tmp/deepl-cli
cd /tmp/deepl-cli && npm ci && npm run build && npm link
- name: Check translations are up to date
run: deepl sync --frozen
env:
Expand All @@ -132,8 +136,11 @@ cat << 'GITLAB'
i18n-check:
stage: test
image: node:20
before_script:
# The npm package is not yet published; install from source.
- git clone --depth 1 https://github.com/DeepLcom/deepl-cli.git /tmp/deepl-cli
- (cd /tmp/deepl-cli && npm ci && npm run build && npm link)
script:
- npm install -g deepl-cli
- deepl sync --frozen
variables:
DEEPL_API_KEY: $DEEPL_API_KEY
Expand All @@ -158,7 +165,11 @@ cat << 'AUTOSYNC'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g deepl-cli
# The npm package is not yet published; install from source.
- name: Install DeepL CLI
run: |
git clone --depth 1 https://github.com/DeepLcom/deepl-cli.git /tmp/deepl-cli
cd /tmp/deepl-cli && npm ci && npm run build && npm link
- name: Sync translations
run: deepl sync --format json
env:
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ This directory contains practical, real-world examples of using the DeepL CLI.

All examples assume you have:

1. Installed DeepL CLI (`npm install -g deepl-cli` or `npm link`)
1. Installed DeepL CLI from source (see [`README.md` → From Source](../README.md#from-source); the npm package is not yet published)
2. A DeepL API key configured (`deepl auth set-key YOUR_API_KEY`)

## Running Examples
Expand Down