Skip to content

Repository files navigation

publer-cli

Agent-native Go CLI for the Publer API.

This is a single-binary Go rewrite. It provides named commands for documented Publer resources and publer api request for full API compatibility with any current or future Publer endpoint.

Install

go install github.com/nerveband/publer-cli/cmd/publer@latest

From a checkout:

make install

Configure

Use environment variables, .env, ~/.publer-cli.env, or profiles:

export PUBLER_API_KEY=...
export PUBLER_WORKSPACE_ID=...

Profile example:

publer profile set --name main --api-key-env PUBLER_API_KEY --workspace WORKSPACE_ID
publer profile default main
publer auth status

Secrets are redacted in auth status, config list, profile list, schema, dry-runs, and errors.

Core Commands

publer users me
publer workspaces list --id-only
publer accounts list --fields id,name,provider
publer posts list --state scheduled --from 2026-06-01 --to 2026-06-30 --limit 5
publer media list --types photo --used true --search launch

Create Posts Safely

No test posts are sent by tests or proof gates.

publer --dry-run posts schedule \
  --account ACCOUNT_ID \
  --network linkedin \
  --text "Post body" \
  --scheduled-at 2026-06-04T15:00:00Z

Immediate publishing requires explicit commitment:

publer posts publish-now --account ACCOUNT_ID --network linkedin --text "Post body" --yes

Async commands can wait:

publer posts schedule --body @payload.json --wait --timeout 90s
publer jobs wait JOB_ID --timeout 90s
publer jobs list

Full API Compatibility

Use api request for any Publer endpoint:

publer api request --method GET --path /posts --query state=scheduled
publer --dry-run api request --method POST --path /posts/schedule --body @payload.json
publer api request --method POST --path /media --file ./image.png

This is the compatibility escape hatch for Publer endpoints that change before named commands are updated.

Analytics

publer analytics charts
publer analytics chart-data --query 'chart_ids[]=followers' --query from=2026-05-01 --query to=2026-05-31
publer analytics post-insights ACCOUNT_ID --query from=2026-05-01 --query to=2026-05-31
publer analytics hashtags ACCOUNT_ID --query from=2026-05-01 --query to=2026-05-31
publer analytics best-times ACCOUNT_ID --query from=2026-05-01 --query to=2026-05-31
publer analytics competitors ACCOUNT_ID

Local Data Layer

publer sync --kind accounts --kind posts --kind media
publer search launch --kind posts --limit 10

The local SQLite database lives at ~/.publer-cli/publer.sqlite.

Agent Features

publer schema
publer schema --validate
publer agent-context
publer skill-path
publer doctor
publer feedback "confusing flag behavior"

Output controls:

publer posts list --fields id,text,state
publer accounts list --id-only
publer media list --count
publer posts list --transform posts.0.id
publer posts list --deliver file:./posts.json

Auto Update

The CLI checks GitHub Releases once per day in the background for normal commands and prints a stderr notice when an update exists. Upgrade explicitly:

publer upgrade

Release artifacts are configured with GoReleaser and checksums.txt for go-selfupdate.

Verification

make verify

This builds, tests, validates schema, verifies agent context, and checks dry-run post creation without sending any Publer post.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages