pp-redfin

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Redfin — Printing Press CLI

Redfin — Printing Press CLI

Prerequisites: Install the CLI

前提条件:安装CLI

This skill drives the
redfin-pp-cli
binary. You must verify the CLI is installed before invoking any command from this skill. If it is missing, install it first:
  1. Install via the Printing Press installer:
    bash
    npx -y @mvanhorn/printing-press install redfin --cli-only
  2. Verify:
    redfin-pp-cli --version
  3. Ensure
    $GOPATH/bin
    (or
    $HOME/go/bin
    ) is on
    $PATH
    .
If the
npx
install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.23+):
bash
go install github.com/mvanhorn/printing-press-library/library/other/redfin/cmd/redfin-pp-cli@latest
If
--version
reports "command not found" after install, the install step did not put the binary on
$PATH
. Do not proceed with skill commands until verification succeeds.
Search homes for sale via Redfin's internal Stingray endpoints from the terminal, sync results to a local SQLite store, and run the workflows the website never built: diff a saved search week-over-week with
watch
, rank by $/sqft net of HOA with
rank
, pull sold comps for a subject property with
comps
, surface price drops or stale listings with
drops
, and overlay market trends across multiple cities with
trends
. Every command is
--json
/
--select
-shaped so an agent can pipe the output without burning context.
本Skill驱动
redfin-pp-cli
二进制文件。在调用本Skill的任何命令之前,您必须确认CLI已安装。 如果未安装,请先执行以下步骤:
  1. 通过Printing Press安装程序安装:
    bash
    npx -y @mvanhorn/printing-press install redfin --cli-only
  2. 验证安装:
    redfin-pp-cli --version
  3. 确保
    $GOPATH/bin
    (或
    $HOME/go/bin
    )已添加到
    $PATH
    环境变量中。
如果
npx
安装失败(如无Node环境、离线等),可改用Go直接安装(要求Go 1.23及以上版本):
bash
go install github.com/mvanhorn/printing-press-library/library/other/redfin/cmd/redfin-pp-cli@latest
如果安装后执行
--version
提示"command not found",说明安装程序未将二进制文件添加到
$PATH
中。请在验证成功前不要执行Skill命令。
在终端通过Redfin内部Stingray端点搜索在售房源,将结果同步到本地SQLite存储,并运行官网未提供的工作流:使用
watch
命令对比已保存搜索的周度差异,使用
rank
命令按扣除HOA费用后的每平方英尺价格排名,使用
comps
命令获取目标房产的已售出可比房源,使用
drops
命令筛选降价或挂牌时间较长的房源,使用
trends
命令叠加多个城市的市场趋势。所有命令均支持
--json
/
--select
格式,Agent无需消耗上下文即可直接管道输出结果。

When to Use This CLI

何时使用本CLI

Use this CLI when an agent or human needs structured Redfin data and needs the workflows the website itself doesn't expose: cross-region diffs over time, $/sqft rankings net of HOA, sold-comp recipes for a subject property, market-trends overlays across cities, and digest-style summaries. Reach for it for buyer comparison-shopping, investor screening across multiple zips, relocator city comparisons, and buyer's-agent comp pulls. Skip it for one-off browsing — the redfin.com website is fine for that.
当Agent或用户需要结构化的Redfin数据,且需要官网未公开的工作流时使用本CLI:跨区域时间差异对比、扣除HOA费用后的每平方英尺价格排名、目标房产的已售出可比房源分析、多城市市场趋势叠加,以及摘要式汇总。适用于买家对比选房、投资者跨多个邮编筛选、迁居者城市对比,以及买方经纪人获取可比房源。仅需单次浏览时无需使用——redfin.com官网足以满足需求。

When 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工具所不具备的。

Time-series intelligence

