dotshare-cli 3.2.1 → 3.2.2

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.
@@ -0,0 +1,81 @@
1
+ # Tool reference
2
+
3
+ ## Contents
4
+ - Content fields
5
+ - Drafts
6
+ - Quick path
7
+ - Templates
8
+ - History and stats
9
+
10
+ ## Content fields
11
+
12
+ Used by `create_draft` (under `content`), `preview_post` and `publish_post`:
13
+
14
+ ```
15
+ {
16
+ accountIds: ["work-x", "work-linkedin"], // 1–20 IDs from list_accounts
17
+ text: "…", media: ["cover.png"], // a single post, or…
18
+ posts: [{ text, media }, …], // …explicit thread parts (X, Bluesky, Mastodon)
19
+ autoSplit: false, // true: split long `text` into numbered parts mechanically
20
+ firstComment: "…", // LinkedIn only, ≤1250: posted right after, e.g. the link
21
+ overrides: { "<accountId>": { text?, media?, posts?, firstComment? } },
22
+ article: { title, tags, published, description?, series?, canonicalUrl?, coverImage? } // Dev.to
23
+ }
24
+ ```
25
+
26
+ Use either `posts` or `text`/`media`, not both. Prefer `posts` when you wrote the
27
+ thread; `autoSplit` only for long text the user wants split as is. Media paths are
28
+ local files inside the allowed media folders (relative paths are looked up there);
29
+ Dev.to takes public HTTPS image URLs.
30
+
31
+ ## Drafts
32
+
33
+ | Tool | Does | Publishes? |
34
+ |---|---|---|
35
+ | `create_draft { title, content }` | saves a draft; returns `draftId`, `revision: 1` | no |
36
+ | `get_draft { draftId }` / `list_drafts` | reads drafts, their status and receipts | no |
37
+ | `update_draft { draftId, expectedRevision, patch }` | edits the base content; bumps the revision | no |
38
+ | `set_draft_variant { draftId, expectedRevision, accountId, variant }` | per-account text, media, thread or first comment; `variant: null` resets it | no |
39
+ | `get_draft_variants { draftId }` | the effective content and character counts per account | no |
40
+ | `preview_draft { draftId, expectedRevision }` | validates every account; returns `previewId`, or errors | no |
41
+ | `publish_draft { draftId, expectedRevision, previewId, requestId }` | posts exactly that preview, once | **yes** |
42
+
43
+ Draft statuses: `Draft` → `Preview` → `Published` (public), `SavedRemotely` (a Dev.to
44
+ draft), `Scheduled`, or `NeedsReview` (see recovery.md). `Published`, `Publishing`
45
+ and `NeedsReview` drafts can't be edited.
46
+
47
+ `requestId`: one per approved action, letters, digits, `.`, `_`, `-`, up to 100
48
+ characters, for example `launch-2026-11-11-1`. Reuse it only to retry the same action.
49
+
50
+ ## Quick path
51
+
52
+ `preview_post { …content }` checks a one-off post without saving it. After approval,
53
+ `publish_post { …same content, requestId }`. Never copy a saved draft into
54
+ `publish_post` to get around its revision checks.
55
+
56
+ ## Templates
57
+
58
+ For repeated formats (release notes, weekly updates):
59
+ 1. `list_templates`, then `get_template { templateId }` for its variables.
60
+ 2. `render_template { templateId, expectedRevision, values, accountIds }` to try
61
+ values. It doesn't save, publish or contact any platform.
62
+ 3. `create_draft_from_template` with the same fields (plus an optional `title`), then
63
+ continue with the normal draft workflow.
64
+
65
+ Built-in, read-only: `builtin-release`, `builtin-progress`, `builtin-launch`,
66
+ `builtin-bugfix`, `builtin-article`. To customize one, `save_template` a copy under a
67
+ new ID. Updating a custom template needs its `expectedRevision`; `delete_template`
68
+ only on the user's request. A missing variable is an error: ask the user, never fill
69
+ in facts or URLs.
70
+
71
+ ## History and stats
72
+
73
+ - `list_history` lists recent publish, schedule and cancel operations;
74
+ `get_operation { requestId }` reads one.
75
+ - `get_post_stats { requestId }` or `{ draftId }`: likes, reposts, replies and quotes
76
+ for something already published, per account and thread part, plus impressions on X
77
+ and views, reactions and comments on Dev.to. Read-only. Telegram and Discord have no
78
+ metrics; LinkedIn and X may refuse depending on the app's access, and X accounts
79
+ through DotSuite have none. Numbers change, so say when they were checked.
80
+ - Present stats as one small table per post, best-performing first, and only the
81
+ columns that have numbers.
@@ -0,0 +1,166 @@
1
+ # Writing posts that work
2
+
3
+ The user chose DotShare to get good posts with little effort. Your job is to turn
4
+ their material into posts people stop for, on each platform, without inventing
5
+ anything.
6
+
7
+ ## Contents
8
+ - Before you write
9
+ - Hooks
10
+ - Shapes by platform
11
+ - Style rules
12
+ - One source, every platform (worked example)
13
+ - Dev.to articles
14
+ - Other languages
15
+ - Checklist before preview
16
+
17
+ ## Before you write
18
+
19
+ Answer three questions from the user's material. Ask only if you can't:
20
+ 1. **What's the one thing a reader should take away?** One sentence. Everything else
21
+ supports it or gets cut.
22
+ 2. **Who reads it?** Developers, users of the product, recruiters on LinkedIn, the
23
+ user's own community. It decides the vocabulary.
24
+ 3. **What should they do next?** Read the article, try the release, star the repo,
25
+ reply. One call to action, at the end.
26
+
27
+ Then collect the concrete facts: names, version, what changed, numbers, the link. If
28
+ the post needs a fact that isn't in the material (a URL, a version, a result), ask
29
+ for it. Never fill it in.
30
+
31
+ ## Hooks
32
+
33
+ The first line decides whether anyone reads the rest. On X and Bluesky it's all
34
+ people see in the feed; on LinkedIn it's the text before "…see more".
35
+
36
+ Strong openers, in rough order of how often they work:
37
+ - **The result:** "Tidewater now works offline, and syncs without asking who wins."
38
+ - **The problem, sharply:** "Most clipboard managers treat a password like any
39
+ other text."
40
+ - **A surprising fact from the material:** "The reply cost $0.01. We charged $0.20."
41
+ - **A before/after:** "Sign-in used to take three screens. Now it's one tap."
42
+ - **A question only if the post answers it right away.**
43
+
44
+ Avoid: "I'm excited to announce", "Big news!", "In today's fast-paced world",
45
+ "Let's dive in", "Thread 🧵👇" as the whole first line, and a hook the post doesn't
46
+ deliver on.
47
+
48
+ ## Shapes by platform
49
+
50
+ | Platform | Best shape | Link | Hashtags | Formatting |
51
+ |---|---|---|---|---|
52
+ | X | Hook post plus 2–5 replies, or one sharp post | last part (on DotSuite it costs more: see platforms.md) | 1–2, at the end | plain text |
53
+ | Bluesky | Like X, up to 300 per part | last part; links become clickable | 1–3, inline or at the end | plain text |
54
+ | Mastodon | One rich post (500 by default), a thread only for long stories | in the post | 3–5, CamelCase (#OpenSource), at the end | plain text |
55
+ | LinkedIn | One post: hook, 3–6 short paragraphs, takeaway | `firstComment`, not the body | 3–5 at the end | plain text, line breaks |
56
+ | Telegram | One message; a caption with an image is ≤1,024 | in the message | 0–2 | plain text, no Markdown |
57
+ | Discord | One message for the community | in the message | none | Markdown, code blocks |
58
+ | Dev.to | A full article (see below) | inline Markdown links | 4 tags in `article.tags` | Markdown |
59
+
60
+ **Threads (X, Bluesky, Mastodon):**
61
+ - Part 1 is the hook and must work alone. Add "🧵" or "1/4" only if it helps.
62
+ - One idea per part. Each part makes sense if someone sees it alone.
63
+ - Never split a sentence across parts. Stay ~10% under the limit so small edits fit.
64
+ - The last part carries the payoff: the link, the call to action, the hashtags.
65
+ - 3–5 parts is usually right. A 12-part thread loses most readers by part 4.
66
+ - Put the image on part 1, where it earns the click.
67
+
68
+ **LinkedIn:** write for people who don't follow the project. Lead with the outcome
69
+ or the lesson, explain why it matters in plain words, give one or two concrete
70
+ details, end with a takeaway or a question. Short paragraphs (1–3 lines). The link
71
+ goes in `firstComment`, which DotShare posts right after.
72
+
73
+ ## Style rules
74
+
75
+ - **Specific beats impressive.** "Startup went from 4.1 s to 0.9 s" beats "blazing
76
+ fast". Use the user's real numbers only.
77
+ - **Plain words, active voice.** "DotShare now schedules drafts", not "Scheduling
78
+ functionality has been introduced".
79
+ - **Cut hype:** revolutionary, game-changing, seamless, cutting-edge, supercharge,
80
+ unleash, robust, leverage. Say what it does instead.
81
+ - **Emoji: at most one or two**, and only where they carry meaning (→ or ✅ as list
82
+ markers are fine). None on LinkedIn headlines unless the user uses them.
83
+ - **Hashtags are for discovery, not decoration.** Use the ones the user's
84
+ community actually follows, and keep them at the end.
85
+ - **Code, commands and file names** in backticks only on Discord and Dev.to. On other
86
+ platforms write them plainly: `npm install -g dotshare-cli` becomes
87
+ npm install -g dotshare-cli.
88
+ - **No walls of text.** Line breaks between ideas, lists with → or •.
89
+ - **Credit and accuracy:** don't claim "first", "only" or "fastest" unless the
90
+ material proves it. Name contributors the user names.
91
+
92
+ ## One source, every platform
93
+
94
+ Source (the user's changelog): *"Tidewater 2.0: offline sync, conflicts resolved by
95
+ field, 40% smaller app. https://example.com/tidewater-2"* (a made-up example: use
96
+ the user's real material).
97
+
98
+ **X (thread):**
99
+ 1. Tidewater 2.0 works offline. Edit anywhere, and it syncs when you're back, without a "which version wins?" dialog.
100
+ 2. Conflicts are resolved per field, not per record. If you changed the title and I changed the date, both changes stay.
101
+ 3. And the app is 40% smaller.
102
+ 4. What changed and how it works: https://example.com/tidewater-2 #OpenSource
103
+
104
+ **LinkedIn (one post, link in `firstComment`):**
105
+ > Tidewater 2.0 works offline.
106
+ >
107
+ > The hard part of offline sync isn't storing changes. It's merging them. Most apps
108
+ > pick a winner per record, so someone's edit disappears.
109
+ >
110
+ > Tidewater merges per field instead: if you changed the title and a teammate changed
111
+ > the date, both survive. And the app got 40% smaller on the way.
112
+ >
113
+ > The full write-up is in the first comment.
114
+ >
115
+ > #OfflineFirst #MobileDev #OpenSource
116
+
117
+ **Mastodon (one post):**
118
+ > Tidewater 2.0 is out, and it works offline.
119
+ >
120
+ > → Syncs when you're back, no "which version wins?" dialog
121
+ > → Conflicts are merged per field, so nobody's edit disappears
122
+ > → 40% smaller app
123
+ >
124
+ > https://example.com/tidewater-2
125
+ >
126
+ > #OpenSource #OfflineFirst #MobileDev
127
+
128
+ Same facts, three native shapes. In DotShare: the base content is the most common
129
+ shape, and each other account gets a variant (`set_draft_variant`).
130
+
131
+ ## Dev.to articles
132
+
133
+ - **Title** (≤128 characters): specific and honest about what the reader gets.
134
+ "Charging for X posts like a card payment" beats "My journey with billing".
135
+ - **Description** (≤500): one or two sentences shown in the feed and in search.
136
+ - **Tags**: up to 4, lowercase letters and digits only (`rust`, `opensource`).
137
+ - **Series**: reuse the user's existing series name exactly for multi-part posts.
138
+ - **Canonical URL**: set it when the article was first published elsewhere.
139
+ - **Structure that works:** a short intro with the problem or the hook → what
140
+ changed or what you built → how it works, with real code or commands → what broke
141
+ and what you learned → results, tests or numbers → "Try it" with links.
142
+ - **Code blocks with a language** (```rust), short and real. No pseudo-code
143
+ pretending to be the real thing.
144
+ - **AI disclosure:** if you drafted most of the article, suggest a one-line note at
145
+ the end (for example "I used AI assistance to write this; the details come from the
146
+ shipped code"). Dev.to's guidelines ask for it.
147
+ - Save it with `published: false` first unless the user said to publish. Then the
148
+ user can read it on Dev.to and click Publish themselves.
149
+
150
+ ## Other languages
151
+
152
+ - Write natively in the post's language: don't translate idioms word for word.
153
+ - Keep product names, commands and code in their original form.
154
+ - Hashtags can be in the post's language when the community uses them, or in
155
+ English for a technical audience. Ask once if it's unclear, then remember.
156
+ - For right-to-left languages (Arabic, Hebrew), keep a URL or code on its own line so
157
+ it doesn't jumble the text around it.
158
+
159
+ ## Checklist before preview
160
+
161
+ - [ ] The first line works alone and tells the reader why to care.
162
+ - [ ] Every fact, number and link comes from the user's material.
163
+ - [ ] Each platform has its native shape; LinkedIn's link is in `firstComment`.
164
+ - [ ] Each thread part stands alone; no sentence is split across parts.
165
+ - [ ] Hashtags are few, relevant and at the end; no hype words.
166
+ - [ ] The call to action is one clear thing, at the end.