backdraw 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,6 +6,10 @@
6
6
  <b>Let Claude generate images with your own ChatGPT account, in a background Chrome tab.<br>No API key, no extra cost, nothing to watch.</b>
7
7
  </p>
8
8
 
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/backdraw"><img src="https://img.shields.io/npm/v/backdraw" alt="npm version"></a>
11
+ </p>
12
+
9
13
  <p align="center">
10
14
  <img src="branding/demo/backdraw-demo.gif" alt="Right-click images on the web to save them as references, then Claude Code asks Backdraw for an image in that style; ChatGPT draws it in a background tab and the file is saved on the PC" width="100%">
11
15
  </p>
@@ -123,6 +127,8 @@ Run this in PowerShell or cmd (no admin rights needed):
123
127
  npx backdraw@latest setup
124
128
  ```
125
129
 
130
+ It runs the [`backdraw` package from npm](https://www.npmjs.com/package/backdraw).
131
+
126
132
  `setup` does everything except one click in the browser:
127
133
 
128
134
  1. It copies Backdraw to `%USERPROFILE%\.backdraw` (npx's own copy is temporary) and sets up the
@@ -145,6 +151,28 @@ npx backdraw@latest setup
145
151
  The native host is still named `io.github.muhammedtalha04.backdraw`, after the project's old GitHub
146
152
  user name: renaming it would break existing installs.
147
153
 
154
+ ### Install from your client
155
+
156
+ Your MCP client can also add Backdraw itself; it then starts the server with
157
+ `npx backdraw@latest mcp`. The browser side still needs a one-time setup on the PC, which leaves the
158
+ clients alone:
159
+
160
+ ```
161
+ npx backdraw@latest setup --clients=none
162
+ ```
163
+
164
+ | Client | Add Backdraw |
165
+ |---|---|
166
+ | Claude Code | `/plugin install backdraw --marketplace devtalh/backdraw` (Claude Code 2.1.275 or later; or `/plugin marketplace add devtalh/backdraw`, then `/plugin install backdraw@backdraw`). `/backdraw:setup` explains the browser step. |
167
+ | Cursor | [![Add Backdraw to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=backdraw&config=eyJjb21tYW5kIjoiY21kIiwiYXJncyI6WyIvYyIsIm5weCIsIi15IiwiYmFja2RyYXdAbGF0ZXN0IiwibWNwIl19) |
168
+ | VS Code | [![Install Backdraw in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=backdraw&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22cmd%22%2C%22args%22%3A%5B%22%2Fc%22%2C%22npx%22%2C%22-y%22%2C%22backdraw%40latest%22%2C%22mcp%22%5D%7D) |
169
+ | Codex | `codex mcp add backdraw -- cmd /c npx -y backdraw@latest mcp` |
170
+ | Gemini CLI | `npx backdraw@latest setup --clients=gemini` |
171
+
172
+ On Windows the command goes through `cmd /c`, because clients start `npx` without a shell. Use one
173
+ way per client: if setup already added Backdraw to Claude Code, the plugin would start a second
174
+ server with the same tools.
175
+
148
176
  ### Manual install
149
177
 
150
178
  1. **Get the code.** Clone the repository with git, or download it as a ZIP (**Code** →
@@ -435,7 +463,8 @@ waiting; the job keeps running until `cancel_job` stops it.
435
463
 
436
464
  For setup and troubleshooting, run these in the Backdraw folder (`%USERPROFILE%\.backdraw`, or the
437
465
  folder you installed from). From anywhere, `npx backdraw <command>` runs the same commands, e.g.
438
- `npx backdraw status`. `npm run status` is the same as `node cli.js status`.
466
+ `npx backdraw status`. `npm run status` is the same as `node cli.js status`. `backdraw mcp` runs
467
+ the MCP server itself on stdio; that is what MCP clients start.
439
468
 
440
469
  ```
441
470
  node cli.js status Bridge status (Chrome connected, selected project, queue)
package/README.tr.md CHANGED
@@ -6,6 +6,10 @@
6
6
  <b>Claude, kendi ChatGPT hesabınla, Chrome'da arka plandaki bir sekmede görsel üretsin.<br>API anahtarı yok, ek ücret yok, başında beklemene gerek yok.</b>
7
7
  </p>
8
8
 
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/backdraw"><img src="https://img.shields.io/npm/v/backdraw" alt="npm sürümü"></a>
11
+ </p>
12
+
9
13
  <p align="center">