时间序列智能

  • watch
    — Re-run a saved gis search and surface what's NEW, REMOVED, PRICE-CHANGED, or STATUS-CHANGED since the last sync.
    Pick this when an agent is tracking a buyer's shortlist over time and needs a reproducible 'what changed' digest.
    bash
    redfin-pp-cli watch austin-3br --since 7d --json
  • drops
    — List active listings whose price dropped by N% in a window, OR whose days-on-market exceed a threshold.
    Pick this when timing the market or surfacing lowball candidates before tour scheduling.
    bash
    redfin-pp-cli drops --region-id 30772 --region-type 6 --since 7d --min-pct 3 --dom-min 30 --json
  • watch
    — 重新运行已保存的地理信息搜索,展示自上次同步以来新增、移除、价格变动或状态变更的房源。
    当Agent需要跟踪买家候选房源列表的变化,且需要可复现的"变更内容"摘要时使用此命令。
    bash
    redfin-pp-cli watch austin-3br --since 7d --json
  • drops
    — 列出在指定时间段内价格下跌N%,或挂牌天数超过阈值的活跃房源。
    当需要把握市场时机,或在安排看房前筛选低价候选房源时使用此命令。
    bash
    redfin-pp-cli drops --region-id 30772 --region-type 6 --since 7d --min-pct 3 --dom-min 30 --json

Local-store math

本地存储运算

  • rank
    — Rank synced listings by price-per-sqft, with optional HOA-fee subtraction over a 5-year horizon.
    Pick this when value-per-dollar is the goal and HOA-heavy condos must compete fairly against single-family.
    bash
    redfin-pp-cli rank --by price-per-sqft --net-hoa --region-id 30772 --region-type 6 --json --limit 25
  • rank
    — 按每平方英尺价格对同步后的房源进行排名,可选择扣除5年周期内的HOA费用。
    当以性价比为目标,且需要让HOA费用较高的公寓与独栋住宅公平竞争时使用此命令。
    bash
    redfin-pp-cli rank --by price-per-sqft --net-hoa --region-id 30772 --region-type 6 --json --limit 25

Shortlist workflows

候选房源工作流

  • compare
    — Pull 2-8 listings through the combined Stingray detail endpoint and emit aligned columnar output (price, $/sqft, beds, baths, lot, year, schools, AVM delta, last sale, taxes).
    Pick this when narrowing a shortlist; the wide table makes school-rating and AVM-delta differences obvious.
    bash
    redfin-pp-cli compare <your-listing-url> <another-listing-url> --json
  • comps
    — For a subject listing, derive a circular polygon from --radius, run a sold-status search, filter by --sqft-tol and --bed-match, return the ranked comp set.
    Pick this when an agent needs to pull comparable sales for a buyer offer; collapses 20 minutes of polygon-clicking into one command.
    bash
    redfin-pp-cli comps <your-listing-url> --radius 0.5 --sqft-tol 15 --months 6 --bed-match --json
  • compare
    — 通过Stingray详情端点获取2-8个房源的信息,并输出对齐的列格式数据(价格、每平方英尺价格、卧室数、浴室数、占地面积、建造年份、学校评分、AVM差值、上次售价、税费)。
    当需要缩小候选房源范围时使用此命令;宽表格式可清晰展示学校评分和AVM差值的差异。
    bash
    redfin-pp-cli compare <your-listing-url> <another-listing-url> --json
  • comps
    — 针对目标房源,根据
    --radius
    参数生成圆形区域,搜索已售出房源,按
    --sqft-tol
    --bed-match
    筛选,返回排名后的可比房源集合。
    当Agent需要为买家报价获取可比房源时使用此命令;可将20分钟的区域点击操作简化为一条命令。
    bash
    redfin-pp-cli comps <your-listing-url> --radius 0.5 --sqft-tol 15 --months 6 --bed-match --json

Cross-market joins

