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 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.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
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.
kosmo integrations:call buffer.buffer_list_profiles '{}' --json 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.
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 - Parameters
- none
kosmo integrations:call buffer.buffer_list_profiles '{}' --json 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 - Parameters
- profileId
kosmo integrations:call buffer.buffer_get_profile '{"profileId":"example_profileId"}' --json kosmo integrations:buffer buffer_get_profile '{"profileId":"example_profileId"}' --json buffer.buffer_list_profile_schedules
List posting schedules for a social profile.
read - Parameters
- none
kosmo integrations:call buffer.buffer_list_profile_schedules '{}' --json kosmo integrations:buffer buffer_list_profile_schedules '{}' --json buffer.buffer_update_profile_schedules
Replace posting schedules for a social profile.
write - Parameters
- none
kosmo integrations:call buffer.buffer_update_profile_schedules '{}' --json 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 - Parameters
- profileId, count, page, since, utc
kosmo integrations:call buffer.buffer_list_pending_updates '{"profileId":"example_profileId","count":1,"page":1,"since":1,"utc":true}' --json 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 - Parameters
- text, profileIds, shorten, now, top, scheduledAt, media, retweet, attachment
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 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 - Parameters
- profileId, count, page, since, utc, filter
kosmo integrations:call buffer.buffer_list_sent_updates '{"profileId":"example_profileId","count":1,"page":1,"since":1,"utc":true,"filter":"example_filter"}' --json 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 - Parameters
- updateId
kosmo integrations:call buffer.buffer_get_update '{"updateId":"example_updateId"}' --json kosmo integrations:buffer buffer_get_update '{"updateId":"example_updateId"}' --json buffer.buffer_reorder_updates
Reorder pending updates for a profile.
write - Parameters
- profileId, order, offset, utc
kosmo integrations:call buffer.buffer_reorder_updates '{"profileId":"example_profileId","order":"example_order","offset":1,"utc":true}' --json 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 - Parameters
- profileId, count, utc
kosmo integrations:call buffer.buffer_shuffle_updates '{"profileId":"example_profileId","count":1,"utc":true}' --json kosmo integrations:buffer buffer_shuffle_updates '{"profileId":"example_profileId","count":1,"utc":true}' --json buffer.buffer_update_update
Edit an existing pending update.
write - Parameters
- none
kosmo integrations:call buffer.buffer_update_update '{}' --json kosmo integrations:buffer buffer_update_update '{}' --json buffer.buffer_share_update
Immediately share a pending update.
write - Parameters
- none
kosmo integrations:call buffer.buffer_share_update '{}' --json kosmo integrations:buffer buffer_share_update '{}' --json buffer.buffer_destroy_update
Permanently delete a pending update.
write - Parameters
- none
kosmo integrations:call buffer.buffer_destroy_update '{}' --json kosmo integrations:buffer buffer_destroy_update '{}' --json buffer.buffer_move_update_to_top
Move a pending update to the top of the queue.
write - Parameters
- none
kosmo integrations:call buffer.buffer_move_update_to_top '{}' --json kosmo integrations:buffer buffer_move_update_to_top '{}' --json buffer.buffer_get_link_shares
Get Buffer share count for a URL.
read - Parameters
- none
kosmo integrations:call buffer.buffer_get_link_shares '{}' --json kosmo integrations:buffer buffer_get_link_shares '{}' --json buffer.buffer_get_info_configuration
Get Buffer API service, limit, media, and analytics metadata.
read - Parameters
- none
kosmo integrations:call buffer.buffer_get_info_configuration '{}' --json kosmo integrations:buffer buffer_get_info_configuration '{}' --json buffer.buffer_deauthorize_user
Deauthorize the current Buffer API token.
write - Parameters
- none
kosmo integrations:call buffer.buffer_deauthorize_user '{}' --json kosmo integrations:buffer buffer_deauthorize_user '{}' --json buffer.buffer_graphql
Execute a Buffer GraphQL API operation against the current beta API endpoint.
write - Parameters
- query, variables, operationName
kosmo integrations:call buffer.buffer_graphql '{"query":"example_query","variables":"example_variables","operationName":"example_operationName"}' --json 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 - Parameters
- none
kosmo integrations:call buffer.buffer_get_current_user '{}' --json 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
kosmo integrations:schema buffer.buffer_list_profiles --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
buffer.buffer_get_profile 1 parameters
kosmo integrations:schema buffer.buffer_get_profile --json | Parameter | Type | Required | Description |
|---|---|---|---|
profileId | string | yes | The social profile ID to retrieve. |
buffer.buffer_list_profile_schedules 0 parameters
kosmo integrations:schema buffer.buffer_list_profile_schedules --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
buffer.buffer_update_profile_schedules 0 parameters
kosmo integrations:schema buffer.buffer_update_profile_schedules --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
buffer.buffer_list_pending_updates 5 parameters
kosmo integrations:schema buffer.buffer_list_pending_updates --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema buffer.buffer_create_update --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema buffer.buffer_list_sent_updates --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema buffer.buffer_get_update --json | Parameter | Type | Required | Description |
|---|---|---|---|
updateId | string | yes | The update ID to retrieve. |
buffer.buffer_reorder_updates 4 parameters
kosmo integrations:schema buffer.buffer_reorder_updates --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema buffer.buffer_shuffle_updates --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema buffer.buffer_update_update --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
buffer.buffer_destroy_update 0 parameters
kosmo integrations:schema buffer.buffer_destroy_update --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
buffer.buffer_move_update_to_top 0 parameters
kosmo integrations:schema buffer.buffer_move_update_to_top --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
buffer.buffer_get_info_configuration 0 parameters
kosmo integrations:schema buffer.buffer_get_info_configuration --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
buffer.buffer_deauthorize_user 0 parameters
kosmo integrations:schema buffer.buffer_deauthorize_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
buffer.buffer_graphql 3 parameters
kosmo integrations:schema buffer.buffer_graphql --json | Parameter | Type | Required | Description |
|---|---|---|---|
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
kosmo integrations:schema buffer.buffer_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| 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.