pp-producthunt
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseProduct Hunt — Printing Press CLI
Product Hunt — Printing Press CLI
Prerequisites: Install the CLI
前置条件:安装CLI
This skill drives the binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
producthunt-pp-cli- Install via the Printing Press installer:
bash
npx -y @mvanhorn/printing-press install producthunt --cli-only - Verify:
producthunt-pp-cli --version - Ensure (or
$GOPATH/bin) is on$HOME/go/bin.$PATH
If the install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
npxbash
go install github.com/mvanhorn/printing-press-library/library/marketing/producthunt/cmd/producthunt-pp-cli@latestIf reports "command not found" after install, the install step did not put the binary on . Do not proceed with skill commands until verification succeeds.
--version$PATH此技能驱动二进制文件。在调用此技能的任何命令之前,您必须确认CLI已安装。如果未安装,请先执行以下步骤:
producthunt-pp-cli- 通过Printing Press安装程序安装:
bash
npx -y @mvanhorn/printing-press install producthunt --cli-only - 验证:
producthunt-pp-cli --version - 确保(或
$GOPATH/bin)已添加到$HOME/go/bin环境变量中。$PATH
如果安装失败(无Node环境、离线等),可改用Go直接安装(要求Go 1.23+版本):
npxbash
go install github.com/mvanhorn/printing-press-library/library/marketing/producthunt/cmd/producthunt-pp-cli@latest如果安装后执行提示“command not found”,说明安装步骤未将二进制文件添加到中。请在验证成功前不要执行技能命令。
--version$PATHWhen to Use This CLI
何时使用此CLI
Pick this CLI when an agent or script needs Product Hunt data — daily launch leaderboards, topic-vertical scouting, individual launch detail with comments, or aggregated trajectories that PH's own UI never exposes. The local SQLite store and GraphQL fall-through mean repeated queries stay cheap; the no-auth feed tier means the CLI is useful before the user has even configured a key. Indie founders launching this week reach for the launch-day cockpit (, , , , ); marketers doing competitive research reach for the marketer research desk (, , , ).
launch-daybenchmarktrajectoryquestionscomparecategory snapshotposts greplookalikelaunches calendar当Agent或脚本需要Product Hunt数据时选择此CLI——包括每日发布排行榜、主题垂直领域调研、带评论的单个发布详情,以及Product Hunt自身UI从未展示的聚合轨迹。本地SQLite存储和GraphQL降级机制意味着重复查询成本更低;无需认证的订阅源层级意味着用户在配置密钥前即可使用该CLI。本周发布产品的独立创始人会使用发布日控制台(、、、、);进行竞品调研的营销人员会使用营销人员研究工作台(、、、)。
launch-daybenchmarktrajectoryquestionscomparecategory snapshotposts greplookalikelaunches calendarWhen Not to Use This CLI
何时不使用此CLI
Do not activate this CLI for requests that require creating, updating, deleting, publishing, commenting, upvoting, inviting, ordering, sending messages, booking, purchasing, or changing remote state. This printed CLI exposes read-only commands for inspection, export, sync, and analysis.
请勿针对需要创建、更新、删除、发布、评论、点赞、邀请、下单、发送消息、预订、购买或修改远程状态的请求激活此CLI。该CLI仅提供用于查看、导出、同步和分析的只读命令。
Unique Capabilities
独特功能
These capabilities aren't available in any other tool for this API.
这些功能是其他同类API工具所不具备的。
Founder launch-day cockpit
创始人发布日控制台
-
— Renders your launch's votes-over-time trajectory side-by-side with today's top 5 launches — the answer to 'am I catching up to the leader.' Sync-driven, refreshes from the local store.
posts launch-dayReach for this on launch day when a maker asks 'how am I tracking vs the leaders' — the side-by-side trajectories replace ten tabs.bashproducthunt posts launch-day my-launch-slug --json -
— Reports percentile curves at hour-N for top-10 and top-50 launches in a topic, computed from accumulated local history. Tells a founder if their hour-6 votes are 'good' for their category.
posts benchmarkUse before launching to set realistic targets, or during launch to know whether a slow start is normal for the category or a real problem.bashproducthunt posts benchmark --topic artificial-intelligence --hour 6 --json -
— Plots a single launch's votes-over-time from local snapshots. Foundational for launch-day-tracker; also useful standalone for retro analysis after the fact.
posts trajectoryReach for this when reviewing a past launch or competitor — the curve shows momentum that a single end-of-day vote count hides.bashproducthunt posts trajectory my-launch-slug --json -
— Surfaces only comments that look like real questions (regex
posts questionsplus heuristic verbs like 'how does', 'what's the', 'can it'), ranked by vote count. Cuts hundreds of launch-day comments down to the ones that need a maker's reply.?Use during or after launch day to identify which comments deserve a real reply versus which are cheerleading or spam.bashproducthunt posts questions my-launch-slug --json -
— Column-aligned comparison of two or more launches: votes, comments, topics, tagline, url, launch-time delta. Replaces juggling browser tabs.
posts comparePick this when a founder is benchmarking their launch against precedents or a marketer is triangulating between similar competitive launches.bashproducthunt posts compare cursor-ide windsurf-ide claude-code --json
-
—— 将您产品的投票随时间变化轨迹与今日Top 5产品的轨迹并排展示,解答“我是否正在追赶领先者”的问题。基于同步驱动,从本地存储刷新数据。
posts launch-day发布日当创始人询问“我的表现与领先者相比如何”时使用此命令——并排轨迹可替代十个浏览器标签页。bashproducthunt posts launch-day my-launch-slug --json -
—— 根据本地累积历史数据,计算某一主题下Top 10和Top 50产品在第N小时的百分位曲线。告知创始人其第6小时的投票数在所属类别中是否“达标”。
posts benchmark发布前使用此命令设定现实目标,或发布期间判断起步缓慢是该类别的正常现象还是实际问题。bashproducthunt posts benchmark --topic artificial-intelligence --hour 6 --json -
—— 从本地快照绘制单个产品的投票随时间变化曲线。是发布日跟踪工具的基础功能,也可用于事后回顾分析。
posts trajectory回顾过往发布或竞品时使用此命令——曲线能展示单日结束时投票数无法体现的增长势头。bashproducthunt posts trajectory my-launch-slug --json -
—— 仅显示看起来是真实问题的评论(正则匹配
posts questions加上“how does”“what's the”“can it”等启发式动词),按投票数排序。将发布日的数百条评论精简为需要创始人回复的内容。?发布期间或之后使用此命令,识别哪些评论值得认真回复,哪些只是加油或垃圾信息。bashproducthunt posts questions my-launch-slug --json -
—— 对两个或多个产品进行列对齐比较:投票数、评论数、主题、标语、网址、发布时间差。替代在多个浏览器标签页间切换的操作。
posts compare当创始人对标过往发布案例,或营销人员在同类竞品发布间进行三角分析时使用此命令。bashproducthunt posts compare cursor-ide windsurf-ide claude-code --json
Marketer research desk
营销人员研究工作台
-
— Slide-deck-ready brief for a topic over a window: leaderboard + momentum delta vs prior window + most active poster handles + top emerging tagline tags.
category snapshotReach for this on weekly category-research cadence — the single-output brief replaces opening 30 launch pages by hand.bashproducthunt category snapshot --topic artificial-intelligence --window weekly --agent --select leaderboard,momentum_delta -
— Searches taglines and descriptions of launches in a window for a term — your brand, a competitor's brand, a category keyword. Returns matching launches with the matched snippet.
posts grepUse this as a recurring brand-mention monitor or to find competitive launches that name your category in their pitch.bashproducthunt posts grep --term "\\bclaude\\b" --since 7d --topic developer-tools --json -
— Given a launch slug, finds the most similar prior launches by topic overlap plus tagline FTS rank. Builds a competitive set automatically.
posts lookalikeReach for this to build a competitive set quickly or to find precedent launches when planning your own positioning.bashproducthunt posts lookalike notion --json --select edges.node.name,edges.node.tagline -
— Shows what launched what day in a week (and prior weeks for context), with hour-of-day distribution. Helps a founder pick a strong launch slot.
launches calendarUse before scheduling a launch to find a less-crowded day or hour in your topic.bashproducthunt launches calendar --topic artificial-intelligence --week 18 --json
-
—— 生成某一主题在指定时间段内的幻灯片就绪简报:排行榜+与上一时间段的动量变化+最活跃发布者账号+新兴标语标签。
category snapshot每周进行类别调研时使用此命令——单一输出简报替代手动打开30个发布页面的操作。bashproducthunt category snapshot --topic artificial-intelligence --window weekly --agent --select leaderboard,momentum_delta -
—— 在指定时间段内的产品标语和描述中搜索关键词——您的品牌、竞品品牌、类别关键词。返回匹配的产品及匹配片段。
posts grep用作定期品牌提及监控工具,或查找在宣传中提及您所在类别的竞品发布。bashproducthunt posts grep --term "\\bclaude\\b" --since 7d --topic developer-tools --json -
—— 给定产品slug,通过主题重叠度+标语全文检索排名找到最相似的过往产品。自动构建竞品集合。
posts lookalike快速构建竞品集合,或规划自身定位时查找参考发布案例使用此命令。bashproducthunt posts lookalike notion --json --select edges.node.name,edges.node.tagline -
—— 显示某一周(及之前几周作为参考)每天的发布情况,以及发布时段分布。帮助创始人选择合适的发布时段。
launches calendar安排发布前使用此命令,找到所在类别中竞争较少的日期或时段。bashproducthunt launches calendar --topic artificial-intelligence --week 18 --json
Cross-persona monitoring
跨角色监控
-
— Detects new posts crossing a vote threshold in a topic since the last sync. Synthesizes an offline subscription against an API that has none.
topics watchSchedule this in cron to alert on notable new launches in a vertical without hammering the GraphQL endpoint.bashproducthunt topics watch artificial-intelligence --min-votes 200 --json
-
—— 检测自上次同步以来某一主题中投票数超过阈值的新发布。为无订阅功能的API合成离线订阅。
topics watch在cron中调度此命令,无需频繁调用GraphQL端点即可提醒垂直领域内值得关注的新发布。bashproducthunt topics watch artificial-intelligence --min-votes 200 --json
Agent-native plumbing
Agent原生管道
-
— Local-first time-window query:
posts since,posts since 2h. Falls through to live GraphQL if the window extends past the last sync.posts since 24hReach for this from agentic flows that ask 'what's new on Product Hunt' — the local-first behavior keeps token costs low and the fall-through guarantees freshness.bashproducthunt posts since 6h --json --select edges.node.name,edges.node.votesCount -
— Returns a single JSON blob covering top posts in a window, top comments, topic followers, and your viewer status. One call answers 'what's the state of this topic right now' for an agent.
contextUse as the first call in an agentic Product Hunt workflow — one snapshot replaces 'list posts then list comments then check viewer'.bashproducthunt context --topic artificial-intelligence --since 24h --json
-
—— 本地优先的时间窗口查询:
posts since、posts since 2h。如果窗口超出上次同步范围,则降级到实时GraphQL查询。posts since 24h当Agent流程询问“Product Hunt上有什么新内容”时使用此命令——本地优先行为降低令牌成本,降级机制保证数据新鲜度。bashproducthunt posts since 6h --json --select edges.node.name,edges.node.votesCount -
—— 返回包含指定时间段内热门发布、热门评论、主题关注者和您的查看状态的单个JSON blob。一次调用即可为Agent解答“当前该主题的状态如何”。
context作为Agent的Product Hunt工作流中的第一个调用——一次快照替代“列出发布→列出评论→检查查看状态”的多步操作。bashproducthunt context --topic artificial-intelligence --since 24h --json
Command Reference
命令参考
feed — Public Atom feed of featured Product Hunt launches (no auth required)
- — Fetch the public Atom feed of recent featured launches; needs no token
producthunt-pp-cli feed
Hand-written commands
- — Get, list, and analyze Product Hunt launches via GraphQL
producthunt-pp-cli posts - — Fetch full detail for a single launch (votes, comments, topics, makers, media)
producthunt-pp-cli posts get <id-or-slug> - — List launches filtered by topic, order, featured-flag, or posted-after window
producthunt-pp-cli posts list - — List comments on a launch (commenter identities are redacted by Product Hunt)
producthunt-pp-cli posts comments <id-or-slug> - — Plot a launch's votes-over-time from local snapshots
producthunt-pp-cli posts trajectory <slug> - — Render YOUR launch's trajectory side-by-side with today's top 5 launches
producthunt-pp-cli posts launch-day <my-slug> - — Show percentile vote curves at hour-N for top-10 / top-50 launches in a topic
producthunt-pp-cli posts benchmark - — Column-aligned comparison of N launches: votes, comments, topics, tagline, url
producthunt-pp-cli posts compare <slug1> <slug2> [<slug3>...] - — Filter a launch's comments to only those that look like genuine questions
producthunt-pp-cli posts questions <slug> - — Search synced launches' taglines and descriptions for a keyword (brand-mention tracker)
producthunt-pp-cli posts grep - — Find prior launches in the same topic with similar tagline tokens (competitive set)
producthunt-pp-cli posts lookalike <slug> - — Local-first time-window query (e.g.,
producthunt-pp-cli posts since <duration>); falls through to live APIposts since 6h - — Get individual comments by id
producthunt-pp-cli comments - — Fetch a single comment by ID
producthunt-pp-cli comments get <id> - — Get and list Product Hunt curated collections
producthunt-pp-cli collections - — Fetch a single collection with its post list
producthunt-pp-cli collections get <id-or-slug> - — List collections, optionally filtered by featured-flag or by a contained post/user
producthunt-pp-cli collections list - — Get, list, and search Product Hunt topics (categories)
producthunt-pp-cli topics - — Fetch a single topic (followers count, posts count)
producthunt-pp-cli topics get <id-or-slug> - — List topics, optionally ordered by newest or popularity
producthunt-pp-cli topics list - — Search topics by name or description
producthunt-pp-cli topics search <query> - — Detect new posts crossing a vote threshold in a topic since the last sync
producthunt-pp-cli topics watch <slug> - — Get user profiles and a user's launch/voted history (non-self users redacted by Product Hunt)
producthunt-pp-cli users - — Fetch a user profile (only
producthunt-pp-cli users get <id-or-username>/yourself returns full data; non-self users return [REDACTED])whoami - — List the posts a user has made (post data is unredacted; the user identity itself may be redacted)
producthunt-pp-cli users posts <username> - — List the posts a user has voted for (same redaction caveat as users posts)
producthunt-pp-cli users voted-posts <username> - — Show the authenticated user (full data; reports remaining complexity-budget and auth mode)
producthunt-pp-cli whoami - — Marketer research desk: category-level snapshots and trends
producthunt-pp-cli category - — Slide-deck-ready brief for a topic over a window: leaderboard, momentum delta, active handles, emerging tags
producthunt-pp-cli category snapshot - — Calendar and timing analysis for launch slot picking
producthunt-pp-cli launches - — Show what launched what day in a week, with hour-of-day distribution
producthunt-pp-cli launches calendar - — Single-call agent snapshot: top posts + top comments + topic state + viewer in one JSON blob
producthunt-pp-cli context - — Today's top launches (alias for
producthunt-pp-cli today)posts list --order=RANKING --posted-after=midnight - — Most recent launches (alias for
producthunt-pp-cli recent)posts list --order=NEWEST - — Full-text search of locally synced posts
producthunt-pp-cli search <query> - — Sync the local store: posts, topics, collections, comments (cursor-based, resumable)
producthunt-pp-cli sync - — Read-only SQL against the local SQLite store
producthunt-pp-cli sql <query> - — Manage Product Hunt authentication (developer token by default, OAuth client_credentials alternate)
producthunt-pp-cli auth - — Interactive wizard: walks you through creating a free OAuth app, prefills
producthunt-pp-cli auth onboardfor the...https://localhost/callback - — Set the developer token explicitly without going through the onboarding wizard
producthunt-pp-cli auth set-token <token> - — Report which auth mode is active and what data it can access
producthunt-pp-cli auth status - — Auth-stage-aware diagnostic: tells you whether to onboard, regenerate a token, or wait for a budget reset
producthunt-pp-cli doctor
feed —— Product Hunt精选发布的公开Atom订阅源(无需认证)
- —— 获取近期精选发布的公开Atom订阅源;无需令牌
producthunt-pp-cli feed
手写命令
- —— 通过GraphQL获取、列出和分析Product Hunt发布
producthunt-pp-cli posts - —— 获取单个发布的完整详情(投票、评论、主题、创作者、媒体)
producthunt-pp-cli posts get <id-or-slug> - —— 按主题、排序方式、精选标记或发布时间窗口过滤列出发布
producthunt-pp-cli posts list - —— 列出某一发布的评论(评论者身份被Product Hunt脱敏)
producthunt-pp-cli posts comments <id-or-slug> - —— 从本地快照绘制发布的投票随时间变化曲线
producthunt-pp-cli posts trajectory <slug> - —— 将您的发布轨迹与今日Top 5发布的轨迹并排展示
producthunt-pp-cli posts launch-day <my-slug> - —— 显示某一主题下Top 10/Top 50发布在第N小时的百分位投票曲线
producthunt-pp-cli posts benchmark - —— 对N个发布进行列对齐比较:投票数、评论数、主题、标语、网址
producthunt-pp-cli posts compare <slug1> <slug2> [<slug3>...] - —— 过滤某一发布的评论,仅保留看起来是真实问题的内容
producthunt-pp-cli posts questions <slug> - —— 在已同步发布的标语和描述中搜索关键词(品牌提及跟踪器)
producthunt-pp-cli posts grep - —— 查找同一主题中标语令牌相似的过往发布(竞品集合)
producthunt-pp-cli posts lookalike <slug> - —— 本地优先的时间窗口查询(如
producthunt-pp-cli posts since <duration>);超出同步范围则使用实时APIposts since 6h - —— 通过ID获取单个评论
producthunt-pp-cli comments - —— 通过ID获取单个评论
producthunt-pp-cli comments get <id> - —— 获取和列出Product Hunt精选合集
producthunt-pp-cli collections - —— 获取包含发布列表的单个合集
producthunt-pp-cli collections get <id-or-slug> - —— 列出合集,可按精选标记或包含的发布/用户过滤
producthunt-pp-cli collections list - —— 获取、列出和搜索Product Hunt主题(类别)
producthunt-pp-cli topics - —— 获取单个主题(关注者数量、发布数量)
producthunt-pp-cli topics get <id-or-slug> - —— 列出主题,可按最新或热度排序
producthunt-pp-cli topics list - —— 按名称或描述搜索主题
producthunt-pp-cli topics search <query> - —— 检测自上次同步以来某一主题中投票数超过阈值的新发布
producthunt-pp-cli topics watch <slug> - —— 获取用户资料和用户的发布/投票历史(非自身用户被Product Hunt脱敏)
producthunt-pp-cli users - —— 获取用户资料(仅
producthunt-pp-cli users get <id-or-username>/自身返回完整数据;非自身用户返回[REDACTED])whoami - —— 列出用户发布的内容(发布数据未脱敏;用户身份本身可能被脱敏)
producthunt-pp-cli users posts <username> - —— 列出用户投票的内容(与users posts的脱敏规则相同)
producthunt-pp-cli users voted-posts <username> - —— 显示已认证用户(完整数据;报告剩余复杂度预算和认证模式)
producthunt-pp-cli whoami - —— 营销人员研究工作台:类别级快照和趋势
producthunt-pp-cli category - —— 某一主题在指定时间段内的幻灯片就绪简报:排行榜、动量变化、活跃账号、新兴标签
producthunt-pp-cli category snapshot - —— 用于选择发布时段的日历和时间分析
producthunt-pp-cli launches - —— 显示某一周每天的发布情况及发布时段分布
producthunt-pp-cli launches calendar - —— 单次调用的Agent快照:热门发布+热门评论+主题状态+查看者信息整合为一个JSON blob
producthunt-pp-cli context - —— 今日热门发布(
producthunt-pp-cli today的别名)posts list --order=RANKING --posted-after=midnight - —— 最新发布(
producthunt-pp-cli recent的别名)posts list --order=NEWEST - —— 对本地同步的发布进行全文搜索
producthunt-pp-cli search <query> - —— 同步本地存储:发布、主题、合集、评论(基于游标,可恢复)
producthunt-pp-cli sync - —— 对本地SQLite存储执行只读SQL查询
producthunt-pp-cli sql <query> - —— 管理Product Hunt认证(默认使用开发者令牌,可选OAuth client_credentials模式)
producthunt-pp-cli auth - —— 交互式向导:引导您创建免费OAuth应用,预填充
producthunt-pp-cli auth onboard作为...https://localhost/callback - —— 直接设置开发者令牌,无需通过入门向导
producthunt-pp-cli auth set-token <token> - —— 报告当前激活的认证模式及其可访问的数据
producthunt-pp-cli auth status - —— 感知认证阶段的诊断工具:告知您是否需要入门、重新生成令牌或等待预算重置
producthunt-pp-cli doctor
Finding the right command
查找合适的命令
When you know what you want to do but not which command does it, ask the CLI directly:
bash
producthunt-pp-cli which "<capability in your own words>"which02--help当您知道要做什么但不知道对应命令时,可直接询问CLI:
bash
producthunt-pp-cli which "<用您自己的话描述功能>"which02--helpRecipes
使用示例
Launch-day cockpit for your own launch
您自己产品的发布日控制台
bash
producthunt posts launch-day my-launch-slug --jsonRenders your launch's vote trajectory side-by-side with today's top 5 — the answer to 'am I catching up to the leader' without refreshing the website
bash
producthunt posts launch-day my-launch-slug --json将您产品的投票轨迹与今日Top 5产品的轨迹并排展示——无需刷新网站即可解答“我是否正在追赶领先者”的问题
Triage a launch's comments to genuine questions
筛选发布评论中的真实问题
bash
producthunt posts questions my-launch-slug --jsonFilters synced comments to only those that look like real questions (regex plus question-verbs) ranked by vote count — replaces scrolling 200 comments to find the 5 that deserve a reply
\\?bash
producthunt posts questions my-launch-slug --json将已同步的评论筛选为仅包含看起来是真实问题的内容(正则匹配加上疑问动词),按投票数排序——替代滚动200条评论寻找5条需要回复的内容
\\?Narrow a deeply nested response with --agent --select
使用--agent --select精简深层嵌套响应
bash
producthunt posts list --topic artificial-intelligence --posted-after 2026-04-01 --agent --select edges.node.name,edges.node.votesCount,edges.node.user.usernamePosts list responses are deeply nested (edges -> node -> user); pairing with dotted paths keeps the output to just the columns the agent needs and slashes token cost
--agent--selectbash
producthunt posts list --topic artificial-intelligence --posted-after 2026-04-01 --agent --select edges.node.name,edges.node.votesCount,edges.node.user.username发布列表响应是深层嵌套的(edges -> node -> user);将与点式路径结合,可将输出限制为Agent所需的列,大幅降低令牌成本
--agent--selectWeekly category brief for marketing
面向营销的每周类别简报
bash
producthunt category snapshot --topic developer-tools --window weekly --jsonSingle-output brief: leaderboard for the week, momentum delta vs prior week, most active poster handles, top emerging tagline tags — slide-deck-ready
bash
producthunt category snapshot --topic developer-tools --window weekly --json单一输出简报:本周排行榜、与上周的动量变化、最活跃发布者账号、新兴标语标签——可直接用于幻灯片
Brand-mention monitor
品牌提及监控
bash
producthunt posts grep --term "\\bclaude\\b|\\banthropic\\b" --since 7d --jsonFinds any launch in the window with or in tagline or description — schedule it nightly to catch competitive activity
claudeanthropicbash
producthunt posts grep --term "\\bclaude\\b|\\banthropic\\b" --since 7d --json查找指定时间段内标语或描述中包含或的发布——可每晚调度以捕获竞品动态
claudeanthropicAuth Setup
认证设置
Product Hunt's GraphQL API supports two auth modes; the CLI handles both. Recommended for personal use: visit https://www.producthunt.com/v2/oauth/applications, create an application (the redirect URL field is required by the form but unused for personal-token flow — set it to ), then scroll to the bottom of the app page and click to generate a developer token that never expires. Set or run for an interactive walkthrough. For CI/automation, the alternate mode is OAuth : set and from the same app page; the CLI exchanges them for an access token internally and refreshes on 401 (note: under OAuth client_credentials, the command returns null because the public scope has no user context). The public Atom feed () needs no token at all.
https://localhost/callbackCreate TokenPRODUCT_HUNT_TOKEN=<your-token>producthunt auth onboardclient_credentialsPRODUCT_HUNT_CLIENT_IDPRODUCT_HUNT_CLIENT_SECRETwhoamiproducthunt feedRun to verify setup.
producthunt-pp-cli doctorProduct Hunt的GraphQL API支持两种认证模式;CLI均可处理。个人使用推荐:访问https://www.producthunt.com/v2/oauth/applications,创建一个应用(表单要求填写重定向URL,但个人令牌流程中无需使用——设置为`https://localhost/callback`即可),然后滚动到应用页面底部,点击`Create TokenPRODUCT_HUNT_TOKEN=<您的令牌>producthunt auth onboardclient_credentialsPRODUCT_HUNT_CLIENT_IDPRODUCT_HUNT_CLIENT_SECRETwhoamiproducthunt feed`)完全无需令牌。
生成永不失效的开发者令牌。设置或运行进行交互式引导。对于CI/自动化场景,可选模式为OAuth :从同一应用页面设置和;CLI会在内部交换获取访问令牌,并在401错误时刷新(注意:在OAuth client_credentials模式下,命令返回null,因为公共范围无用户上下文)。公开Atom订阅源(运行验证设置。
producthunt-pp-cli doctorAgent Mode
Agent模式
Add to any command. Expands to: .
--agent--json --compact --no-input --no-color --yes-
Pipeable — JSON on stdout, errors on stderr
-
Filterable —keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
--selectbashproducthunt-pp-cli feed --agent --select id,name,status -
Previewable —shows the request without sending
--dry-run -
Offline-friendly — sync/search commands can use the local SQLite store when available
-
Non-interactive — never prompts, every input is a flag
-
Read-only — do not use this CLI for create, update, delete, publish, comment, upvote, invite, order, send, or other mutating requests
在任何命令后添加。等效于:。
--agent--json --compact --no-input --no-color --yes-
可管道化 —— 标准输出为JSON,错误输出到标准错误
-
可过滤 ——保留字段子集。点式路径可深入嵌套结构;数组可遍历元素。对于冗长API,这是保持上下文精简的关键:
--selectbashproducthunt-pp-cli feed --agent --select id,name,status -
可预览 ——显示请求但不发送
--dry-run -
离线友好 —— 同步/搜索命令可在可用时使用本地SQLite存储
-
非交互式 —— 从不提示,所有输入均为标志
-
只读 —— 请勿使用此CLI执行创建、更新、删除、发布、评论、点赞、邀请、下单、发送或其他变更请求
Response envelope
响应信封
Commands that read from the local store or the API wrap output in a provenance envelope:
json
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}Parse for data and to know whether it's live or local. A human-readable summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
.results.meta.sourceN results (live)从本地存储或API读取数据的命令会将输出包装在来源信封中:
json
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}解析获取数据,可了解数据是实时还是本地的。仅当标准输出为终端时,才会将人类可读的摘要打印到标准错误——管道/Agent消费者仅在标准输出获取纯JSON。
.results.meta.sourceN results (live)Agent Feedback
Agent反馈
When you (or the agent) notice something off about this CLI, record it:
producthunt-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
producthunt-pp-cli feedback --stdin < notes.txt
producthunt-pp-cli feedback list --json --limit 10Entries are stored locally at . They are never POSTed unless is set AND either is passed or . Default behavior is local-only.
~/.producthunt-pp-cli/feedback.jsonlPRODUCTHUNT_FEEDBACK_ENDPOINT--sendPRODUCTHUNT_FEEDBACK_AUTO_SEND=trueWrite what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当您(或Agent)发现此CLI存在问题时,请记录:
producthunt-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
producthunt-pp-cli feedback --stdin < notes.txt
producthunt-pp-cli feedback list --json --limit 10反馈条目存储在本地中。除非设置了且传递了或设置,否则绝不会POST到外部。默认行为仅本地存储。
~/.producthunt-pp-cli/feedback.jsonlPRODUCTHUNT_FEEDBACK_ENDPOINT--sendPRODUCTHUNT_FEEDBACK_AUTO_SEND=true请写出让您感到意外的内容,而非错误报告。简短、具体、单行:这才是有价值的部分。
Output Delivery
输出交付
Every command accepts . The output goes to the named sink in addition to (or instead of) stdout, so agents can route command results without hand-piping. Three sinks are supported:
--deliver <sink>| Sink | Effect |
|---|---|
| Default; write to stdout only |
| Atomically write output to |
| POST the output body to the URL ( |
Unknown schemes are refused with a structured error naming the supported set. Webhook failures return non-zero and log the URL + HTTP status on stderr.
每个命令均接受。输出会发送到指定接收器,同时(或替代)输出到标准输出,因此Agent无需手动管道即可路由命令结果。支持三种接收器:
--deliver <sink>| 接收器 | 效果 |
|---|---|
| 默认;仅写入标准输出 |
| 原子性地将输出写入 |
| 将输出主体POST到指定URL( |
未知方案会被拒绝,并返回包含支持方案的结构化错误。Webhook失败时返回非零退出码,并在标准错误中记录URL+HTTP状态。
Named Profiles
命名配置文件
A profile is a saved set of flag values, reused across invocations. Use it when a scheduled agent calls the same command every run with the same configuration - HeyGen's "Beacon" pattern.
producthunt-pp-cli profile save briefing --json
producthunt-pp-cli --profile briefing feed
producthunt-pp-cli profile list --json
producthunt-pp-cli profile show briefing
producthunt-pp-cli profile delete briefing --yesExplicit flags always win over profile values; profile values win over defaults. lists all available profiles under so introspecting agents discover them at runtime.
agent-contextavailable_profiles配置文件是一组保存的标志值,可在多次调用中复用。当调度Agent每次运行都使用相同配置调用同一命令时使用——即HeyGen的“Beacon”模式。
producthunt-pp-cli profile save briefing --json
producthunt-pp-cli --profile briefing feed
producthunt-pp-cli profile list --json
producthunt-pp-cli profile show briefing
producthunt-pp-cli profile delete briefing --yes显式标志始终优先于配置文件值;配置文件值优先于默认值。会在下列出所有可用配置文件,以便自省Agent在运行时发现它们。
agent-contextavailable_profilesExit Codes
退出码
| Code | Meaning |
|---|---|
| 0 | Success |
| 2 | Usage error (wrong arguments) |
| 3 | Resource not found |
| 4 | Authentication required |
| 5 | API error (upstream issue) |
| 7 | Rate limited (wait and retry) |
| 10 | Config error |
| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 2 | 使用错误(参数错误) |
| 3 | 资源未找到 |
| 4 | 需要认证 |
| 5 | API错误(上游问题) |
| 7 | 速率限制(等待并重试) |
| 10 | 配置错误 |
Argument Parsing
参数解析
Parse :
$ARGUMENTS- Empty, , or
help→ show--helpoutputproducthunt-pp-cli --help - Starts with → ends with
install→ MCP installation; otherwise → see Prerequisites abovemcp - Anything else → Direct Use (execute as CLI command with )
--agent
解析:
$ARGUMENTS- 为空、或
help→ 显示--help输出producthunt-pp-cli --help - 以开头 → 以
install结尾 → MCP安装;否则 → 参见顶部的前置条件mcp - 其他情况 → 直接使用(以标志执行CLI命令)
--agent
MCP Server Installation
MCP服务器安装
- Install the MCP server:
bash
go install github.com/mvanhorn/printing-press-library/library/marketing/producthunt/cmd/producthunt-pp-mcp@latest - Register with Claude Code:
bash
claude mcp add producthunt-pp-mcp -- producthunt-pp-mcp - Verify:
claude mcp list
- 安装MCP服务器:
bash
go install github.com/mvanhorn/printing-press-library/library/marketing/producthunt/cmd/producthunt-pp-mcp@latest - 注册到Claude Code:
bash
claude mcp add producthunt-pp-mcp -- producthunt-pp-mcp - 验证:
claude mcp list
Direct Use
直接使用
- Check if installed: If not found, offer to install (see Prerequisites at the top of this skill).
which producthunt-pp-cli - Match the user query to the best command from the Unique Capabilities and Command Reference above.
- Execute with the flag:
--agentbashproducthunt-pp-cli <command> [subcommand] [args] --agent - If ambiguous, drill into subcommand help: .
producthunt-pp-cli <command> --help
- 检查是否安装:如果未找到,提供安装选项(参见顶部的前置条件)。
which producthunt-pp-cli - 将用户查询与上述独特功能和命令参考中的最佳命令匹配。
- 使用标志执行:
--agentbashproducthunt-pp-cli <command> [subcommand] [args] --agent - 如果存在歧义,查看子命令帮助:。
producthunt-pp-cli <command> --help