Are you the author? Sign in to claim
Anki card generator powered by Claude Agent SDK
AnkiAny 是基于 Claude Agent SDK 构建的智能 Anki 卡片生成工具,致力于为学习者和教育工作者提供高效的知识卡片制作解决方案。
# 克隆仓库
git clone https://github.com/your-username/ankiany.git
cd ankiany
# 使用 uv 安装依赖
uv sync
(可选)如果需要使用自定义 AI 模型接口,可以配置相关环境变量:
# 设置自定义 API 基础 URL(可选)
export ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"
export ANTHROPIC_AUTH_TOKEN="your-api-key-here"
💡 重要提示:如需使用自定义 API 代理,请参考 自定义 API 配置说明 以了解如何配置 Anthropic API 兼容接口。
# 基础使用
python3 cli.py "MySQL"
# 详细输出模式
python3 cli.py "Python 基础语法" --verbose
# 批量主题
python3 cli.py "机器学习算法"
python3 cli.py "数据结构"
python3 cli.py "网络编程基础"
# 启动 Web 服务器
uvicorn web:app --host 127.0.0.1 --port 8000
然后在浏览器中访问 http://127.0.0.1:8000 即可使用 Web 界面。
Web 界面功能包括:
ankiany/
├── core.py # 核心模块,包含 Claude Agent 配置
├── tools.py # 工具函数定义
├── web.py # FastAPI Web 服务器
├── cli.py # 命令行入口
├── session_context.py # 会话上下文管理
配置文件
├── prompt.txt # Agent 系统提示词
├── static/ # 静态资源
│ └── index.html # Web 界面
└── tests/ # 测试文件
系统内置以下核心工具:
您可以基于 Claude Agent SDK 扩展自定义功能。
安装 SDK: 使用 claude-agent-sdk,请参考官方文档进行安装
创建自定义工具:
from claude_agent_sdk import tool
@tool(
"your_tool_name",
"工具描述",
{"param1": str, "param2": int}, # 参数定义
)
async def your_tool(args: Dict[str, Any]) -> Dict[str, Any]:
# 工具逻辑
return {"content": [{"type": "text", "text": "结果"}]}
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions
options = ClaudeAgentOptions(
mcp_servers={"your-tools": server},
allowed_tools=["your_tool_name"],
system_prompt="系统提示词"
)
async with ClaudeSDKClient(options=options) as client:
await client.query("用户问题")
async for message in client.receive_response():
# 处理响应
pass
欢迎提交 Issue 和 Pull Request!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)(注意:演示站点可能因服务器维护暂时不可用)
主题:"MySQL 数据库管理"
Agent 会自动:
问答题(QA):
问:MySQL 的默认端口号是什么?||答:3306
填空题(Cloze):
InnoDB 存储引擎使用 {{c1::MVCC}} 机制来实现并发控制。
选择题(MCQ):
以下哪个不是 MySQL 的存储引擎?||A. InnoDB
B. MyISAM
C. Redis
D. Memory||C. Redis
本项目采用 MIT 协议 - 查看 LICENSE 文件了解详情。
如果这个项目对您有帮助,请给我们一个 Star⭐️!
Manage multiple Claude Code instances in separate git worktrees simultaneously
⚠️ Experimentelle Skill-Sammlung für deutsches Recht (Arbeits-, Gesellschafts-, Insolvenz-, Datenschutz-, Prozessrecht u
Manage multiple Claude Code agents from TUI or Web with tmux and git worktrees
Project management using GitHub Issues + Git worktrees for parallel agent execution