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 +5 -0
- package/README.md +41 -47
- package/dist/upload.js +1 -1
- package/package.json +18 -6
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
|
|
1
|
+
# juzpost-cli, social media scheduling from the terminal
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/juzpost-cli)
|
|
4
4
|
[](https://www.npmjs.com/package/juzpost-cli)
|
|
5
5
|
[](./LICENSE)
|
|
6
6
|
[](https://nodejs.org)
|
|
7
7
|
|
|
8
|
-
|
|
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)
|
|
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
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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]` |
|
|
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
|
|
94
|
+
The `juzpost schedule` command turns a pile of drafts into a posting calendar. It works in four steps.
|
|
97
95
|
|
|
98
|
-
1.
|
|
99
|
-
2.
|
|
100
|
-
3.
|
|
101
|
-
4.
|
|
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
|
|
113
|
-
- **Clipping pages
|
|
114
|
-
- **Repurposing pipelines
|
|
115
|
-
- **Developers
|
|
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
|
-
-
|
|
122
|
-
- Override the
|
|
123
|
-
- Revoke a CLI token
|
|
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
|
|
131
|
+
Short-form video destinations connected to your JuzPost workspace. That covers TikTok, YouTube Shorts, Instagram, and X.
|
|
134
132
|
|
|
135
|
-
**Is it free
|
|
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
|
|
139
|
-
Yes
|
|
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
|
|
142
|
-
Those are dashboard-first. `juzpost-cli` is CLI-first and scriptable
|
|
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`
|
|
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.
|
|
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": {
|
|
32
|
-
|
|
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": {
|
|
35
|
-
|
|
36
|
-
|
|
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",
|