ReferenceCLI commands
BetaYou are reading docs for the beta channel (
2.4.1-beta.1) — updated automatically on every beta release.Switch to stable →CLI commands
ak content
Publish content to channels
Publish posts to external channels via pluggable channel adapters. The Discord webhook adapter is implemented; Twitter, LinkedIn, and RSS adapters are not implemented.
Who it's for: Both: power devs (--json --no-interactive --dry-run) and non-tech users (TUI defaults).
When to use it: Use ak content publish to push a message to a channel from a script or workflow.
What changes on disk: Read-only (reads ~/.agentkit/config.yaml for channel config). Network write on publish (webhook POST). --dry-run makes this fully read-only.
Examples
ak content publish --channel discord --body "Hello from AgentKit!"
ak content publish --channel discord --body "Update" --dry-run
ak content publish --channel discord --body "$(cat release-notes.md)" --jsonFlags
| Flag | Description |
|---|---|
-h, --help | help for content |
--json | Emit machine-readable JSON (implies --no-interactive) |
--no-interactive | Disable interactive prompts (CI-safe) |
-q, --quiet | Suppress non-error output on stderr |
-V, --verbose | Extra diagnostic output on stderr (loses to --quiet) |
-y, --yes | Assume yes for all prompts |
Output modes
| Mode | Behavior |
|---|---|
pretty | default on TTY (colors, ASCII markers) |
plain | auto when stdout piped or --no-interactive |
json | --json (single-object envelope, NDJSON-safe) |
Exit codes
| Code | Meaning |
|---|---|
0 | success |
1 | runtime error |
2 | invalid flags |
3 | user-cancel (SIGINT, prompt-cancel) |
1 | publish failed (network error, bad webhook URL, adapter error) |
2 | invalid flags or arguments |
3 | validation error (body too long, missing required config) |
Related commands
ak— AgentKit CLIak content publish— Publish a post to a channelak content queue— Manage the scheduled post queueak content schedule— Manage the content scheduler