juzpost-cli 0.1.1 → 0.1.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2
4
+
5
+ - Send `contentLength` with upload presign requests — the JuzPost API now
6
+ requires it and enforces per-content-type size limits before issuing a URL.
7
+
3
8
  ## 0.1.1
4
9
 
5
10
  - Rewrote the README for discoverability: detailed usage, smart-scheduling
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # juzpost-cli Social Media Scheduling from the Terminal
1
+ # juzpost-cli, social media scheduling from the terminal
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/juzpost-cli.svg)](https://www.npmjs.com/package/juzpost-cli)
4
4
  [![npm downloads](https://img.shields.io/npm/dm/juzpost-cli.svg)](https://www.npmjs.com/package/juzpost-cli)
5
5
  [![license](https://img.shields.io/npm/l/juzpost-cli.svg)](./LICENSE)
6
6
  [![node](https://img.shields.io/node/v/juzpost-cli.svg)](https://nodejs.org)
7
7
 
8
- **Schedule and auto-post short-form videos to TikTok, YouTube Shorts, Instagram, and more — straight from the command line.** `juzpost-cli` is a fast, scriptable **social media scheduling** tool for creators, agencies, and developers who want to **schedule posts**, run a **content calendar**, and **cross-post** clips without ever leaving the terminal.
8
+ Schedule and auto-post short-form videos to TikTok, YouTube Shorts, Instagram, and X from the command line. `juzpost-cli` is a scriptable social media scheduler for creators, agencies, and developers who want to schedule posts, run a content calendar, and cross-post clips without leaving the terminal.
9
9
 
10
- It's the command-line client for [JuzPost](https://www.juzpost.com) a **social media scheduler** built for short-form video. If you've used Buffer, Hootsuite, Later, SocialBee, or Postiz and wished for a **CLI-first, automatable** workflow, this is for you.
10
+ It's the command-line client for [JuzPost](https://www.juzpost.com), a social media scheduler built for short-form video. If you've used Buffer, Hootsuite, Later, SocialBee, or Postiz and wanted a CLI-first workflow you can automate, this is built for that.
11
11
 
12
12
  ```bash
13
13
  npm install -g juzpost-cli
@@ -17,37 +17,35 @@ juzpost schedule --group "all-channels" --min-per-day 2
17
17
 
18
18
  ---
19
19
 
20
- ## Why juzpost-cli?
20
+ ## Why juzpost-cli
21
21
 
22
- - 🖥️ **CLI-first social media scheduler** — schedule, post, and manage content from your terminal or scripts. No dashboard clicking.
23
- - 🎯 **Smart scheduling** pick an account group and a minimum posts-per-day, and it spreads your drafts across the best preset times in your timezone automatically.
24
- - 🔁 **Cross-platform posting** push one video to many accounts (TikTok, YouTube Shorts, Instagram, X) in a single command.
25
- - 🤖 **Built for automation** pair it with a clipping pipeline, CI, or cron to **auto-post** on a content calendar. Pipe `--json` into anything.
26
- - 🔐 **Secure, revocable auth** — browser-based device-code login; tokens are revocable from your dashboard anytime.
27
- - 📦 **Tiny & dependency-light** — one runtime dependency, native `fetch`, Node 18+.
28
-
29
- A scriptable, open-source-friendly alternative to clicking around a social media management dashboard.
22
+ - **Runs from your terminal.** Schedule, post, and manage social content with commands or scripts. No dashboard to click through.
23
+ - **Schedules automatically.** Pick an account group and a minimum number of posts per day, and it spreads your drafts across the best preset times for your timezone.
24
+ - **Posts to many accounts at once.** Push one video to TikTok, YouTube Shorts, Instagram, and X in a single command.
25
+ - **Fits into automation.** Run it from cron, CI, or a clipping pipeline to post on a content calendar. Pipe `--json` output into whatever you want.
26
+ - **Secure, revocable login.** Browser-based device-code auth. Tokens stay revocable from your dashboard whenever you need.
27
+ - **Small footprint.** One runtime dependency, native `fetch`, Node 18 or newer.
30
28
 
31
29
  ---
32
30
 
33
31
  ## Installation
34
32
 
35
33
  ```bash
36
- # global (recommended gives you the `juzpost` command)
34
+ # global install, gives you the juzpost command
37
35
  npm install -g juzpost-cli
38
36
 
39
37
  # or run once without installing
40
38
  npx juzpost-cli --help
41
39
  ```
42
40
 
43
- Requires **Node.js 18+** and a free [JuzPost](https://www.juzpost.com) account.
41
+ You need Node.js 18 or newer and a free [JuzPost](https://www.juzpost.com) account.
44
42
 
45
43
  ---
46
44
 
47
45
  ## Quick start
48
46
 
49
47
  ```bash
50
- # 1. Log in (opens your browser to approve no password, no API key to paste)
48
+ # 1. Log in. This opens your browser to approve. No password or API key to paste.
51
49
  juzpost login
52
50
 
53
51
  # 2. See your connected accounts, groups, and workspace
@@ -57,13 +55,13 @@ juzpost workspace
57
55
 
58
56
  # 3. Create a draft from a video file
59
57
  juzpost posts create --file ./clip.mp4 \
60
- --title "ASMR rain sounds for deep sleep 🌧️" \
58
+ --title "ASMR rain sounds for deep sleep" \
61
59
  --hashtags asmr sleep rain relaxing satisfying
62
60
 
63
- # 4. Smart-schedule every draft across a group at 2 posts/day
61
+ # 4. Smart-schedule every draft across a group at 2 posts per day
64
62
  juzpost schedule --group "all-channels" --min-per-day 2
65
63
 
66
- # Preview the plan first, schedule nothing:
64
+ # Preview the plan first and schedule nothing
67
65
  juzpost schedule --group "all-channels" --min-per-day 2 --dry-run
68
66
  ```
69
67
 
@@ -74,14 +72,14 @@ juzpost schedule --group "all-channels" --min-per-day 2 --dry-run
74
72
  | Command | What it does |
75
73
  |---|---|
76
74
  | `juzpost login` / `logout` / `whoami` | Device-code login, sign out, show identity |
77
- | `juzpost account status` | Plan + entitlements |
75
+ | `juzpost account status` | Plan and entitlements |
78
76
  | `juzpost accounts [--platform --group-id]` | List connected social accounts |
79
77
  | `juzpost groups [--name]` | List channel groups (account presets) |
80
- | `juzpost workspace` | Timezone + default posting times |
78
+ | `juzpost workspace` | Timezone and default posting times |
81
79
  | `juzpost posts list [--status --from --to]` | List posts (drafts, scheduled, posted) |
82
- | `juzpost posts create [--file --title --hashtags …]` | Upload media + create a draft |
80
+ | `juzpost posts create [--file --title --hashtags …]` | Upload media and create a draft |
83
81
  | `juzpost posts schedule <id> --account <id…> [--at]` | Schedule one post |
84
- | `juzpost schedule --group --min-per-day [--dry-run]` | **Smart-schedule** drafts across a group |
82
+ | `juzpost schedule --group --min-per-day [--dry-run]` | Smart-schedule drafts across a group |
85
83
 
86
84
  Every list command supports cursor pagination (`--limit`, `--cursor`, `--all`), sorting (`--sort`, `--order`), and `--json` for scripting.
87
85
 
@@ -93,15 +91,15 @@ juzpost posts list --status scheduled --json | jq '.data[].title'
93
91
 
94
92
  ## How smart scheduling works
95
93
 
96
- The headline `juzpost schedule` command turns a pile of drafts into a posting **content calendar** automatically:
94
+ The `juzpost schedule` command turns a pile of drafts into a posting calendar. It works in four steps.
97
95
 
98
- 1. **Resolve a group** the social accounts you want to post to.
99
- 2. **Read your timezone + preset times** from your workspace settings.
100
- 3. **Spread the drafts across days** to hit your `--min-per-day` cadence, picking the best preset slots (DST-aware) and skipping any time already in the past.
101
- 4. **Schedule each post** to every account in the group.
96
+ 1. Resolve a group into the social accounts you want to post to.
97
+ 2. Read your timezone and preset times from your workspace settings.
98
+ 3. Spread the drafts across days to hit your `--min-per-day` cadence. It picks the best preset slots, stays DST-aware, and skips any time already in the past.
99
+ 4. Schedule each post to every account in the group.
102
100
 
103
101
  ```bash
104
- # 10 drafts, 3 per day, starting tomorrow, only on these times:
102
+ # 10 drafts, 3 per day, starting tomorrow, only on these times
105
103
  juzpost schedule --group "shorts" --min-per-day 3 --times 09:30 14:00 19:00
106
104
  ```
107
105
 
@@ -109,48 +107,44 @@ juzpost schedule --group "shorts" --min-per-day 3 --times 09:30 14:00 19:00
109
107
 
110
108
  ## Use cases
111
109
 
112
- - **Creators** batch a week of TikToks and YouTube Shorts in one command.
113
- - **Clipping pages & agencies** — auto-post clips on a fixed cadence across many accounts.
114
- - **Repurposing pipelines** wire it after a VOD-to-shorts step to schedule the output (`--json` makes it pipe-friendly).
115
- - **Developers** script your social media scheduling in CI, cron, or a Makefile instead of a SaaS dashboard.
110
+ - **Creators.** Batch a week of TikToks and YouTube Shorts in one command.
111
+ - **Clipping pages and agencies.** Auto-post clips on a fixed cadence across many accounts.
112
+ - **Repurposing pipelines.** Wire it after a VOD-to-shorts step to schedule the output. The `--json` flag makes it pipe-friendly.
113
+ - **Developers.** Script your posting in CI, cron, or a Makefile instead of a SaaS dashboard.
116
114
 
117
115
  ---
118
116
 
119
117
  ## Configuration
120
118
 
121
- - Auth token is stored at `~/.config/juzpost/config.json` (mode `0600`, never logged).
122
- - Override the API base URL with `--base <url>` or the `JUZPOST_URL` env var.
123
- - Revoke a CLI token anytime from your JuzPost dashboard settings (hard delete instant 401).
119
+ - **Token storage.** Your auth token is stored at `~/.config/juzpost/config.json` with mode `0600`. It is never logged.
120
+ - **Custom API URL.** Override the base URL with `--base <url>` or the `JUZPOST_URL` environment variable.
121
+ - **Revoke anytime.** Remove a CLI token from your JuzPost dashboard settings. A hard delete returns an instant 401.
124
122
 
125
123
  ---
126
124
 
127
125
  ## FAQ
128
126
 
129
127
  **How do I schedule social media posts from the terminal?**
130
- Install `juzpost-cli`, run `juzpost login`, create drafts with `juzpost posts create`, then `juzpost schedule --group <name> --min-per-day <n>`.
128
+ Install `juzpost-cli`, run `juzpost login`, create drafts with `juzpost posts create`, then run `juzpost schedule --group <name> --min-per-day <n>`.
131
129
 
132
130
  **Which platforms are supported?**
133
- Short-form video destinations connected to your JuzPost workspace TikTok, YouTube Shorts, Instagram, and X.
131
+ Short-form video destinations connected to your JuzPost workspace. That covers TikTok, YouTube Shorts, Instagram, and X.
134
132
 
135
- **Is it free / open source?**
133
+ **Is it free and open source?**
136
134
  The CLI is MIT-licensed and open source. It connects to your JuzPost account.
137
135
 
138
- **Can I automate posting (auto-post / cron)?**
139
- Yes — it's built for it. Use it in scripts, CI, or cron; `--json` output and exit codes make it automation-friendly.
136
+ **Can I automate posting with cron?**
137
+ Yes. Use it in scripts, CI, or cron. The `--json` output and exit codes make it automation-friendly.
140
138
 
141
- **How is this different from Buffer / Hootsuite / Later?**
142
- Those are dashboard-first. `juzpost-cli` is CLI-first and scriptable designed for terminal workflows and automation around short-form video.
139
+ **How is this different from Buffer, Hootsuite, or Later?**
140
+ Those tools are dashboard-first. `juzpost-cli` is CLI-first and scriptable, built for terminal workflows and automation around short-form video.
143
141
 
144
142
  ---
145
143
 
146
144
  ## Status
147
145
 
148
- `v0.1.x` early release. The command surface is stable and built to the JuzPost API. See [JuzPost](https://www.juzpost.com) for account setup and API details.
146
+ `v0.1.x` is an early release. The command surface is stable and built against the JuzPost API. See [JuzPost](https://www.juzpost.com) for account setup and API details.
149
147
 
150
148
  ## License
151
149
 
152
150
  [MIT](./LICENSE) © Jiiva Durai
153
-
154
- ---
155
-
156
- <sub>**Keywords:** social media scheduling · social media scheduler · schedule social media posts · TikTok scheduler · YouTube Shorts scheduler · Instagram scheduler · auto-post · content calendar · cross-platform posting · bulk scheduling · social media automation · CLI social media scheduler · open source scheduler · Buffer alternative · Hootsuite alternative · Postiz alternative · short-form video scheduler.</sub>
package/dist/upload.js CHANGED
@@ -19,8 +19,8 @@ export function contentTypeFor(file) {
19
19
  export async function uploadMedia(filePath, opts = {}) {
20
20
  const contentType = contentTypeFor(filePath);
21
21
  const relativeKey = opts.relativeKey ?? `media/${basename(filePath)}`;
22
- const { signedUrl, resolvedKey } = await api('/api/cli/v1/storage/presign', { method: 'POST', body: { relativeKey, contentType, operation: 'upload' } });
23
22
  const bytes = readFileSync(filePath);
23
+ const { signedUrl, resolvedKey } = await api('/api/cli/v1/storage/presign', { method: 'POST', body: { relativeKey, contentType, operation: 'upload', contentLength: bytes.length } });
24
24
  const res = await fetch(signedUrl, { method: 'PUT', headers: { 'content-type': contentType }, body: bytes });
25
25
  if (!res.ok)
26
26
  throw new ApiError(res.status, `R2 upload failed (HTTP ${res.status})`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juzpost-cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Social media scheduling from the terminal — schedule & auto-post short-form videos to TikTok, YouTube Shorts & Instagram. A fast, scriptable CLI social media scheduler.",
5
5
  "keywords": [
6
6
  "social-media-scheduling",
@@ -28,12 +28,24 @@
28
28
  "license": "MIT",
29
29
  "author": "Jiiva Durai <jackstiffer1@gmail.com>",
30
30
  "homepage": "https://www.juzpost.com",
31
- "repository": { "type": "git", "url": "git+https://github.com/jackstiffer/juzpost-cli.git" },
32
- "bugs": { "url": "https://github.com/jackstiffer/juzpost-cli/issues" },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/jackstiffer/juzpost-cli.git"
34
+ },
35
+ "bugs": {
36
+ "url": "https://github.com/jackstiffer/juzpost-cli/issues"
37
+ },
33
38
  "type": "module",
34
- "bin": { "juzpost": "dist/index.js" },
35
- "files": ["dist", "CHANGELOG.md"],
36
- "engines": { "node": ">=18" },
39
+ "bin": {
40
+ "juzpost": "dist/index.js"
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "CHANGELOG.md"
45
+ ],
46
+ "engines": {
47
+ "node": ">=18"
48
+ },
37
49
  "scripts": {
38
50
  "dev": "tsx src/index.ts",
39
51
  "build": "tsc",