@palmyr/cli 1.9.0 → 1.10.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/README.md CHANGED
@@ -31,6 +31,7 @@ palmyr phone search --country US
31
31
  - [Domains](#domains)
32
32
  - [Wallet](#wallet)
33
33
  - [Twitter / X](#twitter--x)
34
+ - [TikTok](#tiktok)
34
35
  - [Utility](#utility)
35
36
  - [SDK](#sdk)
36
37
  - [Output Modes](#output-modes)
@@ -615,6 +616,41 @@ Pay at schedule time; the Palmyr server fires posts at `post_at` whether your ma
615
616
 
616
617
  The previous local-queue + `palmyr worker` daemon were deprecated when server-side scheduling shipped. `palmyr worker` now prints a deprecation pointer.
617
618
 
619
+ ### TikTok
620
+
621
+ Direct browser automation — no marketplace or paid upstream. A TikTok session comes from a real-browser login (`connect`), not a password the server stores. Account-management commands are local-vault only (free); the action ops run server-side through the account's residential IP.
622
+
623
+ | Command | Cost | Notes |
624
+ |---------|------|-------|
625
+ | `palmyr tiktok connect <username>` *(`--tag <folder>` files it under a folder)* | free | One-shot real-browser login — opens Chrome/Edge/Brave, you log in once, and the session is auto-captured via CDP and cached locally. No server call. |
626
+ | `palmyr tiktok connect <username> --qr` | free | QR login — opens a window showing TikTok's login QR for a human to scan with the TikTok app (no password / captcha). Also hosts the QR server-side and prints a `/connect/<token>` link to forward. Runs headed (TikTok rejects headless QR-auth). |
627
+ | `palmyr tiktok import <username> --sessionid <s> --csrf <c> --webid <w> --country <iso2>` | free | Bring your own cookies from a logged-in TikTok browser. |
628
+ | `palmyr tiktok import <username> --credentials-line "login:pw:email:email_pw" --country <iso2>` | free | Marketplace colon format. Local vault only; `--country` drives proxy exit + browser locale. |
629
+ | `palmyr tiktok list` *(`--tag <folder>` filters to one folder)* | free | List local TikTok accounts. |
630
+ | `palmyr tiktok info <username>` | free | Show one account (id, source, country, last action). |
631
+ | `palmyr tiktok session <username>` | free | Whether a session is cached, its age in hours, and staleness (>12h). |
632
+ | `palmyr tiktok rename <old> --to <new>` | free | Rename the local alias (does not change the TikTok handle). |
633
+ | `palmyr tiktok tag <username> <folder>` *(or `--clear`)* | free | File an account under a folder-like grouping tag so one agent can organize 30+ accounts. `--clear` removes it; `palmyr tiktok list --tag <folder>` filters to a folder. Assignable at `connect`/`import` time via `--tag` too. |
634
+ | `palmyr tiktok remove <username> --confirm` | free | Delete the local copy. The TikTok account itself is not deleted. |
635
+ | `palmyr tiktok totp <username>` | free | Print the current 2FA code from the stored seed (if one was imported). |
636
+ | `palmyr tiktok login <username>` | $0.02 | Validate stored cookies/credentials via a stealth browser and cache the session. |
637
+ | `palmyr tiktok post <username> --file video.mp4 --caption "..."` *(or `--url <https>`; `--privacy 0\|1\|2` = public / friends / private, default public)* | $0.01 | Post a video. Returns success after server-side verification. |
638
+ | `palmyr tiktok schedule <username> --at <iso8601> --file video.mp4 --caption "..."` *(or `--url <https>`)* | $0.01 | Schedule via TikTok's own native scheduler — ~15 min to ~10 days out. Aborts before submit if the schedule can't be set, so it never posts "now" by mistake. |
639
+ | `palmyr tiktok follow <username> --user @handle` | $0.001 | |
640
+ | `palmyr tiktok like <username> --video <url>` | $0.001 | |
641
+ | `palmyr tiktok delete <username> --video <url>` | $0.001 | Deletes via TikTok Studio's content manager. |
642
+ | `palmyr tiktok bio <username> --text "..."` | $0.001 | New bio, ≤80 chars. Pass `--text ""` to clear. |
643
+ | `palmyr tiktok name <username> --display "..."` | $0.001 | New display name, ≤30 chars. TikTok rate-limits nickname changes to ~once/week — returns `RATE_LIMITED` if the change didn't take. |
644
+ | `palmyr tiktok pfp <username> --file pic.png` *(or `--url https://...`)* | $0.005 | PNG / JPG / WebP avatar. |
645
+ | `palmyr tiktok draft <username> --file video.mp4 --caption "..."` *(`--privacy` / `--at` / `--tag` as for post)* | free | **Human-in-the-loop**: stage a post for approval instead of publishing. Queued locally; `--at` makes `approve` schedule it. Nothing goes out until approved. |
646
+ | `palmyr tiktok drafts [<username>]` *(`--tag <folder>`)* | free | List drafts awaiting approval. |
647
+ | `palmyr tiktok approve <draft-id>` | $0.01 *(the post price; scheduled drafts use the scheduler)* | Publish a queued draft and record it in the post log. The draft is kept on failure so it can be retried (e.g. after re-connecting a stale session). |
648
+ | `palmyr tiktok reject <draft-id>` | free | Discard a queued draft. |
649
+ | `palmyr tiktok logs [<username>]` *(`--tag <folder>`, `--limit N`)* | free | Audit log of posts that actually went out — approved drafts **and** direct posts (account, caption, timestamp, source). |
650
+ | `palmyr tiktok analytics <username>` | $0.005 *(free in self-hosted)* | **Self-learning**: scrape per-post views/likes/comments from Studio, categorize each into tiers (`top`/`solid`/`underperforming`/`pending`) relative to the account's own posts, and append a snapshot to the local time-series (`~/.palmyr/social/analytics.jsonl`). |
651
+ | `palmyr tiktok review <username>` | free | Performance review off the local snapshots — totals, tier mix, best/worst post, avg engagement rate, and the **trend** vs the previous snapshot. |
652
+ | `palmyr tiktok monitor tick \| start \| stop \| status` *(`--every 6h`, `--account a,b`)* | free locally *(each tick runs `analytics`)* | Unattended monitor (mirrors the wallet daemon): periodically runs `analytics` so `review` stays fresh. `tick` = one snapshot now; `start` = detached interval loop; default scope is all connected accounts. |
653
+
618
654
  ### Utility
619
655
 
620
656
  | Command | Cost | Notes |
@@ -714,6 +750,16 @@ ao.socialTwitterAvatar(accountId, cookies, { image_base64? | image_url? }, proxy
714
750
  ao.socialTwitterBanner(accountId, cookies, { image_base64? | image_url? }, proxySessionId?)
715
751
  ao.socialTwitterUsername(accountId, cookies, newUsername, proxySessionId?)
716
752
 
753
+ // TikTok (account connect/list/info/rename/remove/totp/session are local CLI-only — not SDK calls)
754
+ ao.socialTiktokHostQr(qrDataUrl) // host a login QR → { token }; link is `${api}/connect/<token>`
755
+ ao.socialTiktokLogin(accountId, { sessionid?, ttCsrfToken?, ttWebidV2?, extraCookies?, login?, password?, email?, emailPassword?, proxySessionId?, country? })
756
+ ao.socialTiktokPost(accountId, cookies, caption, { video_base64? | video_url? }, { privacy?: 0|1|2, allow_comments?, allow_duet?, allow_stitch?, schedule_at? }?, proxySessionId?, country?)
757
+ ao.socialTiktokFollow(accountId, cookies, targetUser, proxySessionId?, country?)
758
+ ao.socialTiktokLike(accountId, cookies, videoUrl, proxySessionId?, country?)
759
+ ao.socialTiktokDelete(accountId, cookies, videoUrl, proxySessionId?, country?)
760
+ ao.socialTiktokProfile(accountId, cookies, { bio?, display_name? }, proxySessionId?, country?)
761
+ ao.socialTiktokAvatar(accountId, cookies, { image_base64? | image_url? }, proxySessionId?, country?)
762
+
717
763
  // Info
718
764
  ao.pricing()
719
765
  ao.health()