data
Hacker News CLI for Headless Automation
Use the Hacker News CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
5 functions 5 read 0 write No credentials auth
Hacker News 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 Hacker News CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Hacker News CLI for Headless Automation
kosmokrator integrations:configure hackernews --enable --read allow --write ask --json
kosmo integrations:call hackernews.hackernews_get_item '{"id":1}' --json Discovery Before Execution
Agents and scripts can inspect Hacker News docs and schemas before choosing a function.
kosmo integrations:docs hackernews --json
kosmo integrations:docs hackernews.hackernews_get_item --json
kosmo integrations:schema hackernews.hackernews_get_item --json
kosmo integrations:search "Hacker News" --json
kosmo integrations:list --json Useful Hacker News CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
hackernews.hackernews_get_item | Read | id | Fetch a Hacker News item (story, comment, job, poll, or poll option) by its numeric ID. Returns all available fields: title, URL, text, author (by), score, time, descendants, and kids (child comment IDs). Use this to look up any HN item when you know its ID. |
hackernews.hackernews_get_user | Read | id | Fetch a Hacker News user profile by username. Returns karma score, about text, account creation date, and lists of submitted item IDs (submissions) and comment IDs. |
hackernews.hackernews_list_top_stories | Read | limit | Fetch the current top stories from Hacker News. Returns up to N stories with full item data (title, URL, score, author, comment count). The "top" list is ranked by the HN algorithm (a combination of score, recency, and flags). |
hackernews.hackernews_list_new_stories | Read | limit | Fetch the newest stories from Hacker News. Returns up to N stories with full item data (title, URL, score, author, comment count). These are the most recently submitted stories, not yet ranked by the HN algorithm. |
hackernews.hackernews_list_best_stories | Read | limit | Fetch the highest-scoring (best) stories from Hacker News. Returns up to N stories with full item data (title, URL, score, author, comment count). These are the stories with the highest scores, regardless of age. |
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.