跨市场联合

  • rank
    — Union synced listings across multiple region slugs and rank across the entire set, deduped by listing URL.
    Pick this when an agent needs a single ranked feed across multiple metros without writing a fan-out loop.
    bash
    redfin-pp-cli rank --regions 30772,30773,30774 --by price-per-sqft --beds-min 3 --price-max 600000 --json --limit 25
  • trends
    — Pull aggregate-trends for N regions and emit one tidy long table (region × month × metric) over a window.
    Pick this when a relocator is comparing cities and needs the medians overlaid on the same axis.
    bash
    redfin-pp-cli trends --regions 30743,18028,30739 --metric median-sale --period 24 --json
  • rank
    — 合并多个区域别名下的同步房源,并对整个集合进行排名,按房源URL去重。
    当Agent需要跨多个都市圈的统一排名结果,且无需编写循环逻辑时使用此命令。
    bash
    redfin-pp-cli rank --regions 30772,30773,30774 --by price-per-sqft --beds-min 3 --price-max 600000 --json --limit 25
  • trends
    — 获取N个区域的聚合趋势,输出整洁的长表(区域×月份×指标)。
    当迁居者需要对比城市,且需要在同一轴线上展示中位数数据时使用此命令。
    bash
    redfin-pp-cli trends --regions 30743,18028,30739 --metric median-sale --period 24 --json

Bulk extraction

批量提取

  • export
    — Slice the price space into bands, page-walk gis-csv per band until each returns under 350 rows, dedupe on listing URL, emit one CSV/JSON.
    Pick this when you need every comp for a year, not the first 350 sorted by relevance.
    bash
    redfin-pp-cli export --region-slug "city/30772/TX/Austin" --status sold --year 2024 --csv > austin-sold-2024.csv
  • export
    — 将价格区间划分为多个波段,按波段遍历gis-csv直到每个波段返回结果少于350条,按房源URL去重,输出单个CSV/JSON文件。
    当需要获取一整年的所有可比房源,而非按相关性排序的前350条时使用此命令。
    bash
    redfin-pp-cli export --region-slug "city/30772/TX/Austin" --status sold --year 2024 --csv > austin-sold-2024.csv

Aggregations

聚合分析

  • summary
    — Single command: active count, pending count, sold-90d count, median list, median sold, median DOM, median $/sqft, % with price drops, plus a trends snapshot.
    Pick this when an agent needs the one-shot snapshot of a market for a buyer brief.
    bash
    redfin-pp-cli summary 30772:6 --json
  • appreciation
    — For all child neighborhoods under a parent metro, call aggregate-trends and rank by YoY median-sale % change.
    Pick this when a relocator or investor needs the 'where in this metro is hottest' answer.
    bash
    redfin-pp-cli appreciation --parent "city/30772/TX/Austin" --period 12 --json --limit 10
  • summary
    — 一键获取:活跃房源数、待售房源数、90天内已售房源数、挂牌价中位数、售价中位数、挂牌天数中位数、每平方英尺价格中位数、降价房源占比,以及趋势快照。
    当Agent需要为买家简报提供市场快照时使用此命令。
    bash
    redfin-pp-cli summary 30772:6 --json
  • appreciation
    — 针对母都市圈下的所有子社区,调用聚合趋势接口,按年度中位数售价变化百分比排名。
    当迁居者或投资者需要了解"都市圈内哪个区域最热门"时使用此命令。
    bash
    redfin-pp-cli appreciation --parent "city/30772/TX/Austin" --period 12 --json --limit 10

HTTP Transport

HTTP传输

This CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.
本CLI使用兼容Chrome的HTTP传输协议访问面向浏览器的端点。正常API调用无需常驻浏览器进程。

Discovery Signals

发现信号

This CLI was generated with browser-observed traffic context.
  • Capture coverage: 0 API entries from 0 total network entries
  • Protocols: stingray-json-api (95% confidence)
  • Generation hints: Strip the {}&& CSRF prefix from every Stingray JSON response before decoding, Use Surf with Chrome TLS fingerprint at runtime (UsesBrowserHTTPTransport), Conservative rate limit: 1 req/s default with adaptive backoff on 429, Stingray is geo-restricted to US IPs; doctor command should warn non-US users, Region IDs are visible in redfin.com URL paths (e.g., /city/30772/TX/Austin); region type 6=city, 1=zip, 11=neighborhood
  • Candidate command ideas: homes — Stingray gis search is the primary entry point; listing — Listing detail composes initialInfo + aboveTheFold + belowTheFold; market — aggregate-trends endpoint exposes neighborhood medians
  • Caveats: csrf-prefix: Stingray JSON responses are prefixed with the literal bytes '{}&&' as CSRF prevention. Generated client must strip them before json.Unmarshal.; geo-restricted: Stingray endpoints are US-only. Non-US callers will get 403 regardless of TLS fingerprint.
