dotshare-cli 3.0.1 → 3.1.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
@@ -24,14 +24,15 @@
24
24
 
25
25
  ---
26
26
 
27
- ## 🆕 What's New in 3.6.0 — MCP & Publishing Library
27
+ ## 🆕 What's New in 3.7.0 — Connect
28
28
 
29
- - **Local MCP server** for AI agents, with setup and diagnostics for Codex.
30
- - **Shared Publishing Library** for reviewing drafts, templates and per-account versions in VS Code.
31
- - **Saved previews and receipts** that record exactly which draft revision was published and where.
32
- - **Encrypted local records** with an OS-keyring master key and verified migration for existing libraries.
29
+ - **LinkedIn and X sign-in on dotsuite.dev**, with the whole exchange on the server.
30
+ - **Agents sign in through the browser:** `dotshare-agent accounts connect`, with no token to copy, and X sign-ins renew themselves.
31
+ - **Schedule saved drafts** with `schedule_draft`, so each platform gets its own version, images included.
32
+ - **Videos and GIFs from agents**, clickable **Bluesky mentions**, and **post stats** with `get_post_stats`.
33
+ - **One-command setup for Claude Code and Cursor.**
33
34
 
34
- [Download VS Code 3.6.0 (.vsix)](https://github.com/kareem2099/DotShare/releases/download/v3.6.0/dotshare-3.6.0.vsix) · [CLI and MCP on npm](https://www.npmjs.com/package/dotshare-cli) · [Release notes and tarball](https://github.com/kareem2099/DotShare/releases/tag/v3.6.0)
35
+ [Download VS Code 3.7.0 (.vsix)](https://github.com/kareem2099/DotShare/releases/download/v3.7.0/dotshare-3.7.0.vsix) · [CLI and MCP on npm](https://www.npmjs.com/package/dotshare-cli) · [Release notes and tarball](https://github.com/kareem2099/DotShare/releases/tag/v3.7.0)
35
36
 
36
37
  ---
37
38
 
@@ -44,17 +45,19 @@ content, multiple accounts, durable retry protection and DotSuite cloud scheduli
44
45
  are available through structured tools.
45
46
 
46
47
  Use Node.js 22.12+ and an unlocked OS credential store. Install the CLI and MCP
47
- server from npm, then connect Codex and a publishing account.
48
+ server from npm, then connect your MCP client and a publishing account.
48
49
 
49
50
  ```sh
50
51
  npm install -g dotshare-cli
51
- dotshare-agent setup
52
+ dotshare-agent setup # Codex; or --client claude / --client cursor
53
+ dotshare-agent accounts connect work-linkedin --platform linkedin # LinkedIn/X: sign in in the browser
52
54
  dotshare-agent accounts add personal-mastodon --platform mastodon
53
55
  dotshare-agent doctor --account personal-mastodon
54
56
  ```
55
57
 
56
- Enter the Mastodon instance and token in the terminal prompts. After setup, reconnect
57
- or restart Codex. Try this prompt to save a draft and prepare a preview:
58
+ `accounts connect` opens your browser to sign in to LinkedIn or X. For other platforms,
59
+ `accounts add` asks for the credentials in hidden terminal prompts. After setup, reconnect
60
+ or restart your MCP client. Try this prompt to save a draft and prepare a preview:
58
61
 
59
62
  > Use DotShare to save a draft titled “My first DotShare post” for `personal-mastodon` with the text “Hello from DotShare!” and prepare a preview for me to review.
60
63
 
@@ -103,7 +106,7 @@ composer drafts remain in their existing screen; no automatic migration occurs.
103
106
  code --install-extension freerave.dotshare
104
107
  ```
105
108
 
106
- **From GitHub:** download the `v3.6.0` VSIX above and run `code --install-extension ./dotshare-3.6.0.vsix`.
109
+ **From GitHub:** download the `v3.7.0` VSIX above and run `code --install-extension ./dotshare-3.7.0.vsix`.
107
110
  For the shared Publishing Library, also complete the [MCP quick start](#quick-start-for-ai-agents).
108
111
 
109
112
  Also available on the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=freerave.dotshare) and [Open VSX](https://open-vsx.org/extension/freerave/dotshare) (VSCodium, Cursor, Windsurf and other compatible editors). Requires VS Code **1.90** or later.
@@ -265,9 +268,9 @@ journals are encrypted with a separate OS-keyring master key. The old `dotshare
265
268
  - **Direct publishing** sends each credential only to its own platform. AI prompts go only to the provider you choose.
266
269
  - **Cloud scheduling is opt-in.** Before any credential is synced to DotSuite, DotShare asks for explicit consent (Mastodon has its own prompt). Sync requires HTTPS and a signed-in DotSuite account.
267
270
  - **Logs are redacted**: credential values and OAuth callback queries are excluded, and known secret formats are masked.
268
- - **Clear All Credentials** removes local platform, AI, GitHub and DotSuite secrets and cloud consent. Copies already synced to DotSuite are revoked from the DotSuite Dashboard.
271
+ - **DotShare: Clear All Credentials** (Command Palette) removes local platform, AI, GitHub and DotSuite secrets and cloud consent. It doesn't revoke tokens at each platform. To delete copies already synced to DotSuite, email support@dotsuite.dev.
269
272
 
270
- Server-side handling is implemented in the separately maintained DotSuite backend; local SecretStorage does not protect copies held there.
273
+ Server-side handling is implemented in the separately maintained DotSuite backend; local SecretStorage does not protect copies held there. Full details: **[DotShare Privacy Policy](https://dotsuite.dev/en/dotshare/privacy)**.
271
274
 
272
275
  ---
273
276
 
@@ -14,16 +14,17 @@ Install the CLI and MCP server from npm. For an existing library, follow the [up
14
14
 
15
15
  ```sh
16
16
  npm install -g dotshare-cli
17
- dotshare-agent setup
17
+ dotshare-agent setup # Codex; or --client claude / --client cursor
18
+ dotshare-agent accounts connect work-x --platform x # LinkedIn and X: browser sign-in
18
19
  dotshare-agent accounts add personal-mastodon --platform mastodon --name "Personal Mastodon"
19
20
  dotshare-agent doctor --account personal-mastodon
20
21
  ```
21
22
 
22
- Restart or reconnect Codex after setup. In Codex, ask DotShare to list your local
23
+ Restart or reconnect your MCP client after setup. In Codex, ask DotShare to list your local
23
24
  accounts, save a draft for one of them and prepare its preview. To review that draft
24
25
  in VS Code, follow the [Publishing Library guide](PUBLISHING_LIBRARY.md).
25
26
 
26
- You can also download the tarball and install it with `npm install -g ./dotshare-cli-3.0.0.tgz`. [GitHub release](https://github.com/kareem2099/DotShare/releases/tag/v3.6.0)
27
+ You can also download the tarball and install it with `npm install -g ./dotshare-cli-3.1.0.tgz`. [GitHub release](https://github.com/kareem2099/DotShare/releases/tag/v3.7.0)
27
28
 
28
29
  To build and configure from source instead:
29
30
 
@@ -43,12 +44,34 @@ Multiple accounts on one platform use
43
44
  different IDs. To replace an account's credentials, run `accounts add` with its ID.
44
45
  `accounts remove <id>` removes the local account and deletes its credential from the OS keyring.
45
46
  It does not revoke the token on the platform. Expired/revoked platform tokens must
46
- be replaced using `accounts add`; the local agent does not run browser OAuth or
47
- automatically refresh user-supplied OAuth tokens.
47
+ be replaced using `accounts add`, or `accounts connect` for LinkedIn and X.
48
+
49
+ ### Browser sign-in for LinkedIn and X
50
+
51
+ `dotshare-agent accounts connect <id> --platform linkedin|x [--name ...] [--no-open]`
52
+ opens dotsuite.dev in your browser, where you approve DotShare on LinkedIn or X.
53
+ There is no token to copy. The CLI listens on `127.0.0.1` for the result, which
54
+ dotsuite.dev encrypts to a key that exists only in that CLI process (X25519 + HKDF +
55
+ AES-256-GCM). Tokens never appear readable in a URL or in browser history. A nonce
56
+ inside the ciphertext ties the result to this sign-in; anything else sent to the port
57
+ is ignored. The wait ends after 5 minutes (`--timeout` changes it).
58
+
59
+ X access tokens last two hours. For accounts connected this way, DotShare swaps the
60
+ refresh token through dotsuite.dev when an X token has under five minutes left,
61
+ before publishing or checking the account. The rotated pair is saved to the keyring
62
+ first. Refreshing doesn't invalidate saved previews, because a connected account is
63
+ identified by its sign-in, not its current token. LinkedIn sign-ins last 60 days;
64
+ `doctor --check-accounts` warns a week before they expire. Tokens pasted with
65
+ `accounts add` are used as they are and never refreshed.
48
66
 
49
67
  After packaging/installing the CLI, the same commands are available through
50
68
  `dotshare`, `dotshare-agent`, and the dedicated `dotshare-mcp` server entrypoint.
51
69
 
70
+ The npm package also ships an agent skill at `skills/dotshare/SKILL.md` (in the
71
+ installed package directory, e.g. `$(npm root -g)/dotshare-cli/skills/dotshare`). Copy
72
+ that folder into your agent's skills directory so it follows DotShare's draft → preview
73
+ → approval → publish workflow and per-platform rules.
74
+
52
75
  ### Credential fields
53
76
 
54
77
  | Platform | Fields entered during setup |
@@ -132,13 +155,18 @@ allowed. Existing allowed directories are retained when setup runs again:
132
155
  dotshare-agent setup --media-root /absolute/path/to/images
133
156
  dotshare-agent setup --text-only
134
157
  dotshare-agent setup --dry-run
158
+ dotshare-agent setup --client claude
159
+ dotshare-agent setup --client cursor
135
160
  dotshare-agent setup --client generic
136
161
  dotshare-agent setup --config /absolute/path/to/config.toml --json
137
162
  ```
138
163
 
139
164
  `--dry-run` checks the server and prints a configuration preview without writing
140
- settings. `--client generic` prints an `mcpServers` JSON snippet for manual import;
141
- adapt the wrapper key to your client's format. A different existing DotShare server
165
+ settings. `--client claude` adds DotShare to Claude Code's user scope by running
166
+ `claude mcp add-json` (with `--dry-run` it prints that command instead).
167
+ `--client cursor` merges a `dotshare` entry into `~/.cursor/mcp.json` (or `--config`),
168
+ keeping other servers and settings and saving a backup. `--client generic` prints an
169
+ `mcpServers` JSON snippet for manual import; adapt the wrapper key to your client's format. A different existing DotShare server
142
170
  is preserved unless `--replace` is explicitly supplied. Existing inline/dotted-key
143
171
  DotShare TOML entries must be converted to `[mcp_servers.dotshare]` before automatic
144
172
  updates; malformed config files are never overwritten. `CODEX_HOME` is honored.
@@ -208,10 +236,10 @@ Example requests after connecting:
208
236
  The server exposes `list_accounts`, `preview_post`, `publish_post`, `get_operation`,
209
237
  `list_history`, `list_cloud_connections`, `schedule_post`, `list_scheduled_posts`, and
210
238
  `cancel_scheduled_post`, plus `create_draft`, `get_draft`, `list_drafts`,
211
- `update_draft`, `preview_draft`, and `publish_draft`, plus `list_templates`,
239
+ `update_draft`, `preview_draft`, `publish_draft` and `schedule_draft`, plus `list_templates`,
212
240
  `get_template`, `save_template`, `delete_template`, `render_template`,
213
- `create_draft_from_template`, `get_draft_variants` and `set_draft_variant`
214
- (23 tools total).
241
+ `create_draft_from_template`, `get_draft_variants`, `set_draft_variant` and `get_post_stats`
242
+ (25 tools total).
215
243
  `dotshare://guide` describes the workflow, and the
216
244
  `release-announcement` prompt helps prepare drafts from release notes.
217
245
 
@@ -479,9 +507,26 @@ is published to. Character counts for combined emoji on X/Bluesky are conservati
479
507
  | Local images | PNG/JPEG; WebP also on Bluesky, Mastodon and Discord |
480
508
  | Size | 1,000,000 bytes/image on Bluesky; 8 MiB/image otherwise, subject to platform limits |
481
509
  | Images/post | X/Bluesky/Mastodon up to 4 (Mastodon also checks instance limits); LinkedIn 1; Telegram/Discord 10 |
482
- | Telegram | Caption limited to 1,024 characters; multiple images are sent as separate messages, caption on first |
510
+ | Video (MP4/MOV) | X 512 MB, LinkedIn 200 MB, Mastodon 99 MB (WebM too), Telegram 50 MB, Discord 10 MB (WebM too); not Bluesky |
511
+ | GIF | X 15 MB, Mastodon 16 MB, Telegram 50 MB, Discord 10 MB; not LinkedIn or Bluesky |
512
+ | Mixing | On X and Mastodon a video or GIF must be the post's only media |
513
+ | Telegram | Caption limited to 1,024 characters; multiple files are sent as separate messages, caption on first |
483
514
  | Dev.to | Public HTTPS image URLs; local files are rejected |
484
- | Video/GIF | Not supported by this initial agent interface |
515
+
516
+ Files are identified by their first bytes and extension. X videos and GIFs use the v2
517
+ chunked upload and wait for X to finish processing before posting; Mastodon waits
518
+ for its own processing. Bluesky turns `@handle.domain` into a mention when the handle
519
+ resolves; other handles stay plain text.
520
+
521
+ ## Post stats
522
+
523
+ `get_post_stats` (CLI: `dotshare-agent stats --request-id ID` or `--draft DRAFT_ID`)
524
+ reads current engagement for a published operation: likes, reposts, replies and
525
+ quotes, plus impressions on X and views, reactions and comments on Dev.to, per
526
+ account and thread part. It is read-only. Bluesky uses the public AppView;
527
+ Mastodon, X, LinkedIn and Dev.to use the account's saved credentials. Telegram and
528
+ Discord offer no metrics. LinkedIn returns them only to apps with read access, and
529
+ X depends on the API plan; when a platform refuses, the result says why.
485
530
 
486
531
  Dev.to requires `article: {"title":"Release notes","tags":["opensource"],"published":true}`.
487
532
  Optional article fields include `canonicalUrl`, `coverImage`, `description`, and
@@ -534,9 +579,21 @@ Backend plan limits, permissions and available connections still apply.
534
579
  }
535
580
  ```
536
581
 
537
- Scheduling requires a timezone and at least one minute of lead time. It supports one
538
- post with public HTTPS image URLs, without local file uploads, threads or account
539
- overrides. Discord cloud scheduling is unavailable. `DOTSUITE_API_URL` optionally
582
+ ### Scheduling a saved draft
583
+
584
+ `schedule_draft` (CLI: `drafts schedule ID --revision N --preview-id P --request-id R --at TIME`)
585
+ schedules a previewed draft through DotSuite with the same revision/preview checks as
586
+ `publish_draft`. It makes one cloud post per platform with that platform's own
587
+ variant. Local images and GIFs are uploaded to DotSuite first (5 MB each), so a
588
+ failed upload schedules nothing. Each platform's scheduled post ID is kept as its
589
+ receipt, and the draft becomes `Scheduled`. Cloud posts are single posts: thread
590
+ parts, LinkedIn first comments, videos, Discord and Dev.to are refused with a clear
591
+ reason. Every account on a platform must share one text, because DotSuite has one
592
+ connection per platform. Retrying needs the same `requestId` and time.
593
+
594
+ Scheduling requires a timezone and at least one minute of lead time. `schedule_post`
595
+ supports one post with public HTTPS image URLs, without local file uploads, threads or
596
+ account overrides. Discord cloud scheduling is unavailable. `DOTSUITE_API_URL` optionally
540
597
  selects a compatible HTTPS backend. It cannot contain credentials/query parameters.
541
598
 
542
599
  ## Build and validate