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 dunsocialCheck that it works:
dun --helpYou can also run it without a global install: npx dunsocial --help.
Sign in on your machine
dun auth loginA 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-browserFollow the link and code shown in the terminal.
Choose your workspace
dun workspace list
dun workspace use your-workspaceSee connected accounts
dun accounts listCopy 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:
- In DunSocial, open Settings, then CLI.
- Create an access token and copy it (shown once).
- Set
DUN_TOKENandDUN_WORKSPACE_IDin your environment or CI secrets.
export DUN_TOKEN=your_token
export DUN_WORKSPACE_ID=your_workspace_id
dun auth statusDiscovery order
After install, always do this before posting:
dun auth status --jsondun workspace listthendun workspace use <id|slug>dun accounts list— copy the social account id- 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.