dunsocial
v0.15.0
Published
DunSocial agent-first CLI — schedule and publish social posts from the terminal, CI, and coding agents
Maintainers
Readme
DunSocial CLI
Post and schedule to your social accounts from the terminal.
Install
npm install -g dunsocial
# or: bun add -g dunsocial / pnpm add -g dunsocialThen use the dun command (Node.js 20+ — Bun not required at runtime).
Upgrade later:
dun update
# or: dun update --checkOn a human terminal, a global install (npm / bun / pnpm / yarn) auto-upgrades after a successful command when a newer non-major version is on npm. Agents, CI, --json, and npx are never auto-updated. Disable with DUN_UPDATE=0 or --no-update.
Get started
1. Sign in
dun auth loginA browser window opens so you can approve access. After that, you’re set on this machineأتى### 2. Choose your workspace
dun workspace list
dun workspace use your-workspace3. See connected accounts
dun accounts listCopy the account id you want to post with (not the @username).
4. Schedule a post
dun posts schedule \
--text "Hello from DunSocial" \
--accounts ACCOUNT_ID \
--in 1hPost right away:
dun posts publish \
--text "Hello from DunSocial" \
--accounts ACCOUNT_IDpublish queues the post (status: scheduled). To wait until it finishes:
dun posts publish \
--text "Hello from DunSocial" \
--accounts ACCOUNT_ID \
--waitLinkedIn video
Personal LinkedIn and Company Pages (linkedin-business) support images (up to 20) or exactly one video (MP4/MOV, ≤512MB). Do not mix video and images. No --meta needed.
# 1. Find your personal LinkedIn account id
dun accounts list --platform linkedin --json
# 2. Upload the clip
dun media upload ./clip.mp4 --json
# 3. Publish (or schedule with --in / --at)
dun posts publish \
--accounts LINKEDIN_ACCOUNT_ID \
--text "Shipping notes from this week" \
--media ASSET_ID \
--wait \
--jsonYouTube Shorts only
YouTube publishes Shorts, not regular videos. Attach exactly one vertical or square clip (3 minutes or less) with --media. The uploaded asset must include width, height, and duration or publish is rejected.
dun accounts list --platform youtube --json
dun media upload ./short.mp4 --json
dun posts publish \
--accounts YOUTUBE_ACCOUNT_ID \
--text "Title"$'\n\n'"Description" \
--media ASSET_ID \
--wait \
--jsonReddit needs platform options via --meta. Many subreddits also require a flair template id.
# 1. Upload media first (gallery accepts video up to 16GB)
dun media upload ./demo.mp4 --json
# 2. List flairs for the subreddit (use id, not just the label text)
dun reddit flairs tamilyapping --json
# 3. Optional dry-run (API character/metadata checks, then live Reddit rules)
dun posts validate \
--accounts REDDIT_ACCOUNT_ID \
--media ASSET_ID \
--meta '{"reddit":{"subreddit":"tamilyapping","kind":"video","title":"Your title","flairId":"FLAIR_ID"}}' \
--json
# 4. Publish and wait for the real permalink
dun posts publish \
--accounts REDDIT_ACCOUNT_ID \
--media ASSET_ID \
--meta '{"reddit":{"subreddit":"tamilyapping","kind":"video","title":"Your title","flairId":"FLAIR_ID"}}' \
--wait \
--json--meta.reddit fields:
| Field | Required | Notes |
|-------|----------|--------|
| subreddit | yes | without r/ |
| kind | yes | self, link, image, or video |
| title | yes | |
| flairId | when the sub requires flair | from dun reddit flairs |
| url | for link | |
| flairText | no | only if that flair's textEditable is true |
Prefer flairId alone. Sending flairText without flairId always fails.
Also useful: dun reddit requirements <subreddit> --json.
Automated posting (CI)
- In DunSocial, open Settings → CLI
- Create an access token and copy it (shown once)
- Add these secrets in your CI:
DUN_TOKEN— your access tokenDUN_WORKSPACE_ID— your workspace id
export DUN_TOKEN=your_token
export DUN_WORKSPACE_ID=your_workspace_id
dun posts schedule \
--text "We just shipped a new release" \
--accounts ACCOUNT_ID \
--in 5mUseful commands
dun --help
dun auth status
dun posts list
dun media upload ./photo.png
dun reddit flairs some-subreddit
dun posts validate --accounts ACCOUNT_ID --text "Hello" --json
dun drafts create --text "Idea for later"
dun posts schedule-thread --account ACCOUNT_ID --file ./thread.json --in 2h
dun memory collections update COLLECTION_ID --name "Renamed"
dun personalization get
dun personalization set --description "Concise, direct, no fluff."Tips:
- Help for any command:
dun posts --help/dun reddit --help - Structured output for scripts: add
--json - Platform-specific options (Reddit, etc.):
--meta '{…}' - Prefer ChatGPT or Claude in the browser? Use MCP instead of the CLI (
com.dunsocial/dunsocialon the official registry, orhttps://api.dunsocial.com/api/mcp) - Personalization is workspace-wide AI voice (Settings → Personalization). Updating it needs a token with the
workspace:writescope
Links
License
MIT
