redraft-local 1.1.1 → 1.2.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/README.md CHANGED
@@ -20,6 +20,8 @@ ReDraft turns any Git repository into a review workspace for markdown documents.
20
20
 
21
21
  **Remote and local are the same UI.** Use [redraft-docs.dev](https://redraft-docs.dev) to review any GitHub repo in the browser, or run `npx redraft-local` to serve your local checkout. Local mode lets you edit with your own tools — your editor, your scripts, your AI agents — and see changes reflected live. ReDraft ships with [built-in skills](.agents/skills/redraft-review/) for walking comment threads, drafting replies, and revising documents, so agents work alongside human reviewers out of the box.
22
22
 
23
+ **Documentation stays next to the code.** Docs live as plain `.md` files in the same repo as the code they describe — no wiki, no external platform, no sync to maintain. When code changes, the docs are right there to update in the same PR. ReDraft adds a review layer on top without moving anything out of your repository.
24
+
23
25
  ---
24
26
 
25
27
  ## Get started
@@ -28,21 +30,32 @@ ReDraft turns any Git repository into a review workspace for markdown documents.
28
30
 
29
31
  Visit [redraft-docs.dev](https://redraft-docs.dev), enter a fine-grained GitHub PAT (`Contents: Read/Write` + `Metadata: Read`), point it at any repo, and start reviewing. Nothing to install.
30
32
 
33
+ > [!NOTE]
34
+ > ReDraft currently uses a fine-grained PAT for GitHub access. Real GitHub OAuth is coming soon.
35
+
31
36
  ### Local (advanced)
32
37
 
33
38
  For power users and AI agents who want to work with local tools:
34
39
 
35
40
  ```bash
36
- npx redraft-local --open
41
+ npx redraft-local
37
42
  ```
38
43
 
39
- Launches a local server and opens the browser automatically. Every `.md` file in your working directory is ready for review — no signup, no PAT, no config. Edit files in your own editor or with AI agents and see changes live in the browser.
44
+ Launches a local server and opens the browser. Every `.md` file in your working directory is ready for review — no signup, no PAT, no config. Edit files in your own editor or with AI agents and see changes live in the browser.
40
45
 
41
46
  ---
42
47
 
43
48
  ## How it works
44
49
 
45
- ReDraft stores nothing outside your repository. Documents are plain `.md` files on any branch — pick the branch you want to review from the branch selector. Comment threads live as structured JSON on a dedicated sidecar branch (`redraft` by default) under `.redraft/comments/`. The sidecar branch never touches your working tree — no merge conflicts, no noise in diffs.
50
+ ReDraft stores nothing outside your repository. Documents are plain `.md` files on any branch — pick the branch you want to review from the branch selector. Comment threads live as structured JSON on a dedicated sidecar branch (`redraft` by default) under `.redraft/comments/`. The sidecar branch never touches your working tree — no merge conflicts, no noise in diffs. In local mode the branch is created automatically when you first comment; for remote mode, create it once:
51
+
52
+ ```bash
53
+ # one-time setup — create an empty orphan branch for comment storage
54
+ bash scripts/create-sidecar-branch.sh # or: npx redraft-local init (#41)
55
+ git push origin redraft
56
+ ```
57
+
58
+ See [`scripts/create-sidecar-branch.sh`](scripts/create-sidecar-branch.sh) for details.
46
59
 
47
60
  ```
48
61
  your-repo/
@@ -51,7 +64,7 @@ your-repo/
51
64
  │ ├── rfcs/rfc-001.md
52
65
  │ └── docs/architecture.md
53
66
 
54
- └── redraft (sidecar branch — created automatically)
67
+ └── redraft (sidecar branch)
55
68
  └── .redraft/comments/<document-branch>/
56
69
  ├── proposals/api-design.comments.json
57
70
  └── rfcs/rfc-001.comments.json
@@ -106,7 +119,7 @@ npx redraft-local serve [directory] [options]
106
119
 
107
120
  --port <number> Port to listen on (default: 4200)
108
121
  --host <string> Bind address (default: 127.0.0.1)
109
- --open Open the browser automatically
122
+ --no-open Skip opening the browser on startup
110
123
  --sidecar-branch <string> Git branch for comments (default: redraft)
111
124
  --no-ui API-only mode, skip serving the frontend
112
125
  ```
@@ -1268,7 +1268,7 @@ async function runServe(directory = ".", options = {}) {
1268
1268
  runningServer.hub.broadcast(event);
1269
1269
  });
1270
1270
  console.log(`ReDraft local server listening at ${runningServer.url}`);
1271
- if (options.open) {
1271
+ if (options.open !== false) {
1272
1272
  triggerBrowserOpen(runningServer.url);
1273
1273
  }
1274
1274
  const shutdown = async (exitCode = 0) => {
@@ -1288,7 +1288,7 @@ function registerServeOptions(command) {
1288
1288
  "--port <number>",
1289
1289
  "Port to listen on (default: 4200)",
1290
1290
  (value) => Number(value)
1291
- ).option("--open", "Open the ReDraft UI in the default browser", false).option("--no-ui", "Skip serving the static frontend", false).option("--host <string>", "Bind address (default: 127.0.0.1)", "127.0.0.1").option(
1291
+ ).option("--no-open", "Skip opening the browser on startup").option("--no-ui", "Skip serving the static frontend", false).option("--host <string>", "Bind address (default: 127.0.0.1)", "127.0.0.1").option(
1292
1292
  "--sidecar-branch <string>",
1293
1293
  "Git branch for sidecar comment files (default: redraft)",
1294
1294
  "redraft"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redraft-local",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "Local-first proposal review tool — serve and review Markdown proposals from any directory",
5
5
  "repository": {
6
6
  "type": "git",