marketing
Instagram CLI for Cron Jobs
Use the Instagram CLI for cron jobs with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Manual OAuth token auth
Instagram CLI for Cron Jobs
Schedule repeatable integration workflows from cron while keeping credentials in KosmoKrator config.
Use the headless CLI from cron when an operation should run without an interactive agent session. 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 Cron Jobs
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
| Function | Type | Parameters | Description |
|---|---|---|---|
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
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.