KosmoKrator

productivity

Buffer CLI for AI Agents

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

Buffer CLI Setup

Buffer can be configured headlessly with `kosmokrator integrations:configure buffer`.

Install, configure, and verify
# 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 buffer --set access_token="$BUFFER_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor buffer --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
access_token BUFFER_ACCESS_TOKEN Secret secret yes Access Token
url BUFFER_URL URL url no API Base URL
graphql_url BUFFER_GRAPHQL_URL URL url no GraphQL API URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call buffer.buffer_list_profiles '{}' --json
Provider shortcut
kosmo integrations:buffer buffer_list_profiles '{}' --json

Discovery

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

Discovery commands
kosmo integrations:docs buffer --json
kosmo integrations:docs buffer.buffer_list_profiles --json
kosmo integrations:schema buffer.buffer_list_profiles --json
kosmo integrations:search "Buffer" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

buffer.buffer_list_profiles

List all social media profiles connected to the Buffer account. Returns profile IDs, service types (e.g., Twitter, Facebook, LinkedIn), and display names.

Read read
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_list_profiles '{}' --json
Shortcut
kosmo integrations:buffer buffer_list_profiles '{}' --json

buffer.buffer_get_profile

Get details of a specific social media profile in Buffer by its ID. Returns profile service type, display name, and account metadata.

Read read
Parameters
profileId
Generic call
kosmo integrations:call buffer.buffer_get_profile '{"profileId":"example_profileId"}' --json
Shortcut
kosmo integrations:buffer buffer_get_profile '{"profileId":"example_profileId"}' --json

buffer.buffer_list_profile_schedules

List posting schedules for a social profile.

Read read
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_list_profile_schedules '{}' --json
Shortcut
kosmo integrations:buffer buffer_list_profile_schedules '{}' --json

buffer.buffer_update_profile_schedules

Replace posting schedules for a social profile.

Write write
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_update_profile_schedules '{}' --json
Shortcut
kosmo integrations:buffer buffer_update_profile_schedules '{}' --json

buffer.buffer_list_pending_updates

List scheduled (pending) updates for a Buffer profile. Returns update IDs, text content, scheduled times, and status. Supports pagination.

Read read
Parameters
profileId, count, page, since, utc
Generic call
kosmo integrations:call buffer.buffer_list_pending_updates '{"profileId":"example_profileId","count":1,"page":1,"since":1,"utc":true}' --json
Shortcut
kosmo integrations:buffer buffer_list_pending_updates '{"profileId":"example_profileId","count":1,"page":1,"since":1,"utc":true}' --json

buffer.buffer_create_update

Create and schedule a new social media update in Buffer. Provide the text content, target profile IDs, and optionally a scheduled time or media attachments.

Write write
Parameters
text, profileIds, shorten, now, top, scheduledAt, media, retweet, attachment
Generic call
kosmo integrations:call buffer.buffer_create_update '{"text":"example_text","profileIds":"example_profileIds","shorten":true,"now":true,"top":true,"scheduledAt":"example_scheduledAt","media":"example_media","retweet":"example_retweet"}' --json
Shortcut
kosmo integrations:buffer buffer_create_update '{"text":"example_text","profileIds":"example_profileIds","shorten":true,"now":true,"top":true,"scheduledAt":"example_scheduledAt","media":"example_media","retweet":"example_retweet"}' --json

buffer.buffer_list_sent_updates

List already posted (sent) updates for a Buffer profile. Returns update IDs, text content, sent times, and engagement metrics. Supports pagination.

Read read
Parameters
profileId, count, page, since, utc, filter
Generic call
kosmo integrations:call buffer.buffer_list_sent_updates '{"profileId":"example_profileId","count":1,"page":1,"since":1,"utc":true,"filter":"example_filter"}' --json
Shortcut
kosmo integrations:buffer buffer_list_sent_updates '{"profileId":"example_profileId","count":1,"page":1,"since":1,"utc":true,"filter":"example_filter"}' --json

buffer.buffer_get_update

Get details of a specific Buffer update by its ID. Returns the update text, scheduled or sent time, social profiles, media, and delivery status.

Read read
Parameters
updateId
Generic call
kosmo integrations:call buffer.buffer_get_update '{"updateId":"example_updateId"}' --json
Shortcut
kosmo integrations:buffer buffer_get_update '{"updateId":"example_updateId"}' --json

buffer.buffer_reorder_updates

Reorder pending updates for a profile.

Write write
Parameters
profileId, order, offset, utc
Generic call
kosmo integrations:call buffer.buffer_reorder_updates '{"profileId":"example_profileId","order":"example_order","offset":1,"utc":true}' --json
Shortcut
kosmo integrations:buffer buffer_reorder_updates '{"profileId":"example_profileId","order":"example_order","offset":1,"utc":true}' --json

buffer.buffer_shuffle_updates

Randomize pending updates for a profile.

Write write
Parameters
profileId, count, utc
Generic call
kosmo integrations:call buffer.buffer_shuffle_updates '{"profileId":"example_profileId","count":1,"utc":true}' --json
Shortcut
kosmo integrations:buffer buffer_shuffle_updates '{"profileId":"example_profileId","count":1,"utc":true}' --json

buffer.buffer_update_update

Edit an existing pending update.

Write write
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_update_update '{}' --json
Shortcut
kosmo integrations:buffer buffer_update_update '{}' --json

buffer.buffer_share_update

Immediately share a pending update.