10
14
  <img src="branding/demo/backdraw-demo.gif" alt="Web'deki görseller sağ tıkla referans olarak kaydediliyor, sonra Claude Code Backdraw'dan o tarzda bir görsel istiyor; ChatGPT görseli arka plan sekmesinde çiziyor ve dosya bilgisayara kaydediliyor" width="100%">
11
15
  </p>
@@ -123,6 +127,8 @@ Bunu PowerShell'de ya da cmd'de çalıştır (yönetici izni gerekmez):
123
127
  npx backdraw@latest setup
124
128
  ```
125
129
 
130
+ Bu komut [npm'deki `backdraw` paketini](https://www.npmjs.com/package/backdraw) çalıştırır.
131
+
126
132
  `setup`, tarayıcıdaki tek bir tıklama dışında her şeyi yapar:
127
133
 
128
134
  1. Backdraw'ı `%USERPROFILE%\.backdraw` klasörüne kopyalar (npx'in kendi kopyası geçicidir) ve görsel
@@ -146,6 +152,28 @@ npx backdraw@latest setup
146
152
  Native host'un adı, projenin eski GitHub kullanıcı adından gelen
147
153
  `io.github.muhammedtalha04.backdraw` olarak kalıyor: adı değiştirmek mevcut kurulumları bozardı.
148
154
 
155
+ ### İstemcinden kur
156
+
157
+ MCP istemcin Backdraw'ı kendisi de ekleyebilir; o zaman sunucuyu `npx backdraw@latest mcp` ile
158
+ başlatır. Tarayıcı tarafı yine de bilgisayarda bir kerelik bir kurulum ister; bu kurulum istemcilere
159
+ dokunmaz:
160
+
161
+ ```
162
+ npx backdraw@latest setup --clients=none
163
+ ```
164
+
165
+ | İstemci | Backdraw'ı ekle |
166
+ |---|---|
167
+ | Claude Code | `/plugin install backdraw --marketplace devtalh/backdraw` (Claude Code 2.1.275 ya da daha yeni; ya da önce `/plugin marketplace add devtalh/backdraw`, sonra `/plugin install backdraw@backdraw`). `/backdraw:setup` tarayıcı adımını anlatır. |
168
+ | Cursor | [![Backdraw'ı Cursor'a ekle](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=backdraw&config=eyJjb21tYW5kIjoiY21kIiwiYXJncyI6WyIvYyIsIm5weCIsIi15IiwiYmFja2RyYXdAbGF0ZXN0IiwibWNwIl19) |
169
+ | VS Code | [![Backdraw'ı VS Code'a kur](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=backdraw&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22cmd%22%2C%22args%22%3A%5B%22%2Fc%22%2C%22npx%22%2C%22-y%22%2C%22backdraw%40latest%22%2C%22mcp%22%5D%7D) |
170
+ | Codex | `codex mcp add backdraw -- cmd /c npx -y backdraw@latest mcp` |
171
+ | Gemini CLI | `npx backdraw@latest setup --clients=gemini` |
172
+
173
+ Windows'ta komut `cmd /c` üzerinden çalışır, çünkü istemciler `npx`'i kabuk olmadan başlatır. Her
174
+ istemci için tek yol kullan: setup Backdraw'ı Claude Code'a zaten eklediyse, plugin aynı araçlarla
175
+ ikinci bir sunucu başlatır.
176
+
149
177
  ### Elle kurulum
150
178
 
151
179
  1. **Kodu indir.** Depoyu git ile klonla ya da ZIP olarak indir (**Code** → **Download ZIP**) ve
@@ -446,7 +474,8 @@ beklemeyi durdurur; iş, `cancel_job` onu durdurana kadar sürer.
446
474
 
447
475
  Kurulum ve sorun giderme için bunları Backdraw klasöründe çalıştır (`%USERPROFILE%\.backdraw` ya da
448
476
  kurulumu yaptığın klasör). Her yerden `npx backdraw <komut>` aynı komutları çalıştırır, örneğin
449
- `npx backdraw status`. `npm run status`, `node cli.js status` ile aynıdır.
477
+ `npx backdraw status`. `npm run status`, `node cli.js status` ile aynıdır. `backdraw mcp`, MCP
478
+ sunucusunun kendisini stdio üzerinde çalıştırır; MCP istemcilerinin başlattığı budur.
450
479
 
451
480
  ```
