data
Reddit CLI for Headless Automation
Use the Reddit CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
9 functions 7 read 2 write Manual OAuth token auth
Reddit 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 Reddit CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Reddit CLI for Headless Automation
kosmokrator integrations:configure reddit --set access_token="$REDDIT_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call reddit.reddit_create_comment '{"parent":"example_parent","text":"example_text"}' --json Discovery Before Execution
Agents and scripts can inspect Reddit docs and schemas before choosing a function.
kosmo integrations:docs reddit --json
kosmo integrations:docs reddit.reddit_create_comment --json
kosmo integrations:schema reddit.reddit_create_comment --json
kosmo integrations:search "Reddit" --json
kosmo integrations:list --json Useful Reddit CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
reddit.reddit_create_comment | Write | parent, text | Post a comment on a Reddit post or reply to an existing comment. The comment body supports Markdown formatting. Use "t3_" prefix for post IDs or "t1_" prefix for comment IDs as the parent. |
reddit.reddit_create_post | Write | subreddit, title, kind, text, url, nsfw, spoiler | Submit a new post to a subreddit. Supports text (self), link, image, and video post types. |
reddit.reddit_get_current_user | Read | none | Get the profile of the currently authenticated Reddit user. Useful for verifying credentials and displaying account information. |
reddit.reddit_get_post | Read | subreddit, post_id | Get details for a specific Reddit post by subreddit and post ID. Returns the post listing and its top-level comments. |
reddit.reddit_get_subreddit | Read | subreddit | Get information about a specific subreddit including subscriber count, description, and settings. |
reddit.reddit_list_comments | Read | subreddit, post_id, limit, sort, depth | List comments for a specific Reddit post. Supports sorting (best, top, new, controversial, old, q&a) and depth limiting. |
reddit.reddit_list_posts | Read | subreddit, sort, limit, after, before | List posts from a subreddit or the Reddit front page. Supports hot, new, top, rising, and controversial sorting with pagination via after/before cursors. |
reddit.reddit_list_subreddits | Read | sort, limit, after, before | List popular or new subreddits. Supports pagination with after/before cursors. |
reddit.reddit_search | Read | query, type, sort, time, limit, after | Search Reddit for posts, subreddits, or users. Supports filtering by type, sorting, and time range. Use this to find relevant content across Reddit. |
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.