Skip to content

The Sharek CLI

The Sharek CLI puts your account in the terminal. Schedule posts, list channels, upload media and pull analytics without opening a browser, and script any of it.

It covers posting, channels, analytics and uploads from the public API, with the HTTP taken care of. The rest of the API has no command: post settings, uploading from a URL, listing your media, notifications, video, finding the next free slot, deleting a post group, looking up the account a credential acts for, and connecting or disconnecting a channel. Call the API directly for those.

The package is sharek-cli and the command it installs is sharek.

Terminal window
npm install -g sharek-cli

You need Node 18 or newer. Check the install worked:

Terminal window
sharek --version
sharek --help

Every command needs credentials.

Not on every plan. The CLI works through the public API, which needs a plan that includes it. See pricing.

The quickest way to sign in is the browser flow:

Terminal window
sharek auth:login

That prints a code, opens Sharek for you to approve it, and stores the result. Authentication covers the flow in full, the SHAREK_API_KEY alternative, and which one wins when you have both.

Commands print a short human line, then the JSON the API returned (trimmed here):

Terminal window
$ sharek integrations:list
🔌 Connected Integrations:
[
{
"id": "channel-id",
"name": "My X account",
"identifier": "x"
}
]

posts:delete and the three auth:* commands print only their own messages, with no JSON.