本CLI基于浏览器捕获的流量上下文生成。
  • 捕获覆盖范围:0个API条目,共0个网络条目
  • 协议:stingray-json-api(95%置信度)
  • 生成提示:解码前需移除每个Stingray JSON响应中的{}&& CSRF前缀;运行时使用带有Chrome TLS指纹的Surf(UsesBrowserHTTPTransport);默认保守速率限制:1请求/秒,遇到429响应时自适应退避;Stingray仅限美国IP访问;doctor命令应向非美国用户发出警告;区域ID可在redfin.com URL路径中找到(例如:/city/30772/TX/Austin);区域类型6=城市,1=邮编,11=社区
  • 候选命令构想:homes — Stingray地理信息搜索是主要入口;listing — 房源详情整合initialInfo + aboveTheFold + belowTheFold;market — 聚合趋势端点暴露社区中位数数据
  • 注意事项:csrf前缀:Stingray JSON响应前缀为字面字节'{}&&'以防止CSRF。生成的客户端必须在json.Unmarshal前移除该前缀;地域限制:Stingray端点仅限美国使用。非美国调用者无论TLS指纹如何都会收到403响应。

Command Reference

命令参考

homes — Search Redfin homes for sale via the internal Stingray /api/gis JSON endpoint.
  • redfin-pp-cli homes
    — Run a Stingray gis search and return parsed listing rows from the JSON map payload. Strip the {}&& CSRF prefix...
listing — Fetch full listing detail by combining initialInfo, aboveTheFold, and belowTheFold Stingray calls.
  • redfin-pp-cli listing
    — First Stingray call for a listing — returns the canonical listingId and propertyId from the URL path.
market — Aggregate market trends for a region (median sale price, days on market, supply, list-to-sale ratio) over a window.
  • redfin-pp-cli market
    — Fetch aggregate-trends JSON for one region and period (months).
Hand-written commands
  • redfin-pp-cli homes
    — Search Redfin for-sale homes by city, beds, baths, price, etc.
  • redfin-pp-cli sold
    — Search Redfin sold homes by city + filters (delegates to homes with status=sold).
  • redfin-pp-cli listing <url-or-path>
    — Fetch full listing detail (initialInfo + aboveTheFold + belowTheFold combined).
  • redfin-pp-cli region
    — Region tools: resolve a city/zip to a Redfin region_id.
  • redfin-pp-cli feed
    — Tail Redfin's RSS feeds: new listings, updated listings.
  • redfin-pp-cli sync-search <saved-search>
    — Run a saved search and snapshot results into the local store.
  • redfin-pp-cli watch <saved-search>
    — Diff the latest sync against the previous: NEW / REMOVED / PRICE-CHANGED / STATUS-CHANGED listings.
  • redfin-pp-cli rank
    — Rank synced listings by ratio metrics — $/sqft (optionally net of HOA), $/bed.
  • redfin-pp-cli compare <url-or-id...>
    — Pivot 2-8 listings into a wide table — one column per listing — with $/sqft, AVM delta, school ratings.
  • redfin-pp-cli comps <subject-url>
    — Pull sold comps for a subject listing within a radius, sqft tolerance, and recency window.
  • redfin-pp-cli drops
    — List active listings whose price dropped by N% in a window OR whose DOM exceeds a threshold.
  • redfin-pp-cli market <region-slug>
    — Single-region snapshot: counts, medians, DOM, % drops, plus trends call.
  • redfin-pp-cli summary <region-slug>
    — Neighborhood market summary: active/pending/sold-90d counts, medians, DOM, % drops.
  • redfin-pp-cli trends
    — Multi-region aggregate-trends overlay; emits tidy table (region × month × metric).
  • redfin-pp-cli appreciation
    — Rank child neighborhoods under a metro by YoY median-sale % change.
  • redfin-pp-cli export
    — Bulk export past Redfin's 350-row gis-csv cap by slicing price bands and deduping on URL.
