Interfaces
CLI
The CLI is not a companion — it is a primary surface alongside the API. It mirrors the API one-to-one, follows the conventions of gh / stripe / aws, and is built for both humans and agents.
Install
shell
$ bun install -g @hasnatools/socializer
$ socializer --versionDesign principles
- CLI ↔ API ↔ web are 1:1 — same nouns, same verbs, same concepts.
- Human-readable by default,
--jsonfor machines — agents parse JSON, humans read tables. - No hidden steps — every action is transparent; OAuth flows print the URL.
--dry-runon every write,--helpon every command, short aliases, ≤2 positional args.
Command surface
socializer --help
socializer auth login <network> # OAuth/device flow; stores token in vault
socializer auth list # connected accounts + token health
socializer auth refresh [--profile <id>]
socializer auth logout <profile>
socializer profiles add|list|show|rm # connected accounts as resources
socializer profiles status [--profile <id>] # rate-limit/quota/token health
socializer compose --from <asset|file> --networks x,linkedin,bsky
socializer post now --profile <id> --text "..." [--media a.png,b.mp4]
socializer schedule --profile <id> --at "2026-07-01T09:00Z" --text "..."
socializer thread --profile <id> --file thread.md
socializer queue list|reorder|flush
socializer approve <post-id> # human approval gate
socializer status [--profile <id>] # global health view
socializer analytics --profile <id> --since 7d --json
socializer mentions list|reply # engagement events
socializer audit --action <a> --since 7d # immutable audit logExample session
shell
# connect accounts
$ socializer auth login linkedin
$ socializer auth login bluesky
# compose once, adapt per network, review, approve, schedule
$ socializer compose --from launch.md --networks linkedin,x,bluesky
$ socializer posts show post_01h…
$ socializer approve post_01h…
$ socializer schedule post_01h… --at "2026-07-01T09:00Z"
# agent-friendly, scriptable
$ socializer post now --profile prof_x --text "Shipping today 🚀" --json --dry-runOutput contract
- Tables for humans; stable, versioned JSON schema under
--json. - Non-zero exit codes on failure; machine-readable error codes match the API's
error.code. - Long ops stream progress to stderr; the final result goes to stdout.
Config lives at ~/.socializer/config.toml. For agent contexts, prefer the SOCIALIZER_API_KEY / SOCIALIZER_API_URL environment variables.