Loading...
Loading...
Compare original and translation side by side
git clone https://github.com/letta-ai/social-cli.git
cd social-cli
pnpm install
pnpm buildnode dist/cli.jspnpm startgit clone https://github.com/letta-ai/social-cli.git
cd social-cli
pnpm install
pnpm buildnode dist/cli.jspnpm start.envsocial-cliundefinedsocial-cli.envundefined
Only credentials for platforms you actually use are required.
仅需配置你实际使用的平台凭证即可。social-cli whoami
social-cli rate-limitssocial-cli whoami
social-cli rate-limitssocial-cli sync # pull notifications → inbox-{platform}.yaml
social-cli check || exit 0 # anything actionable? exit 1 = nothing to dosocial-cli sync # pull notifications → inbox-{platform}.yaml
social-cli check || exit 0 # anything actionable? exit 1 = nothing to do
- `sync`: deduplicates against `sent_ledger-{platform}.yaml` and caps inbox size.
- `check`: exits 0 if inbox has actionable items, 1 otherwise. Wrap with `|| exit 0` in cron loops.
- `dispatch`: executes the outbox atomically. Writes `dispatch_result-{platform}.yaml` and appends to `sent_ledger-{platform}.yaml` for replay protection.
- `sync`:基于`sent_ledger-{platform}.yaml`去重,并限制收件箱大小。
- `check`:如果收件箱中有可操作项则返回0,否则返回1。在定时任务循环中可搭配`|| exit 0`使用。
- `dispatch`:原子性执行发件箱中的操作。生成`dispatch_result-{platform}.yaml`文件,并将结果追加到`sent_ledger-{platform}.yaml`中以防止重复执行。undefinedundefinedundefinedundefinedat.margin.noteundefinedat.margin.noteundefined
Motivations: `commenting`, `highlighting`, `questioning`, `describing`, `linking`.
标注动机:`commenting`(评论)、`highlighting`(高亮)、`questioning`(提问)、`describing`(描述)、`linking`(链接)。inbox-{platform}.yamlinbox-{platform}.yamlnotifications:
- id: "at://did:plc:xxx/app.bsky.feed.post/abc"
platform: bsky
type: mention # mention, reply, like, follow, repost, quote
author: someone.bsky.social
authorId: "did:plc:xxx"
postId: "at://..."
text: "Hey, what do you think?"
timestamp: "2026-03-25T12:00:00Z"
parentPostId: "at://..." # for replies
parentPostText: "..." # context
rootPostId: "at://..." # thread root
rootPostText: "..."notifications:
- id: "at://did:plc:xxx/app.bsky.feed.post/abc"
platform: bsky
type: mention # mention, reply, like, follow, repost, quote
author: someone.bsky.social
authorId: "did:plc:xxx"
postId: "at://..."
text: "Hey, what do you think?"
timestamp: "2026-03-25T12:00:00Z"
parentPostId: "at://..." # for replies
parentPostText: "..." # context
rootPostId: "at://..." # thread root
rootPostText: "..."outbox-{platform}.yamloutbox-{platform}.yamldispatchdispatch:
- reply:
platform: bsky
id: "at://did:plc:xxx/app.bsky.feed.post/abc"
text: "Thanks for the mention"
- post:
text: "Hello from my agent"
platforms: [bsky, x] # post to both
- thread:
platform: bsky
posts:
- "Thread post 1"
- "Thread post 2"
- like:
platform: bsky
id: "at://..."
- annotate:
platform: bsky
id: "https://example.com/article"
text: "Key observation"
motivation: commenting
quote: "exact text to anchor to"
- ignore:
id: "notif_003"
reason: "spam"dispatchdispatch:
- reply:
platform: bsky
id: "at://did:plc:xxx/app.bsky.feed.post/abc"
text: "Thanks for the mention"
- post:
text: "Hello from my agent"
platforms: [bsky, x] # post to both
- thread:
platform: bsky
posts:
- "Thread post 1"
- "Thread post 2"
- like:
platform: bsky
id: "at://..."
- annotate:
platform: bsky
id: "https://example.com/article"
text: "Key observation"
motivation: commenting
quote: "exact text to anchor to"
- ignore:
id: "notif_003"
reason: "spam"dispatch_result-{platform}.yaml| Code | Meaning |
|---|---|
| 0 | All actions succeeded |
| 1 | Invalid outbox (schema error, missing creds) |
| 2 | Partial failure (some succeeded, some failed) |
resumeFromdispatch_result-{platform}.yaml| 代码 | 含义 |
|---|---|
| 0 | 所有操作执行成功 |
| 1 | 发件箱无效(schema错误、缺少凭证) |
| 2 | 部分失败(部分操作成功,部分失败) |
resumeFrom| Platform | Limit |
|---|---|
| Bluesky | 300 chars |
| X | 280 chars |
| 平台 | 限制 |
|---|---|
| Bluesky | 300字符 |
| X | 280字符 |
| Feature | Bluesky | X |
|---|---|---|
Annotations ( | Yes | No |
| Search | Yes | Yes |
| Feed | Yes (custom feeds) | Yes (home/user) |
| Threads | Yes | Yes |
| Notifications | mention, reply, like, follow, repost, quote | mentions only |
| Quote post context | Yes | Yes |
| 功能 | Bluesky | X |
|---|---|---|
标注功能( | 支持 | 不支持 |
| 搜索 | 支持 | 支持 |
| 动态流 | 支持(自定义动态流) | 支持(主页/用户动态) |
| 线程发布 | 支持 | 支持 |
| 通知类型 | 提及、回复、点赞、关注、转发、引用 | 仅提及 |
| 引用帖子上下文 | 支持 | 支持 |
Retry-AfterresumeFromsent_ledger-{platform}.yamlRetry-AfterresumeFromsent_ledger-{platform}.yaml./
├── .env
├── inbox-bsky.yaml # sync output
├── inbox-x.yaml
├── outbox-bsky.yaml # your decisions
├── outbox-x.yaml
├── dispatch_result-bsky.yaml # last dispatch outcome
├── dispatch_result-x.yaml
├── sent_ledger-bsky.yaml # replay protection
├── sent_ledger-x.yaml
└── feed.yaml # optional feed snapshots./
├── .env
├── inbox-bsky.yaml # 同步输出
├── inbox-x.yaml
├── outbox-bsky.yaml # 你的决策
├── outbox-x.yaml
├── dispatch_result-bsky.yaml # 上次调度结果
├── dispatch_result-x.yaml
├── sent_ledger-bsky.yaml # 重放防护
├── sent_ledger-x.yaml
└── feed.yaml # 可选的动态流快照references/commands.mdreferences/outbox-schema.mdreferences/agent-loop.mdreferences/commands.mdreferences/outbox-schema.mdreferences/agent-loop.md