homes — 通过内部Stingray /api/gis JSON端点搜索Redfin在售房源。
  • redfin-pp-cli homes
    — 运行Stingray地理信息搜索,从JSON映射负载中返回解析后的房源行数据。移除{}&& CSRF前缀...
listing — 结合initialInfo、aboveTheFold和belowTheFold的Stingray调用,获取完整房源详情。
  • redfin-pp-cli listing
    — 首次调用Stingray获取房源信息——从URL路径中返回标准的listingId和propertyId。
market — 获取指定区域的聚合市场趋势(售价中位数、挂牌天数、供应量、挂牌价与售价比率)。
  • redfin-pp-cli market
    — 获取单个区域指定时间段(月份)的聚合趋势JSON数据。
手写命令
  • redfin-pp-cli homes
    — 按城市、卧室数、浴室数、价格等条件搜索Redfin在售房源。
  • redfin-pp-cli sold
    — 按城市和筛选条件搜索Redfin已售房源(委托给homes命令,设置status=sold)。
  • redfin-pp-cli listing <url-or-path>
    — 获取完整房源详情(整合initialInfo + aboveTheFold + belowTheFold)。
  • redfin-pp-cli region
    — 区域工具:将城市/邮编解析为Redfin region_id。
  • redfin-pp-cli feed
    — 跟踪Redfin的RSS订阅:新增房源、更新房源。
  • redfin-pp-cli sync-search <saved-search>
    — 运行已保存的搜索并将结果快照到本地存储。
  • redfin-pp-cli watch <saved-search>
    — 对比最新同步结果与之前的结果:新增/移除/价格变动/状态变更的房源。
  • redfin-pp-cli rank
    — 按比率指标对同步后的房源排名——每平方英尺价格(可选扣除HOA费用)、每卧室价格。
  • redfin-pp-cli compare <url-or-id...>
    — 将2-8个房源转换为宽表——每个房源一列,包含每平方英尺价格、AVM差值、学校评分。
  • redfin-pp-cli comps <subject-url>
    — 在指定半径、面积公差和时间范围内,获取目标房源的已售出可比房源。
  • redfin-pp-cli drops
    — 列出在指定时间段内价格下跌N%或挂牌天数超过阈值的活跃房源。
  • redfin-pp-cli market <region-slug>
    — 单区域快照:房源数量、中位数、挂牌天数、降价占比,以及趋势数据。
  • redfin-pp-cli summary <region-slug>
    — 社区市场摘要:活跃/待售/90天内已售房源数、中位数、挂牌天数、降价占比。
  • redfin-pp-cli trends
    — 多区域聚合趋势叠加;输出整洁表格(区域×月份×指标)。
  • redfin-pp-cli appreciation
    — 按年度中位数售价变化百分比对母都市圈下的子社区排名。
  • redfin-pp-cli export
    — 通过划分价格波段并按URL去重,突破Redfin gis-csv的350行限制,批量导出数据。

Freshness Contract

新鲜度约定

This printed CLI owns bounded freshness only for registered store-backed read command paths. In
--data-source auto
mode, those paths check
sync_state
and may run a bounded refresh before reading local data.
--data-source local
never refreshes.
--data-source live
reads the API and does not mutate the local store. Set
REDFIN_NO_AUTO_REFRESH=1
to skip the freshness hook without changing source selection.
Covered paths:
  • redfin-pp-cli homes
