KosmoKrator

social

Bluesky CLI for AI Agents

Use the Bluesky CLI from KosmoKrator to call Bluesky tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

6 functions 5 read 1 write Manual OAuth token auth

Bluesky CLI Setup

Bluesky can be configured headlessly with `kosmokrator integrations:configure bluesky`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure bluesky --set access_token="$BLUESKY_ACCESS_TOKEN" --set did="$BLUESKY_DID" --enable --read allow --write ask --json
kosmokrator integrations:doctor bluesky --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token BLUESKY_ACCESS_TOKEN Secret secret yes Access Token
did BLUESKY_DID Text string yes DID
url BLUESKY_URL URL url no PDS URL

Call Bluesky Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call bluesky.bluesky_create_post '{
  "text": "example_text",
  "langs": "example_langs",
  "facets": "example_facets",
  "createdAt": "example_createdAt"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:bluesky bluesky_create_post '{
  "text": "example_text",
  "langs": "example_langs",
  "facets": "example_facets",
  "createdAt": "example_createdAt"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs bluesky --json
kosmo integrations:docs bluesky.bluesky_create_post --json
kosmo integrations:schema bluesky.bluesky_create_post --json
kosmo integrations:search "Bluesky" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Bluesky.

bluesky.bluesky_create_post

Write write

Create a new post on Bluesky. The post text is required and supports facets (mentions, links, tags) if provided.

Parameters
text, langs, facets, createdAt

Generic CLI call

kosmo integrations:call bluesky.bluesky_create_post '{"text":"example_text","langs":"example_langs","facets":"example_facets","createdAt":"example_createdAt"}' --json

Provider shortcut

kosmo integrations:bluesky bluesky_create_post '{"text":"example_text","langs":"example_langs","facets":"example_facets","createdAt":"example_createdAt"}' --json

bluesky.bluesky_get_profile

Read read

Get the public profile of a Bluesky user. Provide a handle (e.g. "alice.bsky.social") or DID.

Parameters
actor

Generic CLI call

kosmo integrations:call bluesky.bluesky_get_profile '{"actor":"example_actor"}' --json

Provider shortcut

kosmo integrations:bluesky bluesky_get_profile '{"actor":"example_actor"}' --json

bluesky.bluesky_list_followers

Read read

List the followers of a Bluesky account. Returns follower profiles with handles, display names, and avatars.

Parameters
actor, limit, cursor

Generic CLI call

kosmo integrations:call bluesky.bluesky_list_followers '{"actor":"example_actor","limit":1,"cursor":"example_cursor"}' --json

Provider shortcut

kosmo integrations:bluesky bluesky_list_followers '{"actor":"example_actor","limit":1,"cursor":"example_cursor"}' --json

bluesky.bluesky_list_following

Read read

List the accounts that a Bluesky user follows. Returns profiles with handles, display names, and avatars.

Parameters
actor, limit, cursor

Generic CLI call

kosmo integrations:call bluesky.bluesky_list_following '{"actor":"example_actor","limit":1,"cursor":"example_cursor"}' --json

Provider shortcut

kosmo integrations:bluesky bluesky_list_following '{"actor":"example_actor","limit":1,"cursor":"example_cursor"}' --json

bluesky.bluesky_search_posts

Read read

Search for posts on Bluesky. Supports full-text search queries. Returns matching posts with author, text, and timestamps.

Parameters
q, limit, cursor

Generic CLI call

kosmo integrations:call bluesky.bluesky_search_posts '{"q":"example_q","limit":1,"cursor":"example_cursor"}' --json

Provider shortcut

kosmo integrations:bluesky bluesky_search_posts '{"q":"example_q","limit":1,"cursor":"example_cursor"}' --json

bluesky.bluesky_get_current_user

Read read

Get the authenticated user's own Bluesky profile. No parameters required — uses the configured account.

Parameters
none

Generic CLI call

kosmo integrations:call bluesky.bluesky_get_current_user '{}' --json

Provider shortcut

kosmo integrations:bluesky bluesky_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

bluesky.bluesky_create_post

Create a new post on Bluesky. The post text is required and supports facets (mentions, links, tags) if provided.

Operation
Write write
Schema command
kosmo integrations:schema bluesky.bluesky_create_post --json
ParameterTypeRequiredDescription
text string yes The text content of the post (max 300 graphemes).
langs array no BCP-47 language tags (e.g. ["en", "nl"]). Defaults to ["en"].
facets array no Optional facets for rich text (mentions, links, tags). Each facet needs index.byteStart, index.byteEnd, and features array.
createdAt string no ISO 8601 timestamp. Defaults to now if omitted.

bluesky.bluesky_get_profile

Get the public profile of a Bluesky user. Provide a handle (e.g. "alice.bsky.social") or DID.

Operation
Read read
Schema command
kosmo integrations:schema bluesky.bluesky_get_profile --json
ParameterTypeRequiredDescription
actor string yes Handle (e.g. "alice.bsky.social") or DID (e.g. "did:plc:...").

bluesky.bluesky_list_followers

List the followers of a Bluesky account. Returns follower profiles with handles, display names, and avatars.

Operation
Read read
Schema command
kosmo integrations:schema bluesky.bluesky_list_followers --json
ParameterTypeRequiredDescription
actor string yes Handle or DID of the user whose followers to list.
limit integer no Number of results per page (1–100, default 50).
cursor string no Pagination cursor from a previous response to fetch the next page.

bluesky.bluesky_list_following

List the accounts that a Bluesky user follows. Returns profiles with handles, display names, and avatars.

Operation
Read read
Schema command
kosmo integrations:schema bluesky.bluesky_list_following --json
ParameterTypeRequiredDescription
actor string yes Handle or DID of the user whose follows to list.
limit integer no Number of results per page (1–100, default 50).
cursor string no Pagination cursor from a previous response to fetch the next page.

bluesky.bluesky_search_posts

Search for posts on Bluesky. Supports full-text search queries. Returns matching posts with author, text, and timestamps.

Operation
Read read
Schema command
kosmo integrations:schema bluesky.bluesky_search_posts --json
ParameterTypeRequiredDescription
q string yes Search query. Supports search operators like "from:user", "has:images", "lang:en", and boolean combinations.
limit integer no Number of results per page (1–100, default 25).
cursor string no Pagination cursor from a previous response to fetch the next page.

bluesky.bluesky_get_current_user

Get the authenticated user's own Bluesky profile. No parameters required — uses the configured account.

Operation
Read read
Schema command
kosmo integrations:schema bluesky.bluesky_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.