KosmoKrator

productivity

Later CLI for AI Agents

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

Later CLI Setup

Later can be configured headlessly with `kosmokrator integrations:configure later`.

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 later --set access_token="$LATER_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor later --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 LATER_ACCESS_TOKEN Secret secret yes Access Token
url LATER_URL URL url no API Base URL

Command Patterns

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

Generic CLI call
kosmo integrations:call later.later_list_profiles '{"limit":1,"page":1}' --json
Provider shortcut
kosmo integrations:later later_list_profiles '{"limit":1,"page":1}' --json

Discovery

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

Discovery commands
kosmo integrations:docs later --json
kosmo integrations:docs later.later_list_profiles --json
kosmo integrations:schema later.later_list_profiles --json
kosmo integrations:search "Later" --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.

later.later_list_profiles

List all social media profiles connected to the Later account. Returns profile IDs, platform types, and display names.

Read read
Parameters
limit, page
Generic call
kosmo integrations:call later.later_list_profiles '{"limit":1,"page":1}' --json
Shortcut
kosmo integrations:later later_list_profiles '{"limit":1,"page":1}' --json

later.later_get_profile

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

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

later.later_list_posts

List scheduled and published posts in Later. Optionally filter by profile ID, status (scheduled, published, draft), and paginate results.

Read read
Parameters
profileId, status, limit, page
Generic call
kosmo integrations:call later.later_list_posts '{"profileId":"example_profileId","status":"example_status","limit":1,"page":1}' --json
Shortcut
kosmo integrations:later later_list_posts '{"profileId":"example_profileId","status":"example_status","limit":1,"page":1}' --json

later.later_create_post

Create and schedule a new social media post in Later. Provide the caption text, target profile IDs, and optionally a scheduled time or media URL.

Write write
Parameters
text, profileIds, scheduledAt, mediaUrl, mediaType, title
Generic call
kosmo integrations:call later.later_create_post '{"text":"example_text","profileIds":"example_profileIds","scheduledAt":"example_scheduledAt","mediaUrl":"example_mediaUrl","mediaType":"example_mediaType","title":"example_title"}' --json
Shortcut
kosmo integrations:later later_create_post '{"text":"example_text","profileIds":"example_profileIds","scheduledAt":"example_scheduledAt","mediaUrl":"example_mediaUrl","mediaType":"example_mediaType","title":"example_title"}' --json

later.later_list_media

List media items in the Later media library. Returns media IDs, URLs, types, and metadata. Optionally filter by media type.

Read read
Parameters
limit, page, type
Generic call
kosmo integrations:call later.later_list_media '{"limit":1,"page":1,"type":"example_type"}' --json
Shortcut
kosmo integrations:later later_list_media '{"limit":1,"page":1,"type":"example_type"}' --json

later.later_get_media

Get details of a specific media item in Later by its ID. Returns the media URL, type, dimensions, and metadata.

Read read
Parameters
mediaId
Generic call
kosmo integrations:call later.later_get_media '{"mediaId":"example_mediaId"}' --json
Shortcut
kosmo integrations:later later_get_media '{"mediaId":"example_mediaId"}' --json

later.later_get_current_user

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

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

Function Schemas

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

later.later_list_profiles 2 parameters
Schema command
kosmo integrations:schema later.later_list_profiles --json
ParameterTypeRequiredDescription
limit integer no Number of profiles to return per page.
page integer no Page number for pagination.
later.later_get_profile 1 parameters
Schema command
kosmo integrations:schema later.later_get_profile --json
ParameterTypeRequiredDescription
profileId string yes The social profile ID to retrieve.
later.later_list_posts 4 parameters
Schema command
kosmo integrations:schema later.later_list_posts --json
ParameterTypeRequiredDescription
profileId string no Filter posts by a specific social profile ID.
status string no Filter by post status: "scheduled", "published", or "draft".
limit integer no Number of posts to return per page.
page integer no Page number for pagination.
later.later_create_post 6 parameters
Schema command
kosmo integrations:schema later.later_create_post --json
ParameterTypeRequiredDescription
text string yes The caption or text content of the post.
profileIds array yes Array of Later profile IDs to publish the post to.
scheduledAt string no ISO 8601 timestamp for when the post should be published (e.g., "2025-02-01T09:00:00Z").
mediaUrl string no URL of the media (image or video) to attach to the post.
mediaType string no Type of media: "image" or "video".
title string no Optional title for the post.
later.later_list_media 3 parameters
Schema command
kosmo integrations:schema later.later_list_media --json
ParameterTypeRequiredDescription
limit integer no Number of media items to return per page.
page integer no Page number for pagination.
type string no Filter by media type: "image" or "video".
later.later_get_media 1 parameters
Schema command
kosmo integrations:schema later.later_get_media --json
ParameterTypeRequiredDescription
mediaId string yes The media item ID to retrieve.
later.later_get_current_user 0 parameters
Schema command
kosmo integrations:schema later.later_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.