Skip to content
DunSocial Docs

Install and sign in

Install the DunSocial CLI and connect your account.

You need Node.js 20 or newer. Then install the package and sign in.

Install

npm install -g dunsocial

Check that it works:

dun --help

You can also run it without a global install: npx dunsocial --help.

Sign in on your machine

dun auth login

A browser window opens so you can approve access. After that, you are signed in on this computer.

If the browser does not open:

dun auth login --no-browser

Follow the link and code shown in the terminal.

Choose your workspace

dun workspace list
dun workspace use your-workspace

See connected accounts

dun accounts list

Copy the account id you want to post with (not the @username). You will pass that id to post commands.

Access tokens for CI and agents

For GitHub Actions or other automation, create a personal access token instead of device login. Full details are on Authentication and CI and tokens.

Quick setup:

  1. In DunSocial, open Settings, then CLI.
  2. Create an access token and copy it (shown once).
  3. Set DUN_TOKEN and DUN_WORKSPACE_ID in your environment or CI secrets.
export DUN_TOKEN=your_token
export DUN_WORKSPACE_ID=your_workspace_id
dun auth status

Discovery order

After install, always do this before posting:

  1. dun auth status --json
  2. dun workspace list then dun workspace use <id|slug>
  3. dun accounts list — copy the social account id
  4. Schedule or publish

Good to know

  • Device login is best for your laptop. Tokens are best for CI and agents.
  • Prefer ChatGPT or Claude in the browser? Use MCP instead of the CLI.