Skip to main content
Mallary CLI is a social media command line interface for the Mallary publishing platform. It serves developers, operators, automation scripts, CI jobs, and AI agents. If you want a social media CLI, Mallary gives you a direct command-line client for the public Mallary platform. Use it to upload media, create posts, schedule content, and read job status. You can also read post analytics and audience counts, list connected platforms, manage webhooks, and update brand settings.

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
The CLI is a convenient interface over the same underlying Mallary system used by the dashboard, REST API, and MCP server.

Authentication

For interactive use, sign in with browser-based OAuth:
One OAuth login gives access to view data, publish posts, reply to comments, and manage settings and connections. Users do not choose OAuth scopes. The CLI stores credentials outside your project by default and refreshes access automatically. MALLARY_API_KEY remains available as an optional environment override for CI or other non-interactive environments.

Installation

Install globally:
Run without a global install:

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
Many downstream social platforms expect trusted hosted media 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
The CLI can test the same post payloads that you plan to send from automation or backend systems. For scheduling, you can either send an absolute timestamp with --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:
  • Facebook
  • Instagram
  • Threads
  • LinkedIn
  • YouTube
  • TikTok
  • Pinterest
  • Reddit
  • Snapchat
  • X
For the exact supported 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_type with text, image, video, or carousel.
  • YouTube requires exactly one video.
  • Instagram supports platform_options.instagram.post_type with feed, story, reel, or carousel.
  • 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, set platform_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.
For the full matrix, see: Platform-specific media rules

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
Current product rules are:
  • Free plans do not have CLI access
  • analytics access follows plan capabilities
  • use mallary profiles list to find the random public profile ID for non-default profiles
  • use --profile-id for 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
Last modified on August 14, 2026