Developers

Use Ankk from CLI, API, and AI tools

Install the Bun-first CLI, configure a public API key, and send prepared content from Codex, Claude Code, ChatGPT, scripts, or automation tools into Ankk scheduling.

terminal
$ bunx @anakonn/ankk --json health
$ ankk config setup --scope project
$ ankk contents publish --brand-ref acme --file payload.json

Quick start

A small path that proves the package, API key, and brand-scoped publish workflow.

Install or run once

The public package is @anakonn/ankk and the binary is ankk. The CLI currently requires Bun.

bunx @anakonn/ankk --json health
bun install -g @anakonn/ankk
ankk --json health

Configure safely

Use an API key from Ankk. Command output redacts the full key, and environment variables work for CI.

ankk config setup --scope global
ANKK_API_KEY=spk_... ankk config setup --scope project --brand-ref <brand_ref> --api-key-env ANKK_API_KEY --yes
ankk config show

Publish prepared content

Create a JSON payload and hand it to the same public scheduling contract used by API clients.

ankk brands list --json
ankk contents publish --brand-ref <brand_ref> --file payload.json
ankk contents publish --brand-ref <brand_ref> --file payload.json --scheduled-for 2026-07-01T09:00:00Z
Payload

Send JSON instead of rebuilding forms

Use --file for content bodies so scripts and AI tools can produce structured payloads without a fragile pile of flags.

  • Keep payload fixtures outside git when they contain customer data.
  • Use idempotency keys for repeatable automation.
  • Treat accepted as scheduled, not provider-succeeded.
{
"connection_id": "<connection_id>",
"idempotency_key": "launch-thread-2026-07-01",
"sns_type": "threads",
"text": "Launch update from Ankk",
"scheduled_for": "2026-07-01T09:00:00Z"
}
API

Call the public API directly

Every CLI workflow maps back to the public /v1 API. Use Bearer auth and brand-scoped routes for automation clients.

  • Use GET /v1/brands to discover accessible brands.
  • Use /v1/docs and /v1/openapi.json for the public contract.
  • Never paste full API keys into logs or tickets.
curl -X POST https://api-public.ankk.app/v1/brands/<brand_ref>/contents \
-H "Authorization: Bearer spk_..." \
-H "Content-Type: application/json" \
--data @payload.json
Status

Track the work after acceptance

Publishing is asynchronous. The API accepts validated work, persists it, and schedules execution; provider completion happens later.

  • Expected states include accepted, queued, publishing, published, failed, and retry.
  • Use signed webhooks when another system needs status updates.
  • Operational status stays in Ankk instead of the AI prompt.
ankk contents list --brand-ref <brand_ref> --json
ankk contents get --brand-ref <brand_ref> --content-id <content_id> --json

Prompt AI tools to use Ankk, not replace it

Let the AI tool prepare copy, payloads, or commands. Ankk remains the scheduling and status system.

Codex

Create a Threads launch payload from this release note, save it as tmp/launch-thread.json, then run ankk contents publish with my configured brand.

Claude Code

Inspect payload.json for missing connection_id, idempotency_key, sns_type, text, and scheduled_for. Then show the exact ankk contents publish command.

ChatGPT

Draft three channel-safe post variants and return one JSON payload that I can pass to ankk contents publish --file payload.json.

Safety boundaries

Do not expose full spk_ API keys to models, logs, screenshots, or issue comments.
Do not tell users that command success means provider publishing already succeeded.
Do not document hidden or dormant CLI commands as public features.
Use API keys, webhooks, and status checks for automation instead of direct database access.

Ready to wire Ankk into your workflow?

Start with the CLI, then move the same payloads into scripts, CI jobs, or AI tool runs.