# CLI for social media > Direct answers on the dun command line: install, sign-in, posting, media, Reddit options, CI, JSON output & exit codes. ## [How to install the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-install-the-dunsocial-cli.md) Install the dun command with npm, bun or pnpm, check it works, & keep it up to date. Needs Node.js 20 or newer. ## [How to sign in to the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-sign-in-to-the-dunsocial-cli.md) Sign in with device login on a laptop or a personal access token on a server, pick a workspace & see where the config is stored. ## [How to find the right social account id in the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-find-the-right-social-account-id-in-the-dunsocial-cli.md) Why post commands need account ids instead of @handles, how to list them, & how to filter by platform. ## [How to schedule a post with the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-schedule-a-post-with-the-dunsocial-cli.md) Schedule with --in or --at, post to several accounts at once, publish now & wait for the result with --wait. ## [How to attach images & videos to a post from the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-attach-images-and-videos-to-a-post-from-the-dunsocial-cli.md) Upload a local file with dun media upload, get its asset id, & pass it to a post with --media. Includes video limits & alt text. ## [How to validate a post before publishing with the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-validate-a-post-before-publishing-with-the-dunsocial-cli.md) Use dun posts validate to dry-run character limits & platform options with no writes, & what the extra Reddit check adds. ## [How to post to Reddit from the command line](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-post-to-reddit-from-the-command-line.md) Post to Reddit with the DunSocial CLI: upload media, look up the flair id, validate against live subreddit rules, & publish & wait for the permalink. ## [How to schedule an X thread from the command line](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-schedule-an-x-thread-from-the-command-line.md) Schedule or publish an X thread with dun posts schedule-thread, using a JSON file or || separators, & check the monthly cap first. ## [How to reschedule or cancel a post from the DunSocial CLI](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-reschedule-or-cancel-a-post-from-the-dunsocial-cli.md) List scheduled posts, fetch one by id, reschedule it with --in or --at, cancel it, or delete it from the command line. ## [How to script the DunSocial CLI with JSON output](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-script-the-dunsocial-cli-with-json-output.md) Use --json, DUN_JSON & the stdout versus stderr split to parse DunSocial CLI results reliably in shell scripts. ## [What do the DunSocial CLI exit codes mean?](https://www.dunsocial.com/hub/dunsocial-cli-guides/what-do-the-dunsocial-cli-exit-codes-mean.md) Every exit code the DunSocial CLI returns, from auth failures to rate limits, & how a script should react to each. ## [How to run the DunSocial CLI in GitHub Actions](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-run-the-dunsocial-cli-in-github-actions.md) Post a release announcement from CI: create a personal access token, store two secrets, pin the CLI version & schedule on release. ## [How to install DunSocial skills for coding agents](https://www.dunsocial.com/hub/dunsocial-cli-guides/how-to-install-dunsocial-skills-for-coding-agents.md) Install the skill file the DunSocial CLI ships with so Claude Code, Codex, Cursor & other local agents know how to authenticate & schedule posts. ## About this document This is the Markdown representation of https://www.dunsocial.com/hub/dunsocial-cli-guides. The HTML version of the same page is at the same URL. You can also request Markdown from any page by sending `Accept: text/markdown`. Machine-readable summary of the whole site: https://www.dunsocial.com/llms.txt ## Company - Product: DunSocial, https://www.dunsocial.com - Legal entity: THISUX PRIVATE LIMITED, Chennai, Tamil Nadu, India - Support: support@dunsocial.com - Open the app: https://app.dunsocial.com/login