@nearform/fling 0.4.0 → 0.5.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/CHANGELOG.md +31 -0
- package/README.md +40 -15
- package/dist/cli.js +391 -133
- package/dist/cli.js.map +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.5.1
|
|
6
|
+
|
|
7
|
+
- `fling comments` shows the text a thread is pinned to (`> …` under its header), when a reviewer
|
|
8
|
+
pinned it by selecting text in review mode. The MCP tools return it as the anchor's `quote`.
|
|
9
|
+
|
|
10
|
+
## 0.5.0
|
|
11
|
+
|
|
12
|
+
- **One MCP server for every Fling.** The local MCP server (`fling mcp` and the Claude Desktop
|
|
13
|
+
extension) knows every Fling the CLI remembers. Every tool that talks to a Fling takes an
|
|
14
|
+
optional `server` (an address, host or unique part of it), and calls use that Fling's own key.
|
|
15
|
+
An unknown or ambiguous `server` fails with the list of Flings.
|
|
16
|
+
- **The server is chosen explicitly when there are several.** With one Fling (or none) nothing
|
|
17
|
+
changes: calls go to it. With several, the instructions and tool descriptions list them by host
|
|
18
|
+
and mark the current one, and tell Claude to settle at the start of a conversation which Fling it
|
|
19
|
+
uses (from your words, or by asking you, suggesting your current one), say so, and pass it as
|
|
20
|
+
`server` on every call. A call without `server`, reads included, doesn't run: it answers with the
|
|
21
|
+
list so Claude can ask. `fling mcp --server` and `FLING_URL` still pin one. The CLI's commands
|
|
22
|
+
are unchanged and follow `fling use`.
|
|
23
|
+
- `fling_servers` lists the Flings on this computer (address, name, who is signed in, which is
|
|
24
|
+
current), read when called; `{use: <server>}` makes one current, as `fling use` does.
|
|
25
|
+
- `fling_login` takes `server` to sign in to another Fling, including a new one. It becomes the
|
|
26
|
+
current Fling only when none is.
|
|
27
|
+
- Deploy, publish and comment results end with the Fling they went to.
|
|
28
|
+
- **One extension.** The extension has the same identity whichever Fling serves it, so installing
|
|
29
|
+
it from another Fling updates it in place. The address a Fling bakes in (`FLING_MCPB_SERVER_URL`
|
|
30
|
+
at build time, `FLING_ADD_SERVER` in the extension) is added to the remembered Flings when the
|
|
31
|
+
server starts, if it isn't there yet; it never replaces a stored key and becomes current only
|
|
32
|
+
when none is. The extension's **Fling server** setting is gone.
|
|
33
|
+
- Upgrading: remove older Fling extensions from Claude Desktop (Settings → Extensions), then
|
|
34
|
+
install it once from any of your Flings. Earlier extensions were each tied to one Fling.
|
|
35
|
+
|
|
5
36
|
## 0.4.0
|
|
6
37
|
|
|
7
38
|
- **Several Flings.** The CLI remembers every Fling you sign in to, each with its own API key, and
|
package/README.md
CHANGED
|
@@ -207,7 +207,8 @@ Global options: `--json` prints machine-readable output, and `--server <url>` po
|
|
|
207
207
|
another server (a remembered one brings its key; see [Several Flings](#several-flings)). Exit codes are `0` ok, `1` error, `2` not logged in and `3` forbidden.
|
|
208
208
|
|
|
209
209
|
Environment: `FLING_API_KEY`, `FLING_URL`, `FLING_CONFIG_DIR`, `FLING_DEBUG`, `FLING_DOWNLOADS_DIR`
|
|
210
|
-
(where the MCP server looks for files given by name first), `
|
|
210
|
+
(where the MCP server looks for files given by name first), `FLING_ADD_SERVER` (a Fling the MCP
|
|
211
|
+
server adds to the remembered ones when it starts), `FLING_NO_WAIT=1` (after a deploy or a new share
|
|
211
212
|
link, don't wait the few seconds it takes to reach every edge).
|
|
212
213
|
|
|
213
214
|
## Claude Code plugin and MCP
|
|
@@ -227,9 +228,23 @@ Or install it by hand in Claude Code:
|
|
|
227
228
|
```
|
|
228
229
|
|
|
229
230
|
Log in once with `fling login <url>` (or `npx @nearform/fling login <url>` if it is not installed).
|
|
230
|
-
The MCP server reuses
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
The MCP server reuses your logins. It re-reads the config on every call, so a `fling login` or
|
|
232
|
+
`fling use` in a terminal takes effect without a restart.
|
|
233
|
+
|
|
234
|
+
**Several Flings.** The MCP server knows every Fling the CLI remembers, and every tool that talks to
|
|
235
|
+
a Fling takes an optional `server`: its address, host or a unique part of it (as `fling use`
|
|
236
|
+
accepts).
|
|
237
|
+
|
|
238
|
+
- With one Fling (or none), calls go to it and `server` can be left out. The tool descriptions
|
|
239
|
+
name that Fling and where its sites live.
|
|
240
|
+
- With several, the server is chosen explicitly. The instructions and descriptions list the Flings
|
|
241
|
+
by host and mark the current one. Claude settles which Fling the conversation uses at the start,
|
|
242
|
+
from your words ("on the other one", "on fling.example.com") or by asking you, with your current
|
|
243
|
+
Fling as the suggestion. It says which one it is using and passes it as `server` on every call,
|
|
244
|
+
switching only when you ask. A call without `server` (reads included) does not run: it answers
|
|
245
|
+
with the list of Flings so Claude can ask.
|
|
246
|
+
- `fling mcp --server <url>` (or `FLING_URL`) pins the server: calls without `server` go there.
|
|
247
|
+
- The CLI itself is unchanged: `fling use` and the current Fling govern CLI commands.
|
|
233
248
|
|
|
234
249
|
The MCP tools:
|
|
235
250
|
|
|
@@ -240,9 +255,15 @@ The MCP tools:
|
|
|
240
255
|
- `fling_find_files`: recent `.html`/`.zip` files and folders with an `index.html` in those folders,
|
|
241
256
|
newest first (last 14 days by default).
|
|
242
257
|
- `fling_login`: opens the browser sign-in. If you haven't finished after about 30 seconds it returns
|
|
243
|
-
and keeps waiting in the background for up to 5 minutes.
|
|
244
|
-
|
|
245
|
-
|
|
258
|
+
and keeps waiting in the background for up to 5 minutes. With `server` it signs in to another
|
|
259
|
+
Fling, including a new one, which becomes current only if none is.
|
|
260
|
+
- `fling_servers`: lists the Flings on this computer (address, name, who is signed in, which is
|
|
261
|
+
current), read when called. `{use: <server>}` makes one current, the same as `fling use`.
|
|
262
|
+
- `fling_check_name`, `fling_list`, `fling_info`, `fling_files`, `fling_share`,
|
|
263
|
+
`fling_set_visibility`, `fling_archive`, `fling_rollback`, `fling_delete` (needs
|
|
264
|
+
`confirm: true`), `fling_whoami`, and the comment tools when a Fling has comments.
|
|
265
|
+
|
|
266
|
+
Results that give URLs (deploys, publishes, comments) end with the Fling they went to.
|
|
246
267
|
|
|
247
268
|
The MCP server never prompts:
|
|
248
269
|
|
|
@@ -259,23 +280,27 @@ For Claude Desktop (including Cowork), install the one-click extension. It runs
|
|
|
259
280
|
on your computer, so Claude can fling files you downloaded or that Claude Desktop saved, by name,
|
|
260
281
|
without uploading anything from Claude's sandbox.
|
|
261
282
|
|
|
262
|
-
1. Download `fling.mcpb` from
|
|
283
|
+
1. Download `fling.mcpb` from any Fling (Get started → Download, or `https://<your Fling>/downloads/fling.mcpb`).
|
|
263
284
|
2. Double-click it, or drag it into Claude Desktop, or go to **Settings → Extensions → Advanced
|
|
264
285
|
settings → Install Extension…** and pick the file.
|
|
265
|
-
3. Optional
|
|
266
|
-
the one the CLI is logged in to) and **Downloads folder** (default `~/Downloads`).
|
|
286
|
+
3. Optional setting: **Downloads folder** (default `~/Downloads`).
|
|
267
287
|
4. Ask Claude to "fling Pitch Deck.html from my Downloads". If you're not signed in, Claude calls
|
|
268
288
|
`fling_login` and your browser opens. The extension and the CLI share the logins in
|
|
269
|
-
`~/.fling/config.json`.
|
|
270
|
-
|
|
271
|
-
|
|
289
|
+
`~/.fling/config.json`.
|
|
290
|
+
|
|
291
|
+
There is one extension for every Fling. When it starts, it adds the Fling you downloaded it from to
|
|
292
|
+
the ones this computer knows (if it isn't there yet) without changing the current one, unless none
|
|
293
|
+
is current. Installing a copy from another Fling updates the same extension in place. To use
|
|
294
|
+
another Fling, ask Claude to sign in to it (`fling_login` with its address) or run
|
|
295
|
+
`fling login <url>`. With several Flings, Claude agrees with you which one to use, as described in
|
|
296
|
+
[Several Flings](#claude-code-plugin-and-mcp) above.
|
|
272
297
|
|
|
273
298
|
It needs Node.js 20 or later, which Claude Desktop provides, on macOS or Windows.
|
|
274
299
|
|
|
275
300
|
Build it with `pnpm --filter ./apps/cli build:mcpb`. That bundles `src/mcp-entry.ts` and every
|
|
276
301
|
dependency into one file, then validates and packs `mcpb/manifest.json` into `dist/fling.mcpb`
|
|
277
|
-
(`FLING_MCPB_SERVER_URL`
|
|
278
|
-
`/downloads/fling.mcpb`.
|
|
302
|
+
(with `FLING_MCPB_SERVER_URL` set, its origin is baked into the extension's env as
|
|
303
|
+
`FLING_ADD_SERVER`, the Fling added on start). A deploy publishes it at `/downloads/fling.mcpb`.
|
|
279
304
|
|
|
280
305
|
To use the MCP server in another client, run it over stdio:
|
|
281
306
|
|