typefully 0.1.1 → 0.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/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "typefully",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "bin": {
6
- "typefully": "./dist/index.js"
6
+ "typefully": "./dist/index.js",
7
+ "tfly": "./dist/index.js"
7
8
  },
8
9
  "main": "./dist/index.js",
9
10
  "files": [
@@ -41,6 +42,7 @@
41
42
  "commander": "^14.0.3",
42
43
  "ora": "^9.3.0",
43
44
  "picocolors": "^1.1.1",
45
+ "terminal-link": "^5.0.0",
44
46
  "zod": "^4.3.6"
45
47
  },
46
48
  "devDependencies": {
package/skills/skill.md CHANGED
@@ -12,59 +12,24 @@ allowed-tools: Bash(typefully*)
12
12
 
13
13
  Create, schedule, and publish social media content across multiple platforms using [Typefully](https://typefully.com).
14
14
 
15
- > **Freshness check**: If more than 30 days have passed since the `last-updated` date above, inform the user that this skill may be outdated and point them to the update options below.
15
+ ## Quick Start
16
16
 
17
- ## Keeping This Skill Updated
18
-
19
- **Source**: [github.com/typefully/agent-skills](https://github.com/typefully/agent-skills)
20
- **API docs**: [typefully.com/docs/api](https://typefully.com/docs/api)
21
-
22
- Update methods by installation type:
23
-
24
- | Installation | How to update |
25
- |--------------|---------------|
26
- | CLI (`npx skills`) | `npx skills update` |
27
- | Claude Code plugin | `/plugin update typefully@typefully-skills` |
28
- | Cursor | Remote rules auto-sync from GitHub |
29
- | Manual | Pull latest from repo or re-copy `skills/typefully/` |
30
-
31
- API changes ship independently—updating the skill ensures you have the latest commands and workflows.
32
-
33
- ## Setup
34
-
35
- Before using this skill, ensure:
36
-
37
- 1. **API Key**: Run the setup command to configure your API key securely
38
- - Get your key at https://typefully.com/?settings=api
39
- - Run: `typefully setup`
40
- - Or set environment variable: `export TYPEFULLY_API_KEY=your_key`
41
-
42
- 2. **Requirements**: Node.js 18+. Install the CLI with `npm install -g typefully` or run via `npx typefully`.
43
-
44
- **Config priority** (highest to lowest):
45
- 1. `TYPEFULLY_API_KEY` environment variable
46
- 2. `./.typefully/config.json` (project-local, in user's working directory)
47
- 3. `~/.config/typefully/config.json` (user-global)
17
+ ```bash
18
+ tfly # interactive — pick text, platform, schedule
19
+ tfly "Hello, world!" # instant draft (uses default platforms)
20
+ tfly rm # interactive draft picker to delete
21
+ tfly rm <draft_id> # delete specific draft
22
+ ```
48
23
 
49
24
  ### Handling "API key not found" errors
50
25
 
51
26
  **CRITICAL**: When you receive an "API key not found" error from the CLI:
52
27
 
53
- 1. **Tell the user to run the setup command** - The setup is interactive and requires user input, so you cannot run it on their behalf:
54
- ```bash
55
- typefully setup
56
- ```
57
-
58
- 2. **Stop and wait** - After telling the user to run setup, **do not continue with the task**. You cannot create drafts, upload media, or perform any API operations without a valid API key. Wait for the user to complete setup and confirm before proceeding.
59
-
60
- 3. **DO NOT** attempt any of the following:
61
- - Searching for API keys in macOS Keychain, `.env` files, or other locations
62
- - Grepping through config files or directories
63
- - Looking in the user's Trash or other system folders
64
- - Constructing complex shell commands to find credentials
65
- - Drafting content or preparing posts before setup is complete
28
+ **Tell the user to run the setup command** - The setup is interactive and requires user input, so you cannot run it on their behalf:
29
+ ```sh
30
+ typefully setup
31
+ ```
66
32
 
67
- The setup command will interactively guide the user through configuration. Trust the CLI's error messages and follow their instructions.
68
33
 
69
34
  ## Social Sets
70
35
 
@@ -79,7 +44,7 @@ The Typefully API uses the term "social set" to refer to what users commonly cal
79
44
  When determining which social set to use:
80
45
 
81
46
  1. **Check for a configured default first** - Run `typefully config show` to see if a default is already set:
82
- ```bash
47
+ ```sh
83
48
  typefully config show
84
49
  ```
85
50
  If `default_social_set` is configured, the CLI uses it automatically when you omit the social_set_id.
@@ -94,7 +59,7 @@ When determining which social set to use:
94
59
  3. **Single social set shortcut** - If the user only has one social set and no default is configured, use it automatically
95
60
 
96
61
  4. **Multiple social sets, no default** - Ask the user which to use, then **offer to save their choice as the default**:
97
- ```bash
62
+ ```sh
98
63
  typefully config set-default
99
64
  ```
100
65
  This command lists available social sets and saves the choice to the config file.
@@ -114,6 +79,8 @@ When determining which social set to use:
114
79
  | "Schedule this for tomorrow" | `typefully drafts create ... --schedule "2025-01-21T09:00:00Z"` |
115
80
  | "Post this now" | `typefully drafts create ... --schedule now` or `typefully drafts publish <draft_id> --use-default` |
116
81
  | "Add notes/ideas to the draft" | `typefully drafts create ... --scratchpad "Your notes here"` |
82
+ | "Set my default platforms" | `typefully config set-platforms` |
83
+ | "Delete a draft" | `tfly rm [draft_id]` |
117
84
  | "Check available tags" | `typefully tags list` |
118
85
 
119
86
  ## Workflow
@@ -121,25 +88,25 @@ When determining which social set to use:
121
88
  Follow this workflow when creating posts:
122
89
 
123
90
  1. **Check if a default social set is configured**:
124
- ```bash
91
+ ```sh
125
92
  typefully config show
126
93
  ```
127
94
  If `default_social_set` shows an ID, skip to step 3.
128
95
 
129
96
  2. **If no default, list social sets** to find available options:
130
- ```bash
97
+ ```sh
131
98
  typefully social-sets list
132
99
  ```
133
100
  If multiple exist, ask the user which to use and offer to set it as default:
134
- ```bash
101
+ ```sh
135
102
  typefully config set-default
136
103
  ```
137
104
 
138
105
  3. **Create drafts** (social_set_id is optional if default is configured):
139
- ```bash
106
+ ```sh
140
107
  typefully drafts create --text "Your post"
141
108
  ```
142
- Note: If `--platform` is omitted, the first connected platform is auto-selected.
109
+ Note: If `--platform` is omitted, uses `defaultPlatforms` config if set, else first connected platform. Set defaults with `typefully config set-platforms`.
143
110
 
144
111
  **For multi-platform posts**: See [Publishing to Multiple Platforms](#publishing-to-multiple-platforms) — always use a single draft, even when content differs per platform.
145
112
 
@@ -150,17 +117,17 @@ Follow this workflow when creating posts:
150
117
  Tags help organize drafts within Typefully. **Always check existing tags before creating new ones**:
151
118
 
152
119
  1. **List existing tags first**:
153
- ```bash
120
+ ```sh
154
121
  typefully tags list
155
122
  ```
156
123
 
157
124
  2. **Use existing tags when available** - if a tag with the desired name already exists, use it directly when creating drafts:
158
- ```bash
125
+ ```sh
159
126
  typefully drafts create --text "..." --tags existing-tag-name
160
127
  ```
161
128
 
162
129
  3. **Only create new tags if needed** - if the tag doesn't exist, create it:
163
- ```bash
130
+ ```sh
164
131
  typefully tags create --name "New Tag"
165
132
  ```
166
133
 
@@ -172,9 +139,9 @@ If a single draft needs to be created for different platforms, you need to make
172
139
 
173
140
  When the content is the same across platforms, create a single draft with multiple platforms:
174
141
 
175
- ```bash
142
+ ```sh
176
143
  # Specific platforms
177
- typefully drafts create --platform x,linkedin --text "Big announcement!"
144
+ typefully drafts create --platform x,linkedin,threads,bluesky --text "Big announcement!"
178
145
 
179
146
  # All connected platforms
180
147
  typefully drafts create --all --text "Posting everywhere!"
@@ -182,7 +149,7 @@ typefully drafts create --all --text "Posting everywhere!"
182
149
 
183
150
  **IMPORTANT**: When content should be tailored (e.g., X thread with a LinkedIn post version), **still use a single draft** — create with one platform first, then update to add the other:
184
151
 
185
- ```bash
152
+ ```sh
186
153
  # 1. Create draft with the primary platform first
187
154
  typefully drafts create --platform linkedin --text "Excited to share our new feature..."
188
155
  # Returns: { "id": "draft-123", ... }
@@ -270,11 +237,26 @@ All drafts commands support an optional `[social_set_id]` positional argument or
270
237
  | `typefully setup --key <key> --no-default` | Non-interactive setup, skip default social set selection |
271
238
  | `typefully config show` | Show current config, API key source, and default social set |
272
239
  | `typefully config set-default [social_set_id]` | Set default social set (interactive if ID omitted) |
240
+ | `typefully config set-platforms` | Set default platforms used when creating drafts (interactive multiselect) |
241
+ | `typefully config set-platforms --platforms x,linkedin` | Set default platforms non-interactively |
242
+
243
+ ### Shortcuts (`tfly`)
244
+
245
+ `tfly` is a short alias for `typefully`. The default command creates drafts directly:
246
+
247
+ | Command | Description |
248
+ |---------|-------------|
249
+ | `tfly "text"` | Create draft instantly with default platforms — no flags needed |
250
+ | `tfly` | Interactive flow: prompts for text, platforms (pre-ticked from config), and schedule |
251
+ | `tfly rm` | Interactive picker — loads drafts, pick one or more to delete |
252
+ | `tfly rm <draft_id>` | Delete a specific draft directly |
253
+ | `tfly create-draft "text"` | Full `create-draft` alias with all flag support |
254
+ | `tfly update-draft <id> "text"` | Full `update-draft` alias with all flag support |
273
255
 
274
256
  ## Examples
275
257
 
276
258
  ### Set up default social set
277
- ```bash
259
+ ```sh
278
260
  # Check current config
279
261
  typefully config show
280
262
 
@@ -286,12 +268,12 @@ typefully config set-default 123 --location global
286
268
  ```
287
269
 
288
270
  ### Create a tweet (using default social set)
289
- ```bash
271
+ ```sh
290
272
  typefully drafts create --text "Hello, world!"
291
273
  ```
292
274
 
293
275
  ### Create a tweet with explicit social_set_id
294
- ```bash
276
+ ```sh
295
277
  # Positional
296
278
  typefully drafts create 123 --text "Hello, world!"
297
279
 
@@ -300,52 +282,52 @@ typefully drafts create --social-set-id 123 --text "Hello, world!"
300
282
  ```
301
283
 
302
284
  ### Create a cross-platform post (specific platforms)
303
- ```bash
285
+ ```sh
304
286
  typefully drafts create --platform x,linkedin,threads --text "Big announcement!"
305
287
  ```
306
288
 
307
289
  ### Create a post on all connected platforms
308
- ```bash
290
+ ```sh
309
291
  typefully drafts create --all --text "Posting everywhere!"
310
292
  ```
311
293
 
312
294
  ### Create and schedule for next slot
313
- ```bash
295
+ ```sh
314
296
  typefully drafts create --text "Scheduled post" --schedule next-free-slot
315
297
  ```
316
298
 
317
299
  ### Create with tags
318
- ```bash
300
+ ```sh
319
301
  typefully drafts create --text "Marketing post" --tags marketing,product
320
302
  ```
321
303
 
322
304
  ### List scheduled posts sorted by date
323
- ```bash
305
+ ```sh
324
306
  typefully drafts list --status scheduled --sort scheduled_date
325
307
  ```
326
308
 
327
309
  ### Reply to a tweet
328
- ```bash
310
+ ```sh
329
311
  typefully drafts create --platform x --text "Great thread!" --reply-to "https://x.com/user/status/123456"
330
312
  ```
331
313
 
332
314
  ### Post to an X community
333
- ```bash
315
+ ```sh
334
316
  typefully drafts create --platform x --text "Community update" --community 1493446837214187523
335
317
  ```
336
318
 
337
319
  ### Create draft with share URL
338
- ```bash
320
+ ```sh
339
321
  typefully drafts create --text "Check this out" --share
340
322
  ```
341
323
 
342
324
  ### Create draft with scratchpad notes
343
- ```bash
325
+ ```sh
344
326
  typefully drafts create --text "Launching next week!" --scratchpad "Draft for product launch. Coordinate with marketing team before publishing."
345
327
  ```
346
328
 
347
329
  ### Upload media and create post with it
348
- ```bash
330
+ ```sh
349
331
  # Single command handles upload + polling - returns when ready!
350
332
  typefully media upload ./image.jpg
351
333
  # Returns: {"media_id": "abc-123-def", "status": "ready", "message": "Media uploaded and ready"}
@@ -355,7 +337,7 @@ typefully drafts create --text "Check out this image!" --media abc-123-def
355
337
  ```
356
338
 
357
339
  ### Upload multiple media files
358
- ```bash
340
+ ```sh
359
341
  # Upload each file (each waits for processing)
360
342
  typefully media upload ./photo1.jpg # Returns media_id: id1
361
343
  typefully media upload ./photo2.jpg # Returns media_id: id2
@@ -365,7 +347,7 @@ typefully drafts create --text "Photo dump!" --media id1,id2
365
347
  ```
366
348
 
367
349
  ### Add media to an existing draft
368
- ```bash
350
+ ```sh
369
351
  # Upload media
370
352
  typefully media upload ./new-image.jpg # Returns media_id: xyz
371
353
 
@@ -374,12 +356,12 @@ typefully drafts update 456 --text "Updated post with image" --media xyz --use-d
374
356
  ```
375
357
 
376
358
  ### Setup (interactive)
377
- ```bash
359
+ ```sh
378
360
  typefully setup
379
361
  ```
380
362
 
381
363
  ### Setup (non-interactive, for scripts/CI)
382
- ```bash
364
+ ```sh
383
365
  # Auto-selects default social set if only one exists
384
366
  typefully setup --key typ_xxx --location global
385
367
 
@@ -420,7 +402,7 @@ The `--scratchpad` option attaches internal notes directly to the Typefully draf
420
402
  - Are private and never published to social media
421
403
  - Are perfect for storing thread expansion ideas, research notes, context, etc.
422
404
 
423
- ```bash
405
+ ```sh
424
406
  # CORRECT: Notes attached to the draft in Typefully
425
407
  typefully drafts create --social-set-id 123 --text "My post" --scratchpad "Ideas for expanding: 1) Add stats 2) Include quote"
426
408
 
@@ -446,6 +428,10 @@ When in doubt, create drafts for user review rather than publishing directly.
446
428
  ## Tips
447
429
 
448
430
  - **Smart platform default**: If `--platform` is omitted, the first connected platform is auto-selected
431
+ - **Default platforms config**: Run `typefully config set-platforms` to save preferred platforms (e.g. `x,linkedin,threads`) — used automatically on every new draft
432
+ - **Short alias**: Use `tfly` instead of `typefully` for all commands
433
+ - **Interactive mode**: Run `tfly` with no args to get a guided prompt for text, platforms, and schedule
434
+ - **Delete interactively**: `tfly rm` loads your drafts and lets you pick which to delete
449
435
  - **All platforms**: Use `--all` to post to all connected platforms at once
450
436
  - **Character limits**: X (280), LinkedIn (3000), Threads (500), Bluesky (300), Mastodon (500)
451
437
  - **Thread creation**: Use `---` on its own line to split into multiple posts (thread)