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
Copy file name to clipboardExpand all lines: README.md
+44-7Lines changed: 44 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,33 @@
2
2
3
3
**Bblslug** is a versatile translation tool that can be used as both a **CLI utility** and a **PHP library**.
4
4
5
-
It leverages LLM-based APIs (DeepL, OpenAI, Gemini) to translate plain text or HTML while preserving structure, code blocks, and URLs via placeholder filters.
5
+
It leverages LLM-based APIs to translate plain text or HTML while preserving structure, code blocks, and URLs via placeholder filters.
6
+
7
+
APIs supported:
8
+
9
+
- Anthropic (Claude):
10
+
-`anthropic:claude-haiku-3.5` - Claude Haiku 3.5 (latest)
11
+
-`anthropic:claude-opus-4` - Claude Opus 4 (20250514)
12
+
-`anthropic:claude-sonnet-4` - Claude Sonnet 4 (20250514)
13
+
- DeepL
14
+
-`deepl:free` - DeepL free tier
15
+
-`deepl:pro` - DeepL pro tier
16
+
- Google (Gemini)
17
+
-`google:gemini-2.0-flash` - Gemini 2.0 Flash
18
+
-`google:gemini-2.5-flash` - Gemini 2.5 Flash
19
+
-`google:gemini-2.5-flash-lite` - Gemini 2.5 Flash Lite
20
+
-`google:gemini-2.5-pro` - Gemini 2.5 Pro
21
+
- OpenAI (GPT)
22
+
-`openai:gpt-4` - OpenAI GPT-4
23
+
-`openai:gpt-4-turbo` - OpenAI GPT-4 Turbo
24
+
-`openai:gpt-4o` - OpenAI GPT-4o
25
+
-`openai:gpt-4o-mini` - OpenAI GPT-4o Mini
6
26
7
27
## Features
8
28
9
29
- Supports **html** and **plain text** (`--format=text|html`)
10
30
- Placeholder-based protection with filters: `html_pre`, `html_code`, `url`, etc.
11
-
- Model selection via `--model=vendor:name` (`deepl:free`, `deepl:pro`, `openai:gpt-4o`, `gemini:1.5-pro`, …)
31
+
- Model selection via `--model=vendor:name` (`deepl:pro`, `google:gemini-2.5-flash`, `openai:gpt-4o`, …)
12
32
- Fully configurable backend registry
13
33
-**Dry-run** mode to preview placeholders without making API calls
14
34
-**Verbose** mode (`--verbose`) to print request previews
@@ -28,17 +48,33 @@ chmod +x vendor/bin/bblslug
28
48
2.**Export your API key(s)** before running:
29
49
30
50
```bash
51
+
export ANTHROPIC_API_KEY=...
31
52
export DEEPL_FREE_API_KEY=...
32
53
export DEEPL_PRO_API_KEY=...
54
+
export GOOGLE_API_KEY=...
33
55
export OPENAI_API_KEY=...
34
-
export GEMINI_API_KEY=...
35
56
```
36
57
37
58
3.**Input / output**:
38
59
39
60
- If `--source` is omitted, Bblslug reads from **STDIN**.
40
61
- If `--translated` is omitted, Bblslug writes to **STDOUT**.
41
62
63
+
4.**Optional proxy**:
64
+
65
+
To route requests through a proxy (e.g. HTTP or SOCKS5), use the `--proxy` option or set the `BBLSLUG_PROXY` environment variable:
0 commit comments