When JSON output uses the generated provenance envelope, freshness metadata appears at
meta.freshness
. Treat it as current-cache freshness for the covered command path, not a guarantee of complete historical backfill or API-specific enrichment.
本CLI仅对已注册的基于存储的只读命令路径提供有限的新鲜度保障。在
--data-source auto
模式下,这些路径会检查
sync_state
,并可能在读取本地数据前进行有限刷新。
--data-source local
模式从不刷新。
--data-source live
模式读取API且不修改本地存储。设置
REDFIN_NO_AUTO_REFRESH=1
可跳过新鲜度钩子,无需更改数据源选择。
覆盖的路径:
  • redfin-pp-cli homes
当JSON输出使用生成的来源信封时,新鲜度元数据位于
meta.freshness
。将其视为覆盖命令路径的当前缓存新鲜度,而非完整历史回填或API特定增强的保证。

Finding the right command

查找合适的命令

When you know what you want to do but not which command does it, ask the CLI directly:
bash
redfin-pp-cli which "<capability in your own words>"
which
resolves a natural-language capability query to the best matching command from this CLI's curated feature index. Exit code
0
means at least one match; exit code
2
means no confident match — fall back to
--help
or use a narrower query.
当您知道要执行的操作但不知道对应的命令时,可直接询问CLI:
bash
redfin-pp-cli which "<用您自己的语言描述功能>"
which
命令会将自然语言功能查询解析为CLI精选功能索引中最匹配的命令。退出码
0
表示至少有一个匹配项;退出码
2
表示无明确匹配项——请改用
--help
或缩小查询范围。

Recipes

示例脚本

Three-metro relocator overlay

三都市圈迁居者对比

bash
redfin-pp-cli trends --regions 30743,18028,30739 --metric median-sale --period 24 --json --select rows.region,rows.month,rows.value
Pulls aggregate-trends for all three metros over the same 24-month window, joins them into one tidy long table for export — the overlay Redfin's UI never produces.
bash
redfin-pp-cli trends --regions 30743,18028,30739 --metric median-sale --period 24 --json --select rows.region,rows.month,rows.value
获取三个都市圈过去24个月的聚合趋势,合并为一个整洁的长表用于导出——这是Redfin UI从未提供的对比功能。

Buyer's-agent comp pull in one command

买方经纪人一键获取可比房源

bash
redfin-pp-cli comps <your-listing-url> --radius 0.5 --sqft-tol 15 --months 6 --bed-match --json
Resolves the subject listing, derives a 0.5-mile circle, pulls sold homes in the last 6 months matching beds and within 15% sqft, returns the ranked comp set ready for a buyer offer brief.
bash
redfin-pp-cli comps <your-listing-url> --radius 0.5 --sqft-tol 15 --months 6 --bed-match --json
解析目标房源,生成0.5英里范围的圆形区域,获取过去6个月内卧室数匹配且面积差异在15%以内的已售房源,返回排名后的可比房源集合,可直接用于买家报价简报。

Investor screen across 5 zips

投资者跨5个邮编筛选

bash
redfin-pp-cli rank --regions 30772,30773,30774,30775,30776 --by price-per-sqft --net-hoa --beds-min 3 --price-max 600000 --status for-sale --json --limit 25
Unions synced searches across 5 Austin zips and ranks the full union by net-HOA $/sqft. Filter narrows to investor screen criteria; result is a single ranked feed Redfin cannot produce.
bash
redfin-pp-cli rank --regions 30772,30773,30774,30775,30776 --by price-per-sqft --net-hoa --beds-min 3 --price-max 600000 --status for-sale --json --limit 25
合并奥斯汀5个邮编的同步搜索结果,按扣除HOA费用后的每平方英尺价格排名。筛选条件符合投资者筛选标准;结果是Redfin无法生成的统一排名列表。

Weekly diff for a saved search

已保存搜索的周度差异对比

bash
redfin-pp-cli watch austin-3br --since 7d --json --select new_listings.url,new_listings.price,price_changed.url,price_changed.delta_pct
Composes the watch result with --select to emit only the columns the agent needs — agents can drop straight into a weekly buyer email without extra parsing.
bash
redfin-pp-cli watch austin-3br --since 7d --json --select new_listings.url,new_listings.price,price_changed.url,price_changed.delta_pct
结合watch结果与--select参数,仅输出Agent需要的列——Agent无需额外解析即可直接将结果写入每周买家邮件。

