Start here
CLI Overview
Start with what the CLI covers, who it is for, and how it maps to the
Mallary platform.
Install
Install, update, or remove the Mallary CLI with npm or npx.
Quickstart
Run your first health check, upload, post creation, and job lookup commands.
Automation
Use the CLI in scripts, CI pipelines, and AI-driven automation flows.
What the Mallary CLI does
With the CLI you can:- upload local media files
- create and schedule posts
- list comments and post supplied replies on published posts
- read publishing jobs, including platform post IDs and URLs when available
- list grouped posts
- read post analytics and follower or subscriber counts
- create, list, and delete webhooks
- update settings for brand and auto-reply behavior
- list connected platforms
- disconnect platforms
Who the Mallary CLI is for
Mallary CLI is useful for:- developers who want quick local testing
- operators who prefer shell workflows over dashboards
- CI pipelines that need social publishing steps
- scripts that automate content workflows
- AI agents that need a stable command interface
How Mallary CLI works
Mallary CLI is a direct client for the public Mallary API. It does not bypass:- plan limits
- feature gates
- platform rules
Authentication
For interactive use, sign in with browser-based OAuth:MALLARY_API_KEY remains available as an optional environment override for CI or other non-interactive environments.
Installation
Install globally:Common commands
Examples:Media handling
Mallary CLI handles media uploads for local and scripted workflows. Current behavior is:- Mallary uploads local files automatically
- Mallary rejects external remote media URLs
- Mallary accepts existing
https://files.mallary.ai/...URLs
Posting and scheduling
Mallary CLI supports both simple and advanced post creation flows. You can:- create posts from flags
- create posts from JSON payload files
- schedule posts
- schedule local wall-clock times with
--scheduled-timezone - attach media
- add follow-up comments on supported platform/format combinations
- enable per-post AI auto reply
- use platform-specific payloads in file mode
--scheduled-at 2026-04-06T18:30:00Z, or pair a local --scheduled-at 2026-04-06T14:30 with --scheduled-timezone America/New_York.
Supported platform-specific payload areas
The current CLI README documents platform-specific payload examples for:- Threads
- YouTube
- TikTok
- Snapchat
- X
platform_options structure and field names by platform, use the API reference here:
Platform options reference
Mallary CLI also inherits the same per-platform media rules as the API.
Examples:
- Threads supports
platform_options.threads.post_typewithtext,image,video, orcarousel. - YouTube requires exactly one video.
- Instagram supports
platform_options.instagram.post_typewithfeed,story,reel, orcarousel. - TikTok video posts require one video, and TikTok photo posts support up to 35 JPEG/WebP images.
- TikTok defaults to
MEDIA_UPLOAD, which sends uploads to the creator inbox for final review inside TikTok. To publish directly instead, setplatform_options.tiktok.post_mode = DIRECT_POST. - Pinterest requires exactly one image or GIF, or exactly one video.
- X allows up to 4 images, or 1 video, or 1 GIF.
JSON output and automation
Mallary CLI supports--json output for scripting and automated workflows.
This output format is a good fit for:
- shell scripts
- GitHub Actions
- CI jobs
- agent toolchains
- local testing before integrating with the raw API
Plans and access
CLI access is available on paid plans only:- Starter
- Pro
- Business
- Free plans do not have CLI access
- analytics access follows plan capabilities
- use
mallary profiles listto find the random public profile ID for non-default profiles - use
--profile-idfor non-default profiles when posting, listing posts, reading post analytics, audience counts, or settings, listing platforms, or disconnecting a platform - AI auto-reply features follow plan capabilities
Good fit for the Mallary CLI
Mallary CLI is a strong fit if you want:- the fastest way to test Mallary without building an API client
- shell-first social media automation
- a CI-friendly publishing interface
- a command surface for AI agents or local scripts
- easy local-media-to-post workflows

