dotshare-cli 3.0.1 → 3.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
@@ -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.8.0 — Fair X
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
+ - **X posts go through DotSuite** and count against your plan's monthly X budget (X charges per post). Your X token stays on DotSuite.
30
+ - **See the cost before you post:** agents show the exact X charge and what's left, and the DotSuite dashboard lists every charge.
31
+ - **Fair charges:** X's published prices, or what X actually took when that's higher.
33
32
 
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)
33
+ Builds on 3.7.0: sign-in on dotsuite.dev, browser sign-in for agents, `schedule_draft`, video and GIFs, Bluesky mentions, post stats and setup for Claude Code and Cursor.
34
+
35
+ [Download VS Code 3.8.0 (.vsix)](https://github.com/kareem2099/DotShare/releases/download/v3.8.0/dotshare-3.8.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.8.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.8.0` VSIX above and run `code --install-extension ./dotshare-3.8.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.2.0.tgz`. [GitHub release](https://github.com/kareem2099/DotShare/releases/tag/v3.8.0)
27
28
 
28
29
  To build and configure from source instead:
29
30
 
@@ -43,12 +44,56 @@ 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
+ ### X through DotSuite (metered)
50
+
51
+ X charges DotSuite for every post made through DotShare's X app, so once X posting
52
+ moves to DotSuite (DotSuite's `X_SERVER_ONLY` setting), an X sign-in saves the X
53
+ connection to the user's DotSuite account. The X token never reaches the device. The
54
+ local account stores only `{"via": "dotsuite"}`, and posts go through
55
+ `POST /v1/x/posts` with the DotSuite key from `dotshare cloud login`:
56
+
57
+ - Each plan has a monthly X budget. Preview calls `POST /v1/x/estimate` and shows the
58
+ exact charge and what's left, and refuses posts the budget can't cover.
59
+ - Prices follow X's list ($0.015 per post, $0.20 with a link, plus images). Anything
60
+ that might be a link is priced as one, and if X deducts more than the estimate
61
+ (measured from DotSuite's X balance before and after each post), the actual amount
62
+ is charged.
63
+ - Publishing is idempotent by request ID, so retries never post or charge twice. A post
64
+ X doesn't confirm is charged and never resent automatically.
65
+ - Images and GIFs are uploaded to DotSuite first; videos aren't supported this way yet.
66
+ Stats aren't available for these accounts.
67
+
68
+ To post with your own X developer app instead (X bills you directly, DotSuite isn't
69
+ involved), add its access token with `dotshare-agent accounts add <id> --platform x`.
70
+
71
+ ### Browser sign-in for LinkedIn and X
72
+
73
+ `dotshare-agent accounts connect <id> --platform linkedin|x [--name ...] [--no-open]`
74
+ opens dotsuite.dev in your browser, where you approve DotShare on LinkedIn or X.
75
+ There is no token to copy. The CLI listens on `127.0.0.1` for the result, which
76
+ dotsuite.dev encrypts to a key that exists only in that CLI process (X25519 + HKDF +
77
+ AES-256-GCM). Tokens never appear readable in a URL or in browser history. A nonce
78
+ inside the ciphertext ties the result to this sign-in; anything else sent to the port
79
+ is ignored. The wait ends after 5 minutes (`--timeout` changes it).
80
+
81
+ X access tokens last two hours. For accounts connected this way, DotShare swaps the
82
+ refresh token through dotsuite.dev when an X token has under five minutes left,
83
+ before publishing or checking the account. The rotated pair is saved to the keyring
84
+ first. Refreshing doesn't invalidate saved previews, because a connected account is
85
+ identified by its sign-in, not its current token. LinkedIn sign-ins last 60 days;
86
+ `doctor --check-accounts` warns a week before they expire. Tokens pasted with
87
+ `accounts add` are used as they are and never refreshed.
48
88
 
49
89
  After packaging/installing the CLI, the same commands are available through
50
90
  `dotshare`, `dotshare-agent`, and the dedicated `dotshare-mcp` server entrypoint.
51
91
 
92
+ The npm package also ships an agent skill at `skills/dotshare/SKILL.md` (in the
93
+ installed package directory, e.g. `$(npm root -g)/dotshare-cli/skills/dotshare`). Copy
94
+ that folder into your agent's skills directory so it follows DotShare's draft → preview
95
+ → approval → publish workflow and per-platform rules.
96
+
52
97
  ### Credential fields
53
98
 
54
99
  | Platform | Fields entered during setup |
@@ -132,13 +177,18 @@ allowed. Existing allowed directories are retained when setup runs again:
132
177
  dotshare-agent setup --media-root /absolute/path/to/images
133
178
  dotshare-agent setup --text-only
134
179
  dotshare-agent setup --dry-run
180
+ dotshare-agent setup --client claude
181
+ dotshare-agent setup --client cursor
135
182
  dotshare-agent setup --client generic
136
183
  dotshare-agent setup --config /absolute/path/to/config.toml --json
137
184
  ```
138
185
 
139
186
  `--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
187
+ settings. `--client claude` adds DotShare to Claude Code's user scope by running
188
+ `claude mcp add-json` (with `--dry-run` it prints that command instead).
189
+ `--client cursor` merges a `dotshare` entry into `~/.cursor/mcp.json` (or `--config`),
190
+ keeping other servers and settings and saving a backup. `--client generic` prints an
191
+ `mcpServers` JSON snippet for manual import; adapt the wrapper key to your client's format. A different existing DotShare server
142
192
  is preserved unless `--replace` is explicitly supplied. Existing inline/dotted-key
143
193
  DotShare TOML entries must be converted to `[mcp_servers.dotshare]` before automatic
144
194
  updates; malformed config files are never overwritten. `CODEX_HOME` is honored.
@@ -208,10 +258,10 @@ Example requests after connecting:
208
258
  The server exposes `list_accounts`, `preview_post`, `publish_post`, `get_operation`,
209
259
  `list_history`, `list_cloud_connections`, `schedule_post`, `list_scheduled_posts`, and
210
260
  `cancel_scheduled_post`, plus `create_draft`, `get_draft`, `list_drafts`,
211
- `update_draft`, `preview_draft`, and `publish_draft`, plus `list_templates`,
261
+ `update_draft`, `preview_draft`, `publish_draft` and `schedule_draft`, plus `list_templates`,
212
262
  `get_template`, `save_template`, `delete_template`, `render_template`,
213
- `create_draft_from_template`, `get_draft_variants` and `set_draft_variant`
214
- (23 tools total).
263
+ `create_draft_from_template`, `get_draft_variants`, `set_draft_variant` and `get_post_stats`
264
+ (25 tools total).
215
265
  `dotshare://guide` describes the workflow, and the
216
266
  `release-announcement` prompt helps prepare drafts from release notes.
217
267
 
@@ -479,9 +529,26 @@ is published to. Character counts for combined emoji on X/Bluesky are conservati
479
529
  | Local images | PNG/JPEG; WebP also on Bluesky, Mastodon and Discord |
480
530
  | Size | 1,000,000 bytes/image on Bluesky; 8 MiB/image otherwise, subject to platform limits |
481
531
  | 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 |
532
+ | Video (MP4/MOV) | X 512 MB, LinkedIn 200 MB, Mastodon 99 MB (WebM too), Telegram 50 MB, Discord 10 MB (WebM too); not Bluesky |
533
+ | GIF | X 15 MB, Mastodon 16 MB, Telegram 50 MB, Discord 10 MB; not LinkedIn or Bluesky |
534
+ | Mixing | On X and Mastodon a video or GIF must be the post's only media |
535
+ | Telegram | Caption limited to 1,024 characters; multiple files are sent as separate messages, caption on first |
483
536
  | Dev.to | Public HTTPS image URLs; local files are rejected |
484
- | Video/GIF | Not supported by this initial agent interface |
537
+
538
+ Files are identified by their first bytes and extension. X videos and GIFs use the v2
539
+ chunked upload and wait for X to finish processing before posting; Mastodon waits
540
+ for its own processing. Bluesky turns `@handle.domain` into a mention when the handle
541
+ resolves; other handles stay plain text.
542
+
543
+ ## Post stats
544
+
545
+ `get_post_stats` (CLI: `dotshare-agent stats --request-id ID` or `--draft DRAFT_ID`)
546
+ reads current engagement for a published operation: likes, reposts, replies and
547
+ quotes, plus impressions on X and views, reactions and comments on Dev.to, per
548
+ account and thread part. It is read-only. Bluesky uses the public AppView;
549
+ Mastodon, X, LinkedIn and Dev.to use the account's saved credentials. Telegram and
550
+ Discord offer no metrics. LinkedIn returns them only to apps with read access, and
551
+ X depends on the API plan; when a platform refuses, the result says why.
485
552
 
486
553
  Dev.to requires `article: {"title":"Release notes","tags":["opensource"],"published":true}`.
487
554
  Optional article fields include `canonicalUrl`, `coverImage`, `description`, and
@@ -534,9 +601,21 @@ Backend plan limits, permissions and available connections still apply.
534
601
  }
535
602
  ```
536
603
 
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
604
+ ### Scheduling a saved draft
605
+
606
+ `schedule_draft` (CLI: `drafts schedule ID --revision N --preview-id P --request-id R --at TIME`)
607
+ schedules a previewed draft through DotSuite with the same revision/preview checks as
608
+ `publish_draft`. It makes one cloud post per platform with that platform's own
609
+ variant. Local images and GIFs are uploaded to DotSuite first (5 MB each), so a
610
+ failed upload schedules nothing. Each platform's scheduled post ID is kept as its
611
+ receipt, and the draft becomes `Scheduled`. Cloud posts are single posts: thread
612
+ parts, LinkedIn first comments, videos, Discord and Dev.to are refused with a clear
613
+ reason. Every account on a platform must share one text, because DotSuite has one
614
+ connection per platform. Retrying needs the same `requestId` and time.
615
+
616
+ Scheduling requires a timezone and at least one minute of lead time. `schedule_post`
617
+ supports one post with public HTTPS image URLs, without local file uploads, threads or
618
+ account overrides. Discord cloud scheduling is unavailable. `DOTSUITE_API_URL` optionally
540
619
  selects a compatible HTTPS backend. It cannot contain credentials/query parameters.
541
620
 
542
621
  ## Build and validate