SuperPicky CLI (skill)
SuperPicky — bird photo AI culling (superpicky_cli.py, birdid_cli.py). This skill only covers CLI paths under $SKILL (directory containing this file).
Three entry modes (run.sh)
All user-facing commands go through ${SKILL}/scripts/run.sh (use the absolute path when cwd is not $SKILL). There are three entry modes (plus one helper):
| # | How you invoke | Program | What it is for |
|---|
| 1 | "${SKILL}/scripts/run.sh" then the same args as INLINECODE7 | INLINECODE8 | Main pipeline: process / reset / restar / info / burst / identify (folder culling, EXIF, stars, optional auto BirdID). |
| 2 |
"${SKILL}/scripts/run.sh" --birdid then the same args as birdid_cli.py |
birdid_cli.py |
Standalone BirdID: batch
identify,
organize by species,
reset,
list-countries; OSEA / eBird filters. |
|
3 |
"${SKILL}/scripts/run.sh" --region-query then args for ebird_region_query.py |
ebird_region_query.py |
Code lookup only: fuzzy match place names → eBird
country/region codes for use in (1) or (2) (
--birdid-country,
--birdid-region,
-c,
-r). |
Helper (not a separate “product” entry): --py PATH — run a script with the same venv. PATH may be absolute, or relative to .upstream/ (internally normalized to an absolute path before exec).
Absolute paths (required for agents / cron)
- -
install.sh / run.sh / capture-cli-help.sh: when another tool invokes them, use the full absolute path (e.g. ${SKILL}/scripts/run.sh, never rely on cd + ./scripts/run.sh). run.sh internals: always exec Python with absolute paths for superpicky_cli.py, birdid_cli.py, ebird_region_query.py, and the --py script (relative args become ${SKILL}/.upstream/...).
Interactive (from $SKILL):
CODEBLOCK0
Automation (example):
CODEBLOCK1
Layout
$SKILL = skill root.
CODEBLOCK2
| Script | Role |
|---|
| INLINECODE47 | Install into .upstream/ + INLINECODE49 |
scripts/run.sh |
Three entries: default →
superpicky_cli.py;
--birdid →
birdid_cli.py;
--region-query →
ebird_region_query.py; helper
--py |
|
scripts/ebird_region_query.py | Fuzzy lookup (also via
run.sh --region-query); tests:
ebird_region_query_test.py |
|
scripts/capture-cli-help.sh | Refresh
reference/cli-help-captured.txt |
Reference (minimal)
Short bilingual CLI notes |
|
reference/docs/manifest机制说明.md | Reset / manifest behavior |
|
reference/docs/BIRDIDOPTIMIZATION_GUIDE.md | BirdID tuning |
|
reference/requirements*.txt | Pip pins (mirror of upstream) |
|
reference/SOURCE.md | Capture metadata, pip quirks |
|
reference/README-INDEX.md | Index of
reference/ |
Install
From $SKILL (or call ${SKILL}/scripts/install.sh by absolute path):
CODEBLOCK3
- 1. Python 3.10–3.12 preferred;
python -m venv must work. $SKILL/.upstream/ + $SKILL/.upstream/.venv/.- Torch: macOS → base + PyPI torch; NVIDIA +
nvidia-smi → requirements_cuda.txt; else requirements.txt or fallback. verify_environment after pip unless --skip-verify / SKIP_VERIFY=1 — failures → [superpicky-cli verify] ERROR: and exit 1.
Entry details & examples
Wrapper meta-help: ${SKILL}/scripts/run.sh --help. SuperPicky top-level: ${SKILL}/scripts/run.sh -h.
CODEBLOCK4
ebird_region_query.py (entry 3) — --region-query
Resolves country codes (e.g. AU, CN) and region codes (e.g. AU-SA, CN-31) for --birdid-country, --birdid-region, birdid_cli -c/-r, and process --birdid-*.
- - Data:
.upstream/birdid/data/ebird_regions.json (EN + name_cn) + codes from birdid/avonet_filter.py REGION_BOUNDS (inline # labels for entries not in JSON). - Match: case-insensitive substring on code, English name, Chinese name; pinyin if optional
pypinyin is installed in .venv (pip install pypinyin). Fuzzy: difflib ratio on tokens / whole fields; tune with --min-score (default 0.5).
CODEBLOCK5
Direct: "${SKILL}/.upstream/.venv/bin/python" "${SKILL}/scripts/ebird_region_query.py" -h
Tests: "${SKILL}/.upstream/.venv/bin/python" "${SKILL}/scripts/ebird_region_query_test.py"
Manual: source "${SKILL}/.upstream/.venv/bin/activate" && cd "${SKILL}/.upstream" && python "${SKILL}/.upstream/superpicky_cli.py" …
Refresh --help capture
CODEBLOCK6
Upstream-only install
CODEBLOCK7
Repo cwd = clone root. Models needed for real process / identify, not for -h. Pip quirks: reference/SOURCE.md.
superpicky_cli.py (entry 1)
Via skill: "${SKILL}/scripts/run.sh" … (no --birdid / --region-query prefix)
Subcommands: process | reset | restar | info | burst | identify
Flags: reference/cli-help-captured.txt
INLINECODE118 : -s sharpness, -n TOPIQ, -c confidence, --flight/--no-flight, --burst/--no-burst, --xmp/--no-xmp, --no-organize, --no-cleanup, -q, -i / --auto-identify, --birdid-*, --keep-temp-files / --no-keep-temp-files, --cleanup-days, --save-crop.
reset / restar: -y; restar needs .superpicky/report.db.
burst: preview unless --execute.
identify: single image, --top, --write-exif, etc.
birdid_cli.py (entry 2)
Via skill: "${SKILL}/scripts/run.sh" --birdid …
Subcommands: identify | organize | reset | list-countries — details in cli-help-captured.txt (search birdid_cli).
Agent checklist
- 1. Resolve
$SKILL to an absolute directory; invoke "${SKILL}/scripts/run.sh" (and install.sh) by full path, not ./scripts/.... "${SKILL}/scripts/install.sh" if .upstream/.venv missing."${SKILL}/scripts/run.sh" --region-query … when the user gives a place name and you need an eBird -c / -r / --birdid-region code.-y on destructive reset / restar / birdid organize|reset when appropriate.- Pipeline:
process → optional restar; reset clears; restar needs report.db. - Star folder names: English + Chinese variants in upstream.
SuperPicky CLI (技能)
SuperPicky — 鸟类照片AI筛选工具(superpickycli.py、birdid_cli.py)。本技能仅涵盖 $SKILL(包含本文件的目录)下的 CLI路径。
三种入口模式(run.sh)
所有面向用户的命令均通过 ${SKILL}/scripts/run.sh 执行(当当前工作目录不是 $SKILL 时,请使用绝对路径)。共有三种入口模式(外加一个辅助模式):
| # | 调用方式 | 程序 | 用途 |
|---|
| 1 | ${SKILL}/scripts/run.sh 后接与 superpickycli.py 相同的参数 | superpickycli.py | 主流程: process / reset / restar / info / burst / identify(文件夹筛选、EXIF、星级评定、可选自动鸟类识别) |
| 2 |
${SKILL}/scripts/run.sh --birdid 后接与 birdid
cli.py 相同的参数 | birdidcli.py |
独立鸟类识别: 批量 identify、按物种 organize、reset、list-countries;OSEA / eBird 过滤器 |
|
3 |
${SKILL}/scripts/run.sh --region-query 后接 ebird
regionquery.py
的参数 | ebird
regionquery.py |
仅代码查询: 模糊匹配地名 → eBird
国家/地区代码,用于(1)或(2)(--birdid-country、--birdid-region、-c、-r) |
辅助模式(非独立“产品”入口): --py PATH — 使用相同虚拟环境运行脚本。PATH 可以是绝对路径,也可以是相对于 .upstream/ 的路径(在 exec 前内部会规范化为绝对路径)。
绝对路径(代理/定时任务必需)
- - install.sh / run.sh / capture-cli-help.sh: 当其他工具调用它们时,请使用完整绝对路径(例如 ${SKILL}/scripts/run.sh,切勿依赖 cd + ./scripts/run.sh)。
- run.sh 内部: 始终使用绝对路径 exec Python 脚本(superpickycli.py、birdidcli.py、ebirdregionquery.py 和 --py 脚本;相对路径参数会变为 ${SKILL}/.upstream/...)。
交互式(从 $SKILL 目录):
bash
./scripts/run.sh process /photos
自动化(示例):
bash
SKILL=$(cd /path/to/superpicky-cli && pwd)
${SKILL}/scripts/run.sh process /photos
${SKILL}/scripts/run.sh --py ${SKILL}/.upstream/scripts/download_models.py
目录结构
$SKILL = 技能根目录。
$SKILL/
├── SKILL.md
├── .gitignore # .upstream/
├── reference/ # CLI帮助 + 小型文档集(见下表)
└── scripts/
├── install.sh
├── run.sh # 入口(+ --region-query → ebirdregionquery.py)
├── ebirdregionquery.py # 模糊eBird国家/地区代码查询
├── ebirdregionquery_test.py
├── capture-cli-help.sh
└── setup-upstream-venv.sh → install.sh
$SKILL/.upstream/ # 克隆(被git忽略)
├── .venv/
├── superpicky_cli.py
├── birdid_cli.py
└── …
| 脚本 | 角色 |
|---|
| scripts/install.sh | 安装到 .upstream/ + .upstream/.venv/ |
| scripts/run.sh |
三个入口: 默认 → superpicky
cli.py;--birdid → birdidcli.py;--region-query → ebird
regionquery.py;辅助 --py |
| scripts/ebird
regionquery.py | 模糊查询(也可通过 run.sh --region-query 调用);测试:ebird
regionquery_test.py |
| scripts/capture-cli-help.sh | 刷新 reference/cli-help-captured.txt |
参考资料(精简)
简短双语CLI说明 |
|
reference/docs/manifest机制说明.md | 重置/清单行为 |
|
reference/docs/BIRDIDOPTIMIZATION_GUIDE.md | 鸟类识别调优 |
|
reference/requirements*.txt | Pip锁定(上游镜像) |
|
reference/SOURCE.md | 捕获元数据、pip问题 |
|
reference/README-INDEX.md | reference/ 索引 |
安装
从 $SKILL 目录(或通过绝对路径调用 ${SKILL}/scripts/install.sh):
bash
./scripts/install.sh
${SKILL}/scripts/install.sh --with-models
./scripts/install.sh --skip-verify
./scripts/install.sh --no-clone
PY=python3.12 ${SKILL}/scripts/install.sh
- 1. 首选 Python 3.10–3.12;python -m venv 必须可用。
- $SKILL/.upstream/ + $SKILL/.upstream/.venv/。
- Torch: macOS → 基础版 + PyPI torch;NVIDIA + nvidia-smi → requirementscuda.txt;否则 requirements.txt 或回退方案。
- pip 安装后执行 verifyenvironment,除非使用 --skip-verify / SKIP_VERIFY=1 — 失败时显示 [superpicky-cli verify] ERROR: 并 退出码 1。
入口详情与示例
包装器元帮助:${SKILL}/scripts/run.sh --help。SuperPicky 顶层帮助:${SKILL}/scripts/run.sh -h。
bash
${SKILL}/scripts/run.sh process /path/to/photos
${SKILL}/scripts/run.sh --birdid identify /path/to.jpg
${SKILL}/scripts/run.sh --py ${SKILL}/.upstream/scripts/download_models.py
相对路径 --py 也可以:相对于 .upstream/ 解析,然后以绝对路径执行
${SKILL}/scripts/run.sh --py scripts/download_models.py
ebirdregionquery.py(入口3)— --region-query
解析国家代码(例如 AU、CN)和地区代码(例如 AU-SA、CN-31),用于 --birdid-country、--birdid-region、birdid_cli 的 -c/-r 参数,以及 process --birdid-* 参数。
- - 数据: .upstream/birdid/data/ebirdregions.json(英文 + namecn)+ 来自 birdid/avonetfilter.py REGIONBOUNDS 的代码(JSON 中不存在的条目带有内联 # 标签)。
- 匹配: 对代码、英文名称、中文名称进行不区分大小写的子串匹配;如果 .venv 中安装了可选的 pypinyin(pip install pypinyin),则支持拼音匹配。模糊匹配: 对令牌/整个字段使用 difflib 比率;通过 --min-score 调整(默认 0.5)。
bash
${SKILL}/scripts/run.sh --region-query shanghai