Bulk pull sold homes for 2024

批量获取2024年已售房源

bash
redfin-pp-cli export --region-slug "city/30772/TX/Austin" --status sold --year 2024 --csv > austin-sold-2024.csv
Slices the price space into bands, page-walks gis-csv per band, dedupes on listing URL across bands, emits a single CSV that exceeds Redfin's 350-row cap.
bash
redfin-pp-cli export --region-slug "city/30772/TX/Austin" --status sold --year 2024 --csv > austin-sold-2024.csv
将价格区间划分为多个波段,按波段遍历gis-csv,跨波段按房源URL去重,输出单个CSV文件,突破Redfin的350行限制。

Auth Setup

认证设置

No authentication required.
Run
redfin-pp-cli doctor
to verify setup.
无需认证。
运行
redfin-pp-cli doctor
验证设置。

Agent Mode

Agent模式

Add
--agent
to any command. Expands to:
--json --compact --no-input --no-color --yes
.
  • Pipeable — JSON on stdout, errors on stderr
  • Filterable
    --select
    keeps a subset of fields. Dotted paths descend into nested structures; arrays traverse element-wise. Critical for keeping context small on verbose APIs:
    bash
    redfin-pp-cli homes --agent --select id,name,status
  • Previewable
    --dry-run
    shows the request without sending
  • 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,错误信息输出到标准错误
  • 可筛选
    --select
    参数保留字段子集。点路径可深入嵌套结构;数组可遍历元素。对于冗长的API,这是保持上下文简洁的关键:
    bash
    redfin-pp-cli homes --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
.results
for data and
.meta.source
to know whether it's live or local. A human-readable
N results (live)
summary is printed to stderr only when stdout is a terminal — piped/agent consumers get pure JSON on stdout.
从本地存储或API读取数据的命令会将输出包装在来源信封中:
json
{
  "meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
  "results": <data>
}
解析
.results
获取数据,
.meta.source
表示数据来自实时API还是本地存储。当标准输出为终端时,仅会向标准错误输出人类可读的
N results (live)
摘要——管道/Agent消费者仅会在标准输出获取纯JSON。

Agent Feedback

Agent反馈

When you (or the agent) notice something off about this CLI, record it:
redfin-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
redfin-pp-cli feedback --stdin < notes.txt
redfin-pp-cli feedback list --json --limit 10
Entries are stored locally at
~/.redfin-pp-cli/feedback.jsonl
. They are never POSTed unless
REDFIN_FEEDBACK_ENDPOINT
is set AND either
--send
is passed or
REDFIN_FEEDBACK_AUTO_SEND=true
. Default behavior is local-only.
Write what surprised you, not a bug report. Short, specific, one line: that is the part that compounds.
当您(或Agent)发现本CLI存在问题时,请记录反馈:
redfin-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
redfin-pp-cli feedback --stdin < notes.txt
redfin-pp-cli feedback list --json --limit 10
反馈条目存储在本地
~/.redfin-pp-cli/feedback.jsonl
文件中。仅当设置了
REDFIN_FEEDBACK_ENDPOINT
且传递了
--send
参数或设置
REDFIN_FEEDBACK_AUTO_SEND=true
时,才会发送反馈。默认行为仅存储在本地。
请写下让您感到意外的内容,而非正式的错误报告。简短、具体、单行描述:这才是有价值的部分。

Output Delivery

输出交付

