Use cyeam trello, do not assemble Trello HTTP requests yourself. On first use, run cyeam trello login --key <api-key>first, authorize in the browser, then paste the Token shown on the page back into the CLI; the CLI verifies it and stores it in the system keychain, and when the keychain is unavailable it falls back to 0600 with permissions ~/.cyeam/trello.json. Never output credentials.
Rules
- When you do not know the ID, first
boards, thenlists <board-id>; do not guess IDs by name. - To query the day's tasks use
cards --board <board-id> --today; filter by the local time zone anddue. - Creating, modifying, moving, uploading attachments, and adding/removing Webhooks change external state, so you must first obtain explicit user confirmation.
- Webhook commands only manage subscriptions; the public HTTPS receiver, signature verification, deduplication, and Android sync are implemented by a separate service.
- The environment variables
TRELLO_API_KEYandTRELLO_TOKENare only for CI or temporary overrides; when setting one of them you must set the other at the same time.
Commands
cyeam trello login --key <api-key>
cyeam trello status
cyeam trello logout
cyeam trello boards cyeam trello lists cyeam trello cards --list [--today] cyeam trello cards --board [--today] cyeam trello status-changes --board [--date ] [--to-list ] [--limit 1000] cyeam trello homework --board [--date | --from --to ] [--include-actions] [--dir <directory>] [--max-width 1200] [--max-bytes ]
cyeam trello card create --list --name [--desc ] [--due ] [--labels <label-id,...>] [--type normal|word_memorization|english_reading|arithmetic] [--task ] cyeam trello card update [--name ] [--desc ] [--due ] [--complete=true|false] cyeam trello card move --list cyeam trello card attach --file [--name ] cyeam trello card attachments cyeam trello card attachment get [--out ] [--max-width ] [--max-bytes ] cyeam trello card actions [--limit 50]
cyeam trello webhook create --callback-url --model-id [--description ] cyeam trello webhook delete
`card update --due ""` 清除截止时间;未传 `--complete` 时不改变任务完成标记。默认输出是 JSON 信封,`--pretty` 输出响应 JSON。
创建家庭作业卡片时,`--type` 默认 `normal`,与原先直接传 `--desc` 的行为一致。`--type word_memorization --task "bedroom, armchair"` 会将单词和自动生成的翻译链接写入描述;`--type english_reading --task "/ai/translate?textbook=0&article=4"` 会将用户提供的链接原样写入描述。每个任务只创建一张卡片。
口算使用 `--type arithmetic --task <多行题目>`(类型也接受 `口算`)。`--task` 每行一道题,使用真实换行;不放题单标题、姓名栏、答案、Markdown 表格或多栏排版。预计用时等说明放在 `--desc`,例如 `预计用时: 5`。CLI 保留说明并追加 `作业类型:口算`、`作业内容:` 和完整题目;平板读取题目并自动排版。
```bash
cyeam trello card create --list <list-id> --name "口算20题(第N天)" --due <RFC3339> \
--type arithmetic --task '26 + 17 = ___
54 − 28 = ___' --desc '预计用时: 5'
When updating an existing mental arithmetic card,card update still uses --desc to submit the complete description (including type, estimated time,作业内容: and all questions); this command has no --type or --task parameter. General instructions go before 作业内容: , and only the questions go after.
When fetching an image, first use card attachments <card-id> to find attachment-id, the filename, and the MIME type, then call card attachment get. When it needs to be displayed in Feishu, prefer passing --out <local-path>: the CLI will use the saved Trello credentials to download the protected attachment and write the image bytes directly to a file, returning saved_to、name、mime_type and size_bytes; the Agent then uploads that local file. By default the original image is downloaded; when the image is too large, add --max-width <px> to download the server-side preview image (WebP, much smaller in size; when the content is WebP, mime_type is image/webp). Do not parse the JSON yourself, decode Base64, or send the protected URL directly to Feishu. Omit --outonly when the caller explicitly needs inline data; only then does the response include base64. The default attachment limit is 25 MiB.
status-changes queries the card list transition records for a given day in the local time zone, defaulting to today, returning the card, the lists before and after the transition, the operator, and changed_at. When organizing the day's completed tasks, you must first use lists <board-id> to find the completed list ID, then pass --to-list <list-id>; do not guess by list name.
To check a day's homework progress and submitted images, use the full command cyeam trello homework --board <board-id>: filter out cards due that day, return the list each card is in, and download all attachments to a local directory (default homework-<date>/). This is aread-only report command, does not create or append cards; do not write something that does not exist as cyeam homework, to add a new card use cyeam trello card create. By default downloads the largest preview image not exceeding --max-width(1200) wide (WebP, about 100KB, an order of magnitude faster than the original image), pass --max-width 0 to download the original image. In the JSON report each attachment carries a saved_to path and a homework_photo_url link (in the form https://trello.com/1/cards/<card-id>/attachments/<attachment-id>/download/<filename>, which can be opened directly in a browser after logging in to Trello); add --pretty to output a human-readable text report. Built-in timeout retry, a single card failure does not interrupt.
Hard rules for extracting images:For viewing or forwarding an image always use the saved_to local file, open it with an image-reading tool to confirm the content before displaying;homework_photo_url the link is for display only, do not curl/wget it or send it to Feishu (without a browser session it will 401/403). Check the report attachment by attachment:error is non-empty or size_bytes is 0 means the download failed, use card attachment get <card-id> <attachment-id> --out <path> to download it separately (by default downloads the original image, add --max-width 1200 to download the small-size preview image).
For the homework summary you can use cyeam trello homework --board <board-id> --from <YYYY-MM-DD> --to <YYYY-MM-DD> --include-actions to batch-read multiple days of materials in one go. The start and end dates are inclusive, and are mutually exclusive with --date ; omitting the date still queries today. Filter current unarchived cards bydue date, not by submission time; cards without a due date and archived cards are not included in the report. The report adds from、to and each card's desc original problem description;--include-actions additionally returns each card's most recent up to 1000 actions(including comments); if reading fails, write to actions_error, without blocking the image downloads. When the history reaches 1000 entries, you should state that it may be truncated. The attachment directory contains the card ID, to avoid confusion between homework with the same name. For the model grading and review record process see the homework skill; the CLI does not grade by itself.