KosmoKrator

marketing

Instagram CLI for Headless Automation

Use the Instagram CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 6 read 1 write Manual OAuth token auth

Instagram CLI for Headless Automation

Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.

Use headless automation when another tool needs a stable local command surface. The Instagram CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Instagram CLI for Headless Automation
kosmokrator integrations:configure instagram --set access_token="$INSTAGRAM_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call instagram.instagram_list_media '{"limit":1,"after":"example_after","before":"example_before","fields":"example_fields"}' --json

Discovery Before Execution

Agents and scripts can inspect Instagram docs and schemas before choosing a function.

kosmo integrations:docs instagram --json
kosmo integrations:docs instagram.instagram_list_media --json
kosmo integrations:schema instagram.instagram_list_media --json
kosmo integrations:search "Instagram" --json
kosmo integrations:list --json

Useful Instagram CLI Functions

FunctionTypeParametersDescription
instagram.instagram_list_media Read limit, after, before, fields List media published by the authenticated Instagram user. Returns media IDs, captions, types, URLs, and timestamps. Supports cursor-based pagination.
instagram.instagram_get_media Read mediaId, fields Get details of a specific Instagram media item by its ID. Returns caption, media type, URL, timestamp, like count, and comment count.
instagram.instagram_create_media Write imageUrl, caption, mediaType, publish Publish a new media item (photo or video) to Instagram. Provide the media URL and an optional caption. The media is published immediately unless publish is set to false.
instagram.instagram_list_comments Read mediaId, limit, after List comments on a specific Instagram media item. Returns comment IDs, text, timestamps, usernames, and like counts. Supports pagination.
instagram.instagram_get_comment Read commentId Get details of a specific Instagram comment by its ID. Returns the comment text, timestamp, username, and like count.
instagram.instagram_list_insights Read metric, period, since, until Get account-level insights and performance metrics for the authenticated Instagram user. Supports metrics like impressions, reach, follower count, and profile views with configurable time periods.
instagram.instagram_get_current_user Read none Get the currently authenticated Instagram user profile. Returns user ID, username, name, account type, media count, and follower/following counts.

Automation Notes

Related Instagram CLI Pages