typefully 0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Typefully
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,233 @@
1
+ # Typefully CLI
2
+
3
+ A TypeScript CLI and AI agent skill for drafting, scheduling, and managing social media posts across X, LinkedIn, Threads, Bluesky, and Mastodon.
4
+
5
+ Built on the [Typefully API](https://typefully.com/docs/api). [Typefully](https://typefully.com) is a writing and scheduling app used by 200k+ top creators and teams to grow on X, LinkedIn, Threads, and Bluesky.
6
+
7
+ ## Setup
8
+
9
+ ### 1. Install
10
+
11
+ ```bash
12
+ pnpm add -g typefully
13
+ ```
14
+
15
+ Or use directly with npx:
16
+
17
+ ```bash
18
+ npx typefully --help
19
+ ```
20
+
21
+ ### 2. Copy your API Key
22
+
23
+ You'll need a Typefully API key. Copy an existing key or create a new one at https://typefully.com/?settings=api
24
+
25
+ ### 3. Run the setup command
26
+
27
+ This configures your API key and default social set:
28
+
29
+ ```bash
30
+ typefully setup
31
+ ```
32
+
33
+ > [!TIP]
34
+ > You can also set the API key as an environment variable: `export TYPEFULLY_API_KEY=your_key_here`
35
+
36
+ ### 4. Start using it
37
+
38
+ ```bash
39
+ # Create a tweet
40
+ typefully drafts create --text "Hello, world!"
41
+
42
+ # Quick alias — positional text, no flags needed
43
+ typefully create-draft "Hello, world!"
44
+
45
+ # List scheduled posts
46
+ typefully drafts list --status scheduled
47
+
48
+ # Create a cross-platform post
49
+ typefully drafts create --platform x,linkedin --text "Big announcement!"
50
+
51
+ # Schedule for next available slot
52
+ typefully drafts create --text "Scheduled post" --schedule next-free-slot
53
+
54
+ # Output raw JSON (for scripts/pipes)
55
+ typefully drafts list --json
56
+ ```
57
+
58
+ ## Output Modes
59
+
60
+ By default the CLI prints human-readable output with colored formatting. Pass `-j` / `--json` (or pipe stdout) to get raw JSON instead — useful for scripting and automation.
61
+
62
+ ```bash
63
+ typefully me # human-readable
64
+ typefully me --json # raw JSON
65
+ typefully me -j # same, short flag
66
+ typefully drafts list | jq '.results[0]' # auto JSON when piped
67
+ ```
68
+
69
+ In JSON mode the banner and spinners are suppressed — stdout contains only the JSON payload.
70
+
71
+ ## Commands
72
+
73
+ ### Global flags
74
+
75
+ | Flag | Description |
76
+ |------|-------------|
77
+ | `-v, --version` | Show version |
78
+ | `-j, --json` | Output raw JSON instead of human-readable text |
79
+
80
+ ### Setup & Configuration
81
+
82
+ ```bash
83
+ typefully setup # interactive
84
+ typefully setup --key typ_xxx --location global # non-interactive
85
+ typefully setup --key typ_xxx --scope local # --scope is an alias for --location
86
+ typefully setup --key typ_xxx --default-social-set 123
87
+ typefully setup --key typ_xxx --no-default
88
+
89
+ typefully config show
90
+ typefully config set-default # interactive
91
+ typefully config set-default 123 --location global
92
+ typefully config set-default 123 --scope local # --scope is an alias for --location
93
+ ```
94
+
95
+ ### User & Social Sets
96
+
97
+ ```bash
98
+ typefully me
99
+ typefully social-sets list
100
+ typefully social-sets get [social_set_id]
101
+ ```
102
+
103
+ ### Drafts
104
+
105
+ ```bash
106
+ # List
107
+ typefully drafts list
108
+ typefully drafts list --status scheduled
109
+ typefully drafts list --tag product --limit 20
110
+ typefully drafts list --sort -created_at
111
+
112
+ # Get
113
+ typefully drafts get <draft_id> --use-default
114
+ typefully drafts get <social_set_id> <draft_id>
115
+
116
+ # Create
117
+ typefully drafts create --text "Post content"
118
+ typefully drafts create -f ./post.txt # -f is short for --file
119
+ typefully drafts create --text "..." --platform x,linkedin
120
+ typefully drafts create --text "..." --all # all connected platforms
121
+ typefully drafts create --text "..." --schedule next-free-slot
122
+ typefully drafts create --text "..." --notes "Draft notes" # --notes = --scratchpad
123
+
124
+ # Update
125
+ typefully drafts update <draft_id> --text "New text" --use-default
126
+ typefully drafts update <draft_id> -a --text "New post" --use-default # -a = --append
127
+ typefully drafts update <draft_id> -f ./updated.txt --use-default
128
+
129
+ # Delete / Schedule / Publish
130
+ typefully drafts delete <draft_id> --use-default
131
+ typefully drafts schedule <draft_id> --time next-free-slot --use-default
132
+ typefully drafts publish <draft_id> --use-default
133
+ ```
134
+
135
+ ### Aliases (agent-friendly)
136
+
137
+ `create-draft` and `update-draft` are top-level aliases with positional text — useful for agents and scripts where flags feel verbose.
138
+
139
+ ```bash
140
+ # create-draft: positional text + --social-set-id
141
+ typefully create-draft "Hello, world!"
142
+ typefully create-draft "Big announcement!" --platform x,linkedin
143
+ typefully create-draft "Thread post" --schedule next-free-slot
144
+ typefully create-draft --file ./post.txt --platform x
145
+
146
+ # update-draft: positional draft_id + optional positional text
147
+ typefully update-draft <draft_id> "Updated text"
148
+ typefully update-draft <draft_id> --append "New thread post"
149
+ typefully update-draft <draft_id> -f ./updated.txt
150
+ ```
151
+
152
+ Both aliases support all the same options as their `drafts create` / `drafts update` equivalents, plus `--social-set-id <id>` to override the default.
153
+
154
+ ### Tags
155
+
156
+ ```bash
157
+ typefully tags list
158
+ typefully tags list <social_set_id>
159
+ typefully tags create --name "Product"
160
+ ```
161
+
162
+ ### Media
163
+
164
+ ```bash
165
+ typefully media upload ./image.jpg # waits for processing
166
+ typefully media upload ./image.jpg --no-wait # returns immediately
167
+ typefully media upload ./image.jpg --timeout 120 # custom timeout (seconds)
168
+ typefully media status <media_id>
169
+ ```
170
+
171
+ ## Thread Syntax
172
+
173
+ Use `---` on its own line to split a draft into a thread:
174
+
175
+ ```bash
176
+ typefully drafts create --text "First post
177
+
178
+ ---
179
+
180
+ Second post in the thread
181
+
182
+ ---
183
+
184
+ Third post"
185
+ ```
186
+
187
+ ## Config File Format
188
+
189
+ Config files are stored as JSON with `0600` permissions:
190
+
191
+ ```json
192
+ {
193
+ "apiKey": "typ_xxxx",
194
+ "defaultSocialSetId": 12345
195
+ }
196
+ ```
197
+
198
+ **Priority order** (highest wins):
199
+ 1. `TYPEFULLY_API_KEY` environment variable
200
+ 2. `./.typefully/config.json` (project-local)
201
+ 3. `~/.config/typefully/config.json` (user-global)
202
+
203
+ ## AI Agent Skill
204
+
205
+ This package also includes an AI agent skill for use with Claude Code, Cursor, and other AI coding assistants.
206
+
207
+ ### Install the skill
208
+
209
+ **CLI** (works with Claude Code, Cursor, Windsurf, and many other agents):
210
+
211
+ ```bash
212
+ npx skills add ahmadawais/typefully-cli
213
+ ```
214
+
215
+ ## Supported Platforms
216
+
217
+ | Platform | `--platform` value |
218
+ |----------|-------------------|
219
+ | X (Twitter) | `x` |
220
+ | LinkedIn | `linkedin` |
221
+ | Threads | `threads` |
222
+ | Bluesky | `bluesky` |
223
+ | Mastodon | `mastodon` |
224
+
225
+ ## Links
226
+
227
+ - [Typefully](https://typefully.com)
228
+ - [API Documentation](https://typefully.com/docs/api)
229
+ - [CLI Spec](./CLI-SPEC.md)
230
+
231
+ ## License
232
+
233
+ MIT