Files
company-kb/tools/kb-bot/send.sh
yangqianqian 84f7950589 Initial commit: company-kb framework
- 完整的知识库框架(P0-P5 路线图)
- 12篇治理文档
- 工具脚本(kb-init.sh, kb-lint-fm.py, feishu-sync.py, kb-bot)
- 7个 Claude 命令
- 示例项目和测试项目(wanniu-l1)
- 契约文件(meta/kb-contract.yaml)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 18:24:39 +08:00

25 lines
693 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# send.sh —— 手动发一条 markdown 消息到飞书群P2-a 验证发消息通路)
#
# 用法:
# bash tools/kb-bot/send.sh <chat-id> "markdown 内容"
# # chat-id 用 lark-cli im +chat-search --query "群名" 查
#
# 加 --dry-run 只打印不发。
set -euo pipefail
export PATH="$HOME/.npm-global/bin:$PATH"
CHAT_ID="${1:-}"
CONTENT="${2:-}"
if [ -z "$CHAT_ID" ] || [ -z "$CONTENT" ]; then
echo "用法: bash tools/kb-bot/send.sh <chat-id> \"markdown 内容\"" >&2
echo "提示: 先用 lark-cli im +chat-search --query \"群名\" 查 chat-id" >&2
exit 1
fi
lark-cli im +messages-send \
--chat-id "$CHAT_ID" \
--markdown "$CONTENT" \
--as bot