@publishq/cli 0.0.6 → 0.0.7

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
@@ -19,7 +19,7 @@ Output is JSON by default: easy to pipe into `jq` and easy for an AI agent to pa
19
19
  ## Install
20
20
 
21
21
  ```bash
22
- npm install -g @publishq/cli
22
+ npm install -g @publishq/cli@latest
23
23
  ```
24
24
 
25
25
  You get two commands: `publishq` and the shorter `pq`. They do the same thing.
@@ -51,6 +51,8 @@ pq posts create --content "Hello TikTok" --accounts-json '[{"accountId":"<id>","
51
51
  pq posts update <post-id> [--content "New text"] [--scheduled-at <iso>] \
52
52
  [--media-id <id>] [--thumbnail-timestamp <ms>]
53
53
  pq posts update <post-id> --media-ids-json '[]' # remove all media
54
+ pq posts update <post-id> --accounts-json '[{"accountId":"<id>","platformSpecificSettings":{"thumbnailMediaId":"<image-media-id>"}}]'
55
+ pq posts update <post-id> --accounts-json '[{"accountId":"<id>","platformSpecificSettings":{"thumbnailMediaId":null}}]' # remove one setting
54
56
  pq posts delete <post-id>
55
57
  pq posts remove-account <post-id> <account-id>
56
58
  ```
@@ -101,8 +103,8 @@ API keys carry scopes that control access. A call missing the required scope ret
101
103
 
102
104
  ## Related
103
105
 
104
- - [`@publishq/sdk`](https://www.npmjs.com/package/@publishq/sdk) — the TypeScript SDK this CLI is built on.
105
- - [`@publishq/mcp`](https://www.npmjs.com/package/@publishq/mcp) — Model Context Protocol server for Claude Desktop and other AI agents.
106
+ - [`@publishq/sdk`](https://www.npmjs.com/package/@publishq/sdk): the TypeScript SDK this CLI is built on.
107
+ - [`@publishq/mcp`](https://www.npmjs.com/package/@publishq/mcp): Model Context Protocol server for Claude Desktop and other AI agents.
106
108
 
107
109
  ## License
108
110
 
package/dist/index.js CHANGED
@@ -212,18 +212,26 @@ yargs(hideBin(process.argv)).scriptName("publishq").usage("$0 <command> [options
212
212
  }).conflicts("media-id", "media-ids-json").option("thumbnail-timestamp", {
213
213
  type: "number",
214
214
  describe: "New video thumbnail timestamp in milliseconds"
215
+ }).option("accounts-json", {
216
+ type: "string",
217
+ describe: "JSON array of account objects to update or add, with accountId and optional postOverrides/platformSpecificSettings. Only the fields you send change; send a field as null to remove it."
215
218
  }),
216
219
  (argv) => {
217
220
  const mediaIds = argv["media-ids-json"] !== void 0 ? parseJsonOption(
218
221
  "--media-ids-json",
219
222
  argv["media-ids-json"]
220
223
  ) : argv["media-id"];
224
+ const accounts = argv["accounts-json"] !== void 0 ? parseJsonOption(
225
+ "--accounts-json",
226
+ argv["accounts-json"]
227
+ ) : void 0;
221
228
  output(
222
229
  getClient().posts.update(argv.id, {
223
230
  ...argv.content !== void 0 ? { content: argv.content } : {},
224
231
  ...argv["scheduled-at"] !== void 0 ? { scheduledAt: argv["scheduled-at"] } : {},
225
232
  ...mediaIds !== void 0 ? { mediaIds } : {},
226
- ...argv["thumbnail-timestamp"] !== void 0 ? { thumbnailTimestamp: argv["thumbnail-timestamp"] } : {}
233
+ ...argv["thumbnail-timestamp"] !== void 0 ? { thumbnailTimestamp: argv["thumbnail-timestamp"] } : {},
234
+ ...accounts !== void 0 ? { accounts } : {}
227
235
  }),
228
236
  argv.pretty
229
237
  );
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@publishq/cli",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "private": false,
5
- "description": "Official command-line interface for the PublishQ API — schedule and publish across your social platforms.",
5
+ "description": "Official command-line interface for the PublishQ API. Schedule and publish across your social platforms.",
6
6
  "license": "Apache-2.0",
7
7
  "author": "PublishQ",
8
8
  "homepage": "https://publishq.com",
@@ -27,7 +27,7 @@
27
27
  "LICENSE"
28
28
  ],
29
29
  "dependencies": {
30
- "@publishq/sdk": "^0.0.2",
30
+ "@publishq/sdk": "^0.0.3",
31
31
  "yargs": "^17.7.2"
32
32
  },
33
33
  "devDependencies": {