452
481
  node cli.js status Köprünün durumu (Chrome bağlı mı, seçili proje, kuyruk)
package/bin/backdraw.js CHANGED
@@ -16,6 +16,7 @@ Usage: backdraw <command>
16
16
  clients: claude-code, claude-desktop, codex, cursor, vscode, gemini
17
17
  doctor [--fix] Check the install; --fix repairs registrations
18
18
  uninstall [--dry-run] Remove the registrations (your images and settings stay)
19
+ mcp Run the MCP server on stdio (what MCP clients start; needs setup once)
19
20
  --version Print the version
20
21
  ${cli.USAGE.split('\n').slice(1).join('\n')}`;
21
22
 
@@ -33,6 +34,9 @@ async function main(argv) {
33
34
  const [cmd, ...rest] = argv;
34
35
  const { flags } = parseArgs(rest, { booleans: ['yes', 'fix', 'dry-run', 'no-wait'] });
35
36
  switch (cmd) {
37
+ // stdout belongs to the JSON-RPC stream from here on; the server reads stdin until it closes.
38
+ case 'mcp':
39
+ return require('../mcp-server');
36
40
  case '-v': case '--version': case 'version':
37
41
  return console.log(VERSION);
38
42
  case 'setup':
@@ -2,7 +2,7 @@
2
2
  "manifest_version": 3,
3
3
  "name": "Backdraw",
4
4
  "short_name": "Backdraw",
5
- "version": "2.1.0",
5
+ "version": "2.1.1",
6
6
  "description": "__MSG_extDescription__",
7
7
  "key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtu/jyAJ3e3hnNrNGCxfzvHLOp80L9c3j71jmQV2ymY1DbPfZNJUdrszM3dnk6SFlm/X42F/e1Pf9RoQqMKujWr7KRTtH257vBMmLbk8Eo0LytpGP0F8WOQIcp5TxLZgvqSlGTjdbB2QFJt+uisJFE8Y3nWnZpsmejes0m9NObpqBc7Q1tzZrDAnh6gzddyF8fkYU/gS2Qtu5Vd2YbRiVN18tUUh2Bb+QuXlTlzOE1JQ49A9qRTmXejtcn943ZaQ0aucooNQU4hZAFVUT+25UhzuGMZDFzZALqL19hP0EP4Erm1yitjICvR5yK/7nYObGa3LynEeH7dDJ+qoJaf4TEQIDAQAB",
8
8
  "default_locale": "en",
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "backdraw",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Local MCP server, native messaging host and Chrome extension that let Claude generate images with your own signed-in ChatGPT account in a background tab.",
5
+ "mcpName": "io.github.devtalh/backdraw",
5
6
  "license": "MIT",
6
7
  "author": "devtalh",
7
8
  "homepage": "https://github.com/devtalh/backdraw#readme",
@@ -49,8 +50,5 @@
49
50
  "status": "node cli.js status",
50
51
  "install-bridge": "node install.js",
51
52
  "test": "node --test"
52
- },
53
- "os": [
54
- "win32"
55
- ]
53
+ }
56
54
  }
package/setup.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // own copy is temporary), registers the native host for the installed browsers, adds Backdraw to
4
4
  // the MCP clients the user picks, then walks through loading the extension and waits for it.
5
5
  // --yes no questions: every client that was found
6
- // --clients=a,b exactly these (ids: see CLIENT_IDS)
6
+ // --clients=a,b exactly these (ids: see CLIENT_IDS); --clients=none: none, the browser side only
7
7
  // --browser=edge the browser to load the extension in (default: the first one found)
8
8
  // --no-wait don't wait for the extension to connect
9
9
  const fs = require('fs');
@@ -31,6 +31,7 @@ function detectClients(c) {
31
31
  function parseClientList(value) {
32
32
  if (value === true || value === '') throw new Error(`--clients needs a list, e.g. --clients=claude-code,cursor (one of: ${CLIENT_IDS.join(', ')}).`);
33
33
  const ids = String(value).split(',').map(s => s.trim().toLowerCase()).filter(Boolean);
34
+ if (ids.length === 1 && ids[0] === 'none') return []; // the browser side only (e.g. the Claude Code plugin)
34
35
  const unknown = ids.filter(id => !CLIENT_IDS.includes(id));
35
36
  if (unknown.length) throw new Error(`Unknown client ${unknown.join(', ')}; use: ${CLIENT_IDS.join(', ')}.`);
36
37
  return [...new Set(ids)];