tandem-editor 0.11.2 → 0.13.0
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +3 -3
- package/CHANGELOG.md +201 -72
- package/README.md +141 -238
- package/dist/channel/index.js +211 -81
- package/dist/channel/index.js.map +1 -1
- package/dist/cli/index.js +749 -170
- package/dist/cli/index.js.map +1 -1
- package/dist/client/assets/CoworkSettings-BOYbyKul.js +3 -0
- package/dist/client/assets/event-CNdo2oXa.js +1 -0
- package/dist/client/assets/index-D8uS4cj7.css +1 -0
- package/dist/client/assets/index-Dm_QtxGQ.js +1 -0
- package/dist/client/assets/index-g-KwmRn9.js +271 -0
- package/dist/client/assets/webview-KiZyy_pC.js +1 -0
- package/dist/client/assets/window-DePn7tLG.js +1 -0
- package/dist/client/fonts/OFL-Hanuman.txt +93 -0
- package/dist/client/fonts/OFL-InterTight.txt +93 -0
- package/dist/client/fonts/OFL-JetBrainsMono.txt +93 -0
- package/dist/client/fonts/OFL-SNPro.txt +93 -0
- package/dist/client/fonts/OFL-Sono.txt +93 -0
- package/dist/client/fonts/OFL-SourceSerif4.txt +93 -0
- package/dist/client/fonts/hanuman-latin.woff2 +0 -0
- package/dist/client/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/dist/client/fonts/sn-pro-latin.woff2 +0 -0
- package/dist/client/fonts/sono-latin.woff2 +0 -0
- package/dist/client/fonts/source-serif-4-latin.woff2 +0 -0
- package/dist/client/index.html +206 -17
- package/dist/client/logo.png +0 -0
- package/dist/monitor/index.js +241 -160
- package/dist/monitor/index.js.map +1 -1
- package/dist/server/index.js +22828 -19659
- package/dist/server/index.js.map +1 -1
- package/package.json +12 -4
- package/sample/welcome.md +6 -6
- package/skills/tandem/SKILL.md +15 -0
- package/dist/client/assets/CoworkSettings-DK3jjdwK.js +0 -3
- package/dist/client/assets/index-CfT503n4.js +0 -297
- package/dist/client/assets/index-DeJe09pn.css +0 -1
- package/dist/client/assets/webview-Ben21ZLJ.js +0 -1
- package/dist/client/assets/window-BxBvHL5k.js +0 -1
package/README.md
CHANGED
|
@@ -1,310 +1,213 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<
|
|
2
|
+
<a href="https://www.npmjs.com/package/tandem-editor"><img src="https://img.shields.io/npm/v/tandem-editor?label=npm" alt="npm version"></a>
|
|
3
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-BUSL--1.1-blue" alt="License: BUSL-1.1"></a>
|
|
4
|
+
<a href="https://github.com/bloknayrb/tandem/releases/latest"><img src="https://img.shields.io/github/v/release/bloknayrb/tandem?label=release" alt="Latest release"></a>
|
|
3
5
|
</p>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**An editor where you and an AI work on the same document at the same time.**
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
Tandem is a document editor that lets you and an AI work on the same file together. You highlight a passage. The AI sees what you highlighted and can ask about it, comment on it, or propose changes that appear as cards beside your document. You decide what to keep.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
Tandem is approaching v1.0 and ships continuous improvements. See [CHANGELOG.md](CHANGELOG.md) for what is in the latest release.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
- **Your full LLM, not a toy editor.** Tandem connects via MCP, so Claude keeps all its knowledge, all its tools, and your full conversation context. Need it to cross-reference your document against a codebase, a URL, or another file? It can — it's still Claude.
|
|
13
|
-
- **Iterate in place.** Claude can suggest rewrites, leave comments, flag issues, and edit text — all appearing as annotations you accept, dismiss, or tweak right in the document.
|
|
13
|
+
## Contents
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
- [What Tandem does](#what-tandem-does)
|
|
16
|
+
- [See it in action](#see-it-in-action)
|
|
17
|
+
- [Who Tandem is for](#who-tandem-is-for)
|
|
18
|
+
- [Getting started](#getting-started)
|
|
19
|
+
- [How you work with Tandem](#how-you-work-with-tandem)
|
|
20
|
+
- [Privacy and trust](#privacy-and-trust)
|
|
21
|
+
- [Where Tandem is headed](#where-tandem-is-headed)
|
|
22
|
+
- [Documentation](#documentation)
|
|
23
|
+
- [License](#license)
|
|
24
|
+
- [For developers and contributors](#for-developers-and-contributors)
|
|
25
|
+
- [Architecture overview](#architecture-overview)
|
|
26
|
+
- [The MCP integration policy](#the-mcp-integration-policy)
|
|
27
|
+
- [MCP tools at a glance](#mcp-tools-at-a-glance)
|
|
28
|
+
- [Channel push and real-time updates](#channel-push-and-real-time-updates)
|
|
29
|
+
- [Development setup](#development-setup)
|
|
30
|
+
- [Tech stack](#tech-stack)
|
|
31
|
+
- [How to contribute](#how-to-contribute)
|
|
16
32
|
|
|
17
|
-
|
|
33
|
+
## What Tandem does
|
|
18
34
|
|
|
19
|
-
|
|
35
|
+
Most people use AI on a document by copying a passage into a chat window, asking a question, and pasting the answer back. Tandem closes that loop. The AI sits beside the document you are editing and reads from it directly.
|
|
20
36
|
|
|
21
|
-
|
|
37
|
+
When you highlight text, the AI sees the selection as you make it. You can ask it for a rewrite, a summary, a check on tone, or a second opinion. Its suggestions appear as cards next to the document. Accept them, set them aside, or reply to ask for something different.
|
|
22
38
|
|
|
23
|
-
|
|
39
|
+
Tandem is built to work with Anthropic's Claude out of the box. Other AI tools can also connect. See [the developer section](#the-mcp-integration-policy) below for the details of which clients work and which are tested first.
|
|
24
40
|
|
|
25
|
-
|
|
41
|
+
## See it in action
|
|
26
42
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
tandem # starts server + opens editor
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
`tandem setup` auto-detects Claude Code and Claude Desktop, writes MCP configuration, and installs a skill (`~/.claude/skills/tandem/SKILL.md`) that teaches Claude how to use Tandem's tools effectively. Re-run after upgrading (`npm update -g tandem-editor && tandem setup`).
|
|
34
|
-
|
|
35
|
-
### Quickstart: Claude Code plugin (recommended)
|
|
36
|
-
|
|
37
|
-
Install the plugin to expose Tandem's tools and real-time event stream into Claude Desktop chats **and** Cowork VM sessions:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
claude plugin marketplace add bloknayrb/tandem
|
|
41
|
-
claude plugin install tandem@tandem-editor
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
**Tandem must be running on the host before the plugin can do anything.** The plugin spawns two stdio MCP processes (`tandem mcp-stdio` and `tandem channel`) that proxy to `http://localhost:3479`. If the server isn't up they fail fast and log "Tandem server not reachable at …". Start the Tauri desktop app or run `tandem start` on the host first, then open Claude.
|
|
45
|
-
|
|
46
|
-
### Legacy stdio channel shim
|
|
47
|
-
|
|
48
|
-
If you can't install the plugin, use the older channel shim:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
tandem setup --with-channel-shim
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This writes a `tandem-channel` entry to your Claude Code MCP config. Start Claude Code with:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
claude --dangerously-load-development-channels server:tandem-channel
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Don't combine this with the plugin — both subscribe to `/api/events` and you'll get duplicate notifications for every event.
|
|
43
|
+
<p align="center">
|
|
44
|
+
<img src="docs/screenshots/01-editor-overview.png" alt="The Tandem editor with a document open on the left and a panel of AI suggestion cards on the right" width="800">
|
|
45
|
+
</p>
|
|
61
46
|
|
|
62
|
-
|
|
47
|
+
*The main view. Your document fills the left side. The chat panel and any suggestions from the AI sit on the right.*
|
|
63
48
|
|
|
64
|
-
|
|
49
|
+
<p align="center">
|
|
50
|
+
<img src="docs/screenshots/03-side-panel.png" alt="A close-up of suggestion cards beside the document, including a replacement card showing the original text in red strikethrough and the proposed text in green" width="500">
|
|
51
|
+
</p>
|
|
65
52
|
|
|
66
|
-
|
|
53
|
+
*A suggestion from the AI. Your current text and the proposed replacement appear together. Buttons let you accept the change or set it aside.*
|
|
67
54
|
|
|
68
|
-
|
|
69
|
-
claude --dangerously-load-development-channels server:tandem-channel
|
|
70
|
-
```
|
|
55
|
+
## Who Tandem is for
|
|
71
56
|
|
|
72
|
-
|
|
57
|
+
- If you draft long-form writing and want a second reader for tone and structure.
|
|
58
|
+
- If you review contracts, policies, RFP responses, or compliance filings and want a faster pass.
|
|
59
|
+
- When a colleague hands you a report to mark up.
|
|
60
|
+
- When the AI wrote a draft and you need to decide what to keep.
|
|
73
61
|
|
|
74
|
-
|
|
62
|
+
## Getting started
|
|
75
63
|
|
|
76
|
-
|
|
64
|
+
### System requirements
|
|
77
65
|
|
|
78
|
-
|
|
79
|
-
"Open sample/welcome.md and review it with me"
|
|
80
|
-
```
|
|
66
|
+
Windows 10 version 22H2 or Windows 11. macOS 12 (Monterey) or later. Linux with glibc 2.31 or later (Ubuntu 20.04+, Debian 11+, Fedora 34+). On Windows, the first launch may show a "Windows protected your PC" warning until the installer's signing certificate accumulates SmartScreen reputation. See [docs/troubleshooting.md#windows-smartscreen-warning](docs/troubleshooting.md#windows-smartscreen-warning) for the steps to dismiss it.
|
|
81
67
|
|
|
82
|
-
|
|
68
|
+
### Download the desktop app (recommended)
|
|
83
69
|
|
|
84
|
-
|
|
70
|
+
Pick the installer for your platform from the [latest release](https://github.com/bloknayrb/tandem/releases/latest). Windows, macOS, and Linux builds are available.
|
|
85
71
|
|
|
86
|
-
|
|
87
|
-
2. With channels on, Claude often reacts before you even say anything. Otherwise, just type what you want in the terminal: *"what do you think of this paragraph?"* or *"rewrite this to be more concise"*.
|
|
88
|
-
3. Claude reads your selection directly from the shared Tandem state (via `activity.selectedText` on `tandem_checkInbox`). You never paste the passage into the terminal.
|
|
89
|
-
4. Claude replies in the Tandem chat sidebar (`tandem_reply`) or drops annotations on the document (`tandem_annotate` / `tandem_suggestEdit`), which you can accept, dismiss, or edit in the side panel.
|
|
72
|
+
The desktop app bundles the editor, the server it talks to, and storage for the connection token. Updates land automatically. Double-clicking a `.md`, `.txt`, or `.html` file opens it directly in Tandem.
|
|
90
73
|
|
|
91
|
-
|
|
74
|
+
### What you get
|
|
92
75
|
|
|
93
|
-
|
|
76
|
+
- Multiple documents open in tabs, with `.md`, `.txt`, `.html`, and `.docx` support (Word files open in review-only mode).
|
|
77
|
+
- A scratchpad (`Ctrl+N`) for drafts you do not want to save to disk.
|
|
78
|
+
- A command palette (`Ctrl+Shift+P`) for quick actions.
|
|
79
|
+
- Find and replace, including across all open tabs.
|
|
80
|
+
- An outline panel for navigating long documents.
|
|
81
|
+
- Light and dark themes.
|
|
82
|
+
- Keyboard navigation through pending suggestions: `Alt+]` and `Alt+[` to move between them, `Ctrl+Enter` to accept, `Ctrl+Shift+Enter` to dismiss.
|
|
94
83
|
|
|
95
|
-
|
|
96
|
-
claude
|
|
97
|
-
```
|
|
84
|
+
### Other ways to install
|
|
98
85
|
|
|
99
|
-
|
|
86
|
+
If you use a terminal, you can also install Tandem with `npm install -g tandem-editor`, then run `tandem setup` once and `tandem` to launch. This works the same as the desktop app and is mostly useful if you already have Node.js installed.
|
|
100
87
|
|
|
101
|
-
|
|
102
|
-
2. **Background polling with ****/loop**** (hands-off).** Ask Claude to check in on its own using the `/loop` skill:
|
|
103
|
-
```
|
|
104
|
-
/loop 30s check tandem inbox and respond to any new messages
|
|
105
|
-
```
|
|
106
|
-
Claude polls every 30 seconds — responses lag by up to that interval, but you don't have to prompt it yourself.
|
|
88
|
+
### Got stuck
|
|
107
89
|
|
|
108
|
-
|
|
90
|
+
See [docs/troubleshooting.md](docs/troubleshooting.md) for common problems and how to resolve them.
|
|
109
91
|
|
|
110
|
-
|
|
92
|
+
## How you work with Tandem
|
|
111
93
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
94
|
+
1. Open a document in Tandem.
|
|
95
|
+
2. Start Claude. Tandem and Claude connect automatically once you have run setup once.
|
|
96
|
+
3. Type a question in the chat panel, or highlight text in the document to focus the AI on a passage. The AI sees what you highlight as you highlight it.
|
|
97
|
+
4. The AI's suggestions appear as cards beside the document. You decide what to accept.
|
|
98
|
+
5. Save when you are finished.
|
|
115
99
|
|
|
116
|
-
|
|
100
|
+
See [docs/workflows.md](docs/workflows.md) for examples of how this looks in daily use.
|
|
117
101
|
|
|
118
|
-
|
|
119
|
-
curl http://localhost:3479/health
|
|
120
|
-
# → {"status":"ok","version":"0.8.0","transport":"http","hasSession":false}
|
|
121
|
-
```
|
|
102
|
+
## Privacy and trust
|
|
122
103
|
|
|
123
|
-
|
|
104
|
+
- Tandem itself runs on your computer and stores your documents on your disk. We do not operate any servers that hold your files.
|
|
105
|
+
- When you ask the AI to do something, the text you share with it goes to whichever AI service you are using. For example, if you connect Claude, the text goes to Anthropic under their terms. Tandem does not relay or copy your document anywhere else.
|
|
106
|
+
- Tandem includes a private notes feature. Notes you mark as private are stripped from every response the AI sees ([ADR-027](docs/decisions.md)).
|
|
107
|
+
- Tandem does not collect telemetry or analytics.
|
|
124
108
|
|
|
125
|
-
|
|
126
|
-
<summary><strong>Development Setup</strong> (contributing / building from source)</summary>
|
|
109
|
+
See [docs/security.md](docs/security.md) for the full security model.
|
|
127
110
|
|
|
128
|
-
|
|
129
|
-
git clone https://github.com/bloknayrb/tandem.git
|
|
130
|
-
cd tandem
|
|
131
|
-
npm install
|
|
132
|
-
npm run dev:standalone # starts backend (:3478/:3479), editor client (:5173), and monitor
|
|
133
|
-
```
|
|
111
|
+
## Where Tandem is headed
|
|
134
112
|
|
|
135
|
-
|
|
113
|
+
Tandem is on the way to a v1.0 release. Recent releases added support for multiple AI providers and in-app configuration for connections and models. Work still in progress covers improvements to how Word documents round-trip through the editor, turnkey setup on macOS and Linux, and final polish. The full plan lives in [docs/roadmap.md](docs/roadmap.md).
|
|
136
114
|
|
|
137
|
-
|
|
115
|
+
## Documentation
|
|
138
116
|
|
|
139
|
-
|
|
117
|
+
- [docs/user-guide.md](docs/user-guide.md) for a longer walkthrough of the editor.
|
|
118
|
+
- [docs/workflows.md](docs/workflows.md) for daily usage patterns.
|
|
119
|
+
- [docs/troubleshooting.md](docs/troubleshooting.md) for when something goes wrong.
|
|
120
|
+
- [docs/positioning.md](docs/positioning.md) for the longer story of why Tandem exists.
|
|
121
|
+
- [docs/decisions.md](docs/decisions.md) for design decisions (ADRs).
|
|
122
|
+
- [docs/roadmap.md](docs/roadmap.md) for what is coming.
|
|
123
|
+
- [docs/architecture.md](docs/architecture.md) for diagrams and the file map.
|
|
124
|
+
- [docs/mcp-tools.md](docs/mcp-tools.md) for the MCP tool reference.
|
|
125
|
+
- [docs/security.md](docs/security.md) for the security model.
|
|
126
|
+
- [docs/configuration.md](docs/configuration.md) for advanced configuration.
|
|
127
|
+
- [docs/cli.md](docs/cli.md) for CLI command reference.
|
|
128
|
+
- [CHANGELOG.md](CHANGELOG.md) for release notes.
|
|
140
129
|
|
|
141
|
-
|
|
130
|
+
## License
|
|
142
131
|
|
|
143
|
-
|
|
144
|
-
- **Point at what you mean.** Select text in the editor and ask Claude about "this paragraph" in the terminal — or just wait for Claude to react if you have channels on. Claude reads your selection directly, no copy-paste needed. Hold the selection for about a second so it registers (dwell-time gating filters out incidental clicks).
|
|
145
|
-
- **Iterate on Claude's response.** Claude's suggestions appear as annotations in the side panel — accept, dismiss, edit, or ask follow-up questions. Each round refines the text without you ever leaving the document. Press **Ctrl+Shift+R** for keyboard review mode: **Tab** to navigate, **Y** accept, **N** dismiss, **E** edit, **Z** undo within a 10-second window.
|
|
146
|
-
- **Heads-down vs collaborative.** Toggle **Solo** mode when you want to write without interruptions — Tandem queues non-urgent annotations until you flip back to **Tandem** mode. Both `tandem_status` and `tandem_checkInbox` return the current mode so Claude adapts its behavior automatically.
|
|
147
|
-
- **Save.** Ask Claude ("save the file"), press the save button, or let session auto-persistence take over — your documents and annotations survive server restarts either way.
|
|
132
|
+
Tandem is free to use. It is licensed under the Business Source License 1.1 (BUSL-1.1); see [LICENSE](LICENSE) for the terms.
|
|
148
133
|
|
|
149
|
-
|
|
134
|
+
---
|
|
150
135
|
|
|
151
|
-
|
|
136
|
+
## For developers and contributors
|
|
152
137
|
|
|
153
|
-
###
|
|
138
|
+
### Architecture overview
|
|
154
139
|
|
|
155
|
-
|
|
140
|
+
Three layers: the editor (Tiptap inside a Tauri desktop app or a browser), the Tandem server (Hocuspocus on port 3478 for collaborative edits and an MCP HTTP server on port 3479 for AI tool calls), and the AI client (Claude Code or any other MCP-capable client). The full file map and data flows live in [docs/architecture.md](docs/architecture.md).
|
|
156
141
|
|
|
157
|
-
###
|
|
142
|
+
### The MCP integration policy
|
|
158
143
|
|
|
159
|
-
|
|
144
|
+
The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) is an open standard for AI clients to talk to tools and data sources. Tandem exposes its document and annotation surface over MCP, which is how AI clients like Claude read and modify the file you are editing.
|
|
160
145
|
|
|
161
|
-
|
|
146
|
+
The integration policy is set by [ADR-038](docs/decisions.md#adr-038-mcp-first-integration-policy-claude-as-default-integration):
|
|
162
147
|
|
|
163
|
-
|
|
148
|
+
> Tandem's integration contract is **MCP**. The default integration is **Claude** (Claude Code + Claude Desktop) — it's what we recommend, what we test against, and it ships with the channel push, cowork, plugin monitor, and auto-launcher features. Any MCP-capable client can connect to the same MCP HTTP endpoint and use the same 26 tools, but the Claude-specific transports don't apply. Other clients are **best-effort, MCP-contract-compatible, not validated** today.
|
|
149
|
+
>
|
|
150
|
+
> **Integration setup** runs through the integration setup wizard (#477 PR 3). Today's transitional behavior — Tandem auto-writing its MCP entry to Claude's config files on Tauri startup — is **deprecated when the wizard ships**. Going forward, every integration (Claude included) is configured via the wizard, never silently.
|
|
164
151
|
|
|
165
|
-
|
|
152
|
+
Client compatibility:
|
|
166
153
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
- **Unsaved-changes indicator** — dot on tab title when a document has pending edits
|
|
175
|
-
- **Configurable display name** — set your name so Claude knows who's reviewing
|
|
176
|
-
- **Atomic file saves** — write to temp, then rename, preventing partial writes
|
|
177
|
-
- **E2E tested** — Playwright tests cover the annotation lifecycle end-to-end
|
|
178
|
-
- **Authorship text coloring** — blue for your edits, orange for Claude's, toggled per-document
|
|
179
|
-
- **Threaded annotation replies** — back-and-forth conversation on any annotation
|
|
180
|
-
- **Auto-save** — documents save on change; Ctrl+S for manual trigger
|
|
181
|
-
- **Settings popover** — Light/Dark/System theme, text size (S/M/L), reduce motion, display name (Ctrl+,)
|
|
182
|
-
- **Auth tokens for LAN exposure** — bind to `0.0.0.0` with auto-generated tokens; `tandem rotate-token` for rotation
|
|
183
|
-
- **Durable annotation persistence** — annotations survive server restarts independently of session files
|
|
184
|
-
- **Claude Code plugin** — `tandem mcp-stdio` + `tandem channel` bridge Tandem into Cowork and Claude Desktop
|
|
154
|
+
| AI surface | Status |
|
|
155
|
+
|---|---|
|
|
156
|
+
| **Claude Code** (local CLI) | Default. Validated. Channel push supported. |
|
|
157
|
+
| **Claude Desktop** (local app) | Supported via the Cowork bridge. Channel push N/A. |
|
|
158
|
+
| **claude.ai web chat** | Not supported. Would require exposing the local server publicly via a tunnel, which is outside scope. |
|
|
159
|
+
| **Other MCP-capable clients** (Cursor, Continue.dev, LM Studio, Ollama, …) | Best-effort, MCP-contract-compatible, not validated. |
|
|
160
|
+
| **Non-MCP AIs** (ChatGPT direct, Gemini direct, etc.) | Not supported today. Multi-provider support is in progress via the Agent SDK adapter ([ADR-038 §3](docs/decisions.md#adr-038-mcp-first-integration-policy-claude-as-default-integration)); not yet shippable. |
|
|
185
161
|
|
|
186
|
-
|
|
162
|
+
### MCP tools at a glance
|
|
187
163
|
|
|
188
|
-
|
|
164
|
+
26 active tools across five capability areas. Full reference: [docs/mcp-tools.md](docs/mcp-tools.md).
|
|
189
165
|
|
|
190
|
-
- **
|
|
191
|
-
- **
|
|
192
|
-
- **
|
|
193
|
-
- **
|
|
166
|
+
- **Document.** Open, switch, list, close, and convert documents; read text content and outlines; save back to disk.
|
|
167
|
+
- **Annotation.** Create, resolve, remove, and edit annotations; query the annotation list; export a review report.
|
|
168
|
+
- **Apply.** Edit text ranges directly when an annotation is not the right surface.
|
|
169
|
+
- **Navigation.** Inspect the active selection, jump to ranges, and resolve internal links.
|
|
170
|
+
- **Awareness.** Read user presence and Solo/Tandem mode; check the inbox for selection events, chat messages, and annotation actions; reply in the chat sidebar.
|
|
194
171
|
|
|
195
|
-
|
|
172
|
+
### Channel push and real-time updates
|
|
196
173
|
|
|
197
|
-
|
|
174
|
+
Channel push delivers events (selections, annotation actions, chat messages) to the AI client over Server-Sent Events the moment they happen, so the AI does not have to poll. Two install options:
|
|
198
175
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
-
|
|
202
|
-
- [Workflows](docs/workflows.md) — Claude Code usage patterns: text iteration, cross-referencing, multi-model
|
|
203
|
-
- [Roadmap](docs/roadmap.md) — Phase 2+ roadmap, known issues, future extensions
|
|
204
|
-
- [Design Decisions](docs/decisions.md) — ADR-001 through ADR-024
|
|
205
|
-
- [Lessons Learned](docs/lessons-learned.md) — 48 implementation lessons
|
|
206
|
-
|
|
207
|
-
## CLI Commands
|
|
208
|
-
|
|
209
|
-
| Command | What it does |
|
|
210
|
-
| ---------------------------------- | ------------------------------------------------------------------ |
|
|
211
|
-
| `tandem` | Start server and open editor (global install) |
|
|
212
|
-
| `tandem setup` | Register MCP tools with Claude Code / Claude Desktop |
|
|
213
|
-
| `tandem setup --force` | Register to default paths regardless of auto-detection |
|
|
214
|
-
| `tandem --version` | Show installed version |
|
|
215
|
-
| `tandem --help` | Show usage |
|
|
216
|
-
| `tandem setup --with-channel-shim` | Also register the stdio channel shim |
|
|
217
|
-
| `tandem rotate-token` | Rotate auth token (60-second grace window) |
|
|
218
|
-
| `tandem mcp-stdio` | Run as stdio MCP server (proxy to local HTTP, for plugin bridge) |
|
|
219
|
-
| `tandem channel` | Run the channel shim (stdio MCP for plugin's tandem-channel entry) |
|
|
220
|
-
|
|
221
|
-
## MCP Configuration
|
|
222
|
-
|
|
223
|
-
Tandem registers two MCP connections: **HTTP** for document tools (28 tools including annotation editing — always on), and a **channel shim** for real-time push notifications. The channel shim is what enables the live-collaborator experience described in [Connect Claude Code](#connect-claude-code) and is recommended; it activates when you start Claude Code with `--dangerously-load-development-channels server:tandem-channel`. If you'd rather not pass that experimental flag, the entry sits idle and everything still works through polling on the HTTP connection — you just lose spontaneous reactions.
|
|
224
|
-
|
|
225
|
-
**Global install** (`tandem setup`): Automatically writes both entries to `~/.claude/mcp_settings.json` (Claude Code) and/or `claude_desktop_config.json` (Claude Desktop) with absolute paths. No manual configuration needed.
|
|
226
|
-
|
|
227
|
-
**Development setup** (`.mcp.json`): The repo includes a `.mcp.json` that configures both entries automatically when Claude Code runs from the repo directory:
|
|
228
|
-
|
|
229
|
-
```json
|
|
230
|
-
{
|
|
231
|
-
"mcpServers": {
|
|
232
|
-
"tandem": {
|
|
233
|
-
"type": "http",
|
|
234
|
-
"url": "http://localhost:3479/mcp"
|
|
235
|
-
},
|
|
236
|
-
"tandem-channel": {
|
|
237
|
-
"command": "npx",
|
|
238
|
-
"args": ["tsx", "src/channel/index.ts"],
|
|
239
|
-
"env": { "TANDEM_URL": "http://localhost:3479" }
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
176
|
+
```bash
|
|
177
|
+
tandem setup --with-channel-shim # persistent setup
|
|
178
|
+
claude --dangerously-load-development-channels server:tandem-channel # one-off
|
|
243
179
|
```
|
|
244
180
|
|
|
245
|
-
|
|
181
|
+
The `--dangerously-load-development-channels` flag is Claude Code's marker for unstable APIs; it becomes unnecessary when the Channels API stabilizes.
|
|
246
182
|
|
|
247
|
-
|
|
183
|
+
Without channel push, the AI uses `tandem_checkInbox` to pull the same events on demand. You can also ask Claude to poll periodically with `/loop 30s check tandem inbox and respond to any new messages`.
|
|
248
184
|
|
|
249
|
-
|
|
185
|
+
### Development setup
|
|
250
186
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
| `TANDEM_NO_SAMPLE` | unset | Set to `1` to skip auto-opening `sample/welcome.md` |
|
|
258
|
-
| `TANDEM_CLAUDE_CMD` | `claude` | Claude Code executable name (for `tandem setup` auto-detection) |
|
|
259
|
-
| `TANDEM_BIND_HOST` | `127.0.0.1` | Bind address for MCP HTTP (`0.0.0.0` for LAN) |
|
|
260
|
-
| `TANDEM_AUTH_TOKEN` | auto-generated | Override auth token (set by Tauri; manual use rare) |
|
|
261
|
-
| `TANDEM_ALLOW_UNAUTHENTICATED_LAN` | unset | Set to `1` to skip token requirement on LAN bind |
|
|
262
|
-
| `TANDEM_LAN_IP` | auto-detected | Explicit LAN IP for multi-homed machines |
|
|
263
|
-
| `TANDEM_REQUEST_TIMEOUT_MS` | `30000` | Per-request timeout in stdio bridge (ms) |
|
|
264
|
-
| `TANDEM_APP_DATA_DIR` | platform default | Override app-data root (sessions, auth-token, annotations) |
|
|
265
|
-
| `TANDEM_ANNOTATION_STORE` | unset | Set to `off` to disable durable annotation persistence |
|
|
266
|
-
|
|
267
|
-
See `.env.example` for a copy-paste template.
|
|
268
|
-
|
|
269
|
-
## Troubleshooting
|
|
270
|
-
|
|
271
|
-
Run `npm run doctor` for a quick diagnostic of your setup. It checks Node.js version, `.mcp.json` config, server health, and port status.
|
|
272
|
-
|
|
273
|
-
**Claude Code says "MCP failed to connect"**
|
|
274
|
-
Start the server first (`tandem` for global install, or `npm run dev:standalone` for dev setup), then open Claude Code. The server must be running before Claude Code probes the MCP URL. If you restart the server, run `/mcp` in Claude Code to reconnect.
|
|
275
|
-
|
|
276
|
-
**Port already in use**
|
|
277
|
-
Tandem kills stale processes on :3478/:3479 at startup. If another app uses those ports, set `TANDEM_PORT` / `TANDEM_MCP_PORT` to different values and update `TANDEM_URL` to match.
|
|
278
|
-
|
|
279
|
-
**Channel shim fails to start**
|
|
280
|
-
The `tandem-channel` entry spawns a subprocess. For global installs, `tandem setup` writes absolute paths to the bundled `dist/channel/index.js` — re-run `tandem setup` after upgrading. For dev setup, if you see `MODULE_NOT_FOUND` with a production config (`node dist/channel/index.js`), run `npm run build`. The default dev config uses `npx tsx` and doesn't require a build step.
|
|
187
|
+
```bash
|
|
188
|
+
git clone https://github.com/bloknayrb/tandem.git
|
|
189
|
+
cd tandem
|
|
190
|
+
npm install
|
|
191
|
+
npm run dev:standalone # backend (:3478, :3479) + frontend (:5173)
|
|
192
|
+
```
|
|
281
193
|
|
|
282
|
-
|
|
194
|
+
Open <http://127.0.0.1:5173>. The repo's `.mcp.json` configures Claude Code automatically when run from this directory.
|
|
283
195
|
|
|
284
|
-
|
|
285
|
-
The editor connects to the server via WebSocket. For global installs, run `tandem` to start the server. For dev setup, use `npm run dev:standalone` (or `npm run dev:server`). The message appears after 3 seconds of failed connection.
|
|
196
|
+
Verify the server is up:
|
|
286
197
|
|
|
287
|
-
|
|
288
|
-
|
|
198
|
+
```bash
|
|
199
|
+
curl http://127.0.0.1:3479/health
|
|
200
|
+
# → {"status":"ok","version":"x.y.z","transport":"http","hasSession":false}
|
|
201
|
+
```
|
|
289
202
|
|
|
290
|
-
|
|
203
|
+
For exposing the server on a LAN, set `TANDEM_BIND_HOST` and use `tandem rotate-token` to rotate the auth token. See [docs/security.md](docs/security.md) for the full network posture.
|
|
291
204
|
|
|
292
|
-
|
|
293
|
-
| ------------------------ | ---------------------------------------------------------------------------------- |
|
|
294
|
-
| `npm run dev:standalone` | **Recommended** — frontend + backend + monitor |
|
|
295
|
-
| `npm run dev:server` | Backend only: Hocuspocus (:3478) + MCP HTTP (:3479) |
|
|
296
|
-
| `npm run dev:client` | Frontend only: Vite dev server (:5173) |
|
|
297
|
-
| `npm run build` | Production build (`dist/server/` + `dist/channel/` + `dist/cli/` + `dist/client/`) |
|
|
298
|
-
| `npm test` | Run vitest (unit tests) |
|
|
299
|
-
| `npm run test:e2e` | Run Playwright E2E tests |
|
|
300
|
-
| `npm run test:e2e:ui` | Playwright UI mode |
|
|
301
|
-
| `cargo tauri dev` | Tauri desktop app (dev mode with hot-reload) |
|
|
302
|
-
| `cargo tauri build` | Tauri production build (installer output) |
|
|
205
|
+
See [docs/cli.md](docs/cli.md#npm-run-scripts-source-checkouts-only) for the full list of npm scripts.
|
|
303
206
|
|
|
304
|
-
|
|
207
|
+
### Tech stack
|
|
305
208
|
|
|
306
|
-
|
|
209
|
+
Tandem is built on [Tiptap](https://tiptap.dev) and [ProseMirror](https://prosemirror.net) (editor), [Yjs](https://yjs.dev) and [Hocuspocus](https://github.com/ueberdosis/hocuspocus) (CRDT sync), [Tauri 2](https://v2.tauri.app) (desktop), and [Svelte 5](https://svelte.dev) (UI).
|
|
307
210
|
|
|
308
|
-
|
|
211
|
+
### How to contribute
|
|
309
212
|
|
|
310
|
-
|
|
213
|
+
Open an issue first for non-trivial changes; for bug reports and small fixes, a PR is fine. Follow the workflow described in [CLAUDE.md](CLAUDE.md). Run `npm run typecheck` and `npm test` before opening a pull request.
|