Write write
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_share_update '{}' --json
Shortcut
kosmo integrations:buffer buffer_share_update '{}' --json

buffer.buffer_destroy_update

Permanently delete a pending update.

Write write
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_destroy_update '{}' --json
Shortcut
kosmo integrations:buffer buffer_destroy_update '{}' --json

buffer.buffer_move_update_to_top

Move a pending update to the top of the queue.

Write write
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_move_update_to_top '{}' --json
Shortcut
kosmo integrations:buffer buffer_move_update_to_top '{}' --json

buffer.buffer_get_link_shares

Get Buffer share count for a URL.

Read read
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_get_link_shares '{}' --json
Shortcut
kosmo integrations:buffer buffer_get_link_shares '{}' --json

buffer.buffer_get_info_configuration

Get Buffer API service, limit, media, and analytics metadata.

Read read
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_get_info_configuration '{}' --json
Shortcut
kosmo integrations:buffer buffer_get_info_configuration '{}' --json

buffer.buffer_deauthorize_user

Deauthorize the current Buffer API token.

Write write
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_deauthorize_user '{}' --json
Shortcut
kosmo integrations:buffer buffer_deauthorize_user '{}' --json

buffer.buffer_graphql

Execute a Buffer GraphQL API operation against the current beta API endpoint.

Write write
Parameters
query, variables, operationName
Generic call
kosmo integrations:call buffer.buffer_graphql '{"query":"example_query","variables":"example_variables","operationName":"example_operationName"}' --json
Shortcut
kosmo integrations:buffer buffer_graphql '{"query":"example_query","variables":"example_variables","operationName":"example_operationName"}' --json

buffer.buffer_get_current_user

Get the currently authenticated Buffer user profile. Returns the user name, email, and account info.

Read read
Parameters
none
Generic call
kosmo integrations:call buffer.buffer_get_current_user '{}' --json
Shortcut
kosmo integrations:buffer buffer_get_current_user '{}' --json

Function Schemas

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

buffer.buffer_list_profiles 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_list_profiles --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_get_profile 1 parameters
Schema command
kosmo integrations:schema buffer.buffer_get_profile --json
ParameterTypeRequiredDescription
profileId string yes The social profile ID to retrieve.
buffer.buffer_list_profile_schedules 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_list_profile_schedules --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_update_profile_schedules 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_update_profile_schedules --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_list_pending_updates 5 parameters
Schema command
kosmo integrations:schema buffer.buffer_list_pending_updates --json
ParameterTypeRequiredDescription
profileId string yes The social profile ID to list pending updates for.
count integer no Number of updates to return per page.
page integer no Page number for pagination.
since integer no Only return updates created after this Unix timestamp.
utc boolean no Return times relative to UTC.
buffer.buffer_create_update 9 parameters
Schema command
kosmo integrations:schema buffer.buffer_create_update --json
ParameterTypeRequiredDescription
text string yes The text content of the update to post.
profileIds array yes Array of Buffer profile IDs to publish the update to.
shorten boolean no Whether to automatically shorten links (default true).
now boolean no Post immediately instead of scheduling (default false).
top boolean no Add this update to the top of the buffer.
scheduledAt string no ISO 8601 timestamp for when the update should be sent (e.g., "2025-02-01T09:00:00Z").
media object no Media attachments such as photo URL, link, or thumbnail.
retweet object no Twitter retweet payload such as tweet_id and optional comment.
attachment boolean no Whether Buffer should automatically populate media from links in the text.
buffer.buffer_list_sent_updates 6 parameters
Schema command
kosmo integrations:schema buffer.buffer_list_sent_updates --json
ParameterTypeRequiredDescription
profileId string yes The social profile ID to list sent updates for.
count integer no Number of updates to return per page.
page integer no Page number for pagination.
since integer no Only return updates sent after this Unix timestamp.
utc boolean no Return times relative to UTC.
filter string no Sent update filter, such as all or default.
buffer.buffer_get_update 1 parameters
Schema command
kosmo integrations:schema buffer.buffer_get_update --json
ParameterTypeRequiredDescription
updateId string yes The update ID to retrieve.
buffer.buffer_reorder_updates 4 parameters
Schema command
kosmo integrations:schema buffer.buffer_reorder_updates --json
ParameterTypeRequiredDescription
profileId string yes The social profile ID.
order array yes Ordered array of pending update IDs.
offset integer no Optional offset for partial reorder.
utc boolean no Return times relative to UTC.
buffer.buffer_shuffle_updates 3 parameters
Schema command
kosmo integrations:schema buffer.buffer_shuffle_updates --json
ParameterTypeRequiredDescription
profileId string yes The social profile ID.
count integer no Number of updates to return.
utc boolean no Return times relative to UTC.
buffer.buffer_update_update 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_update_update --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_share_update 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_share_update --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_destroy_update 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_destroy_update --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_move_update_to_top 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_move_update_to_top --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_get_info_configuration 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_get_info_configuration --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_deauthorize_user 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_deauthorize_user --json
ParameterTypeRequiredDescription
No parameters.
buffer.buffer_graphql 3 parameters
Schema command
kosmo integrations:schema buffer.buffer_graphql --json
ParameterTypeRequiredDescription
query string yes GraphQL query or mutation document.
variables object no GraphQL variables.
operationName string no Optional GraphQL operation name.
buffer.buffer_get_current_user 0 parameters
Schema command
kosmo integrations:schema buffer.buffer_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.