Every command accepts
--deliver <sink>
. 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:
SinkEffect
stdout
Default; write to stdout only
file:<path>
Atomically write output to
<path>
(tmp + rename)
webhook:<url>
POST the output body to the URL (
application/json
or
application/x-ndjson
when
--compact
)
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.
每个命令均支持
--deliver <sink>
参数。输出会发送到指定的接收端,同时(或替代)输出到标准输出,因此Agent无需手动管道即可路由命令结果。支持三种接收端:
接收端效果
stdout
默认;仅输出到标准输出
file:<path>
原子性地将输出写入
<path>
(先写入临时文件再重命名)
webhook:<url>
将输出体POST到指定URL(
application/json
格式,若使用
--compact
则为
application/x-ndjson
格式)
不支持的协议会返回结构化错误,并列出支持的类型。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.
redfin-pp-cli profile save briefing --json
redfin-pp-cli --profile briefing homes
redfin-pp-cli profile list --json
redfin-pp-cli profile show briefing
redfin-pp-cli profile delete briefing --yes
Explicit flags always win over profile values; profile values win over defaults.
agent-context
lists all available profiles under
available_profiles
so introspecting agents discover them at runtime.
配置文件是一组保存的标志值,可在多次调用中复用。适用于定时Agent每次运行相同命令且配置相同的场景——即HeyGen的"Beacon"模式。
redfin-pp-cli profile save briefing --json
redfin-pp-cli --profile briefing homes
redfin-pp-cli profile list --json
redfin-pp-cli profile show briefing
redfin-pp-cli profile delete briefing --yes
显式标志始终优先于配置文件值;配置文件值优先于默认值。
agent-context
会在
available_profiles
下列出所有可用配置文件,因此Agent可在运行时自动发现。

Exit Codes

退出码

CodeMeaning
0Success
2Usage error (wrong arguments)
3Resource not found
5API error (upstream issue)
7Rate limited (wait and retry)
10Config error
代码含义
0成功
2使用错误(参数错误)
3资源未找到
5API错误(上游问题)
7速率限制(请等待后重试)
10配置错误

Argument Parsing

参数解析

Parse
$ARGUMENTS
:
  1. Empty,
    help
    , or
    --help
    → show
    redfin-pp-cli --help
    output
  2. Starts with
    install
    → ends with
    mcp
    → MCP installation; otherwise → see Prerequisites above
  3. Anything else → Direct Use (execute as CLI command with
    --agent
    )
解析
$ARGUMENTS
  1. 为空、
    help
    --help
    → 显示
    redfin-pp-cli --help
    输出
  2. install
    开头
    → 以
    mcp
    结尾 → MCP安装;否则 → 参见上方前提条件
  3. 其他情况 → 直接使用(添加
    --agent
    参数执行CLI命令)

MCP Server Installation

MCP服务器安装

  1. Install the MCP server:
    bash
    go install github.com/mvanhorn/printing-press-library/library/other/redfin/cmd/redfin-pp-mcp@latest
  2. Register with Claude Code:
    bash
    claude mcp add redfin-pp-mcp -- redfin-pp-mcp
  3. Verify:
    claude mcp list
  1. 安装MCP服务器:
    bash
    go install github.com/mvanhorn/printing-press-library/library/other/redfin/cmd/redfin-pp-mcp@latest
  2. 注册到Claude Code:
    bash
    claude mcp add redfin-pp-mcp -- redfin-pp-mcp
  3. 验证:
    claude mcp list

Direct Use

直接使用

  1. Check if installed:
    which redfin-pp-cli
    If not found, offer to install (see Prerequisites at the top of this skill).
  2. Match the user query to the best command from the Unique Capabilities and Command Reference above.
  3. Execute with the
    --agent
    flag:
    bash
    redfin-pp-cli <command> [subcommand] [args] --agent
  4. If ambiguous, drill into subcommand help:
    redfin-pp-cli <command> --help
    .
  1. 检查是否安装:
    which redfin-pp-cli
    若未找到,提供安装选项(参见顶部前提条件)。
  2. 将用户查询与上方独特功能和命令参考中最匹配的命令对应。
  3. 添加
    --agent
    参数执行:
    bash
    redfin-pp-cli <command> [subcommand] [args] --agent
  4. 若存在歧义,查看子命令帮助:
    redfin-pp-cli <command> --help