btca-bknd-repo-learn
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseQuery bknd with btca
使用 btca 查询 bknd
btca is a CLI tool for asking questions about git repos. It clones repositories, indexes them, and answers queries using AI.
btca 是一款用于查询 Git 仓库的 CLI 工具,它会克隆仓库、建立索引,并借助 AI 回答查询问题。
Quick Setup
快速设置
bash
undefinedbash
undefinedInstall btca and OpenCode
Install btca and OpenCode
bun add -g btca opencode-ai
bun add -g btca opencode-ai
Configure model (Big Pickle: free, fast, surprisingly good)
Configure model (Big Pickle: free, fast, surprisingly good)
btca config model --provider opencode --model big-pickle
btca config model --provider opencode --model big-pickle
Add bknd as a resource
Add bknd as a resource
btca config resources add --name bknd --type git --url https://github.com/bknd-io/bknd --branch main
Or create `btca.config.jsonc`:
```jsonc
{
"$schema": "https://btca.dev/btca.schema.json",
"model": "big-pickle",
"provider": "opencode",
"providerTimeoutMs": 300000,
"resources": [
{
"type": "git",
"name": "bknd",
"url": "https://github.com/bknd-io/bknd",
"branch": "main"
}
]
}btca config resources add --name bknd --type git --url https://github.com/bknd-io/bknd --branch main
或者创建 `btca.config.jsonc` 文件:
```jsonc
{
"$schema": "https://btca.dev/btca.schema.json",
"model": "big-pickle",
"provider": "opencode",
"providerTimeoutMs": 300000,
"resources": [
{
"type": "git",
"name": "bknd",
"url": "https://github.com/bknd-io/bknd",
"branch": "main"
}
]
}Core Commands
核心命令
Ask a question
提出问题
bash
btca ask --resource bknd --question "How do I define a schema?"bash
btca ask --resource bknd --question "How do I define a schema?"Interactive chat
交互式对话
bash
btca chat --resource bkndbash
btca chat --resource bkndLaunch TUI
启动 TUI 界面
bash
btcabash
btcaReference Files
参考文档
For detailed information, see:
- setup.md - Full installation, configuration options, resource management, troubleshooting setup issues
- query-patterns.md - Specific query patterns for data, auth, media, adapters, and framework integration
- advanced.md - Multi-resource queries, interactive workflows, performance optimization, debugging
如需详细信息,请查看:
- setup.md - 完整安装指南、配置选项、资源管理、安装问题排查
- query-patterns.md - 针对数据、认证、媒体、适配器及框架集成的特定查询模式
- advanced.md - 多资源查询、交互式工作流、性能优化、调试
Query Best Practices
查询最佳实践
- Be specific - "How do I define a schema with a one-to-many relation?" vs "How do I use the data module?"
- Provide context - "I'm using Cloudflare Workers. How do I configure the database adapter?"
- Ask for examples - "Show me a complete example of setting up password authentication"
- Reference specific files - "How does src/App.ts initialize the modules?"
- 具体明确 - 例如问“如何定义一对多关系的 schema?”而非“如何使用数据模块?”
- 提供上下文 - 例如“我正在使用 Cloudflare Workers,如何配置数据库适配器?”
- 索要示例 - 例如“给我展示一个完整的密码认证设置示例”
- 引用具体文件 - 例如“src/App.ts 是如何初始化模块的?”
Learning Workflow
学习工作流
- Explore high-level: Ask about overall architecture and main modules
- Module deep-dive: Use to focus on one module
btca chat --resource bknd - Implementation details: Ask to see specific feature implementations
- Examples & patterns: Query the examples directory for best practices
- 高层面探索:询问整体架构与主要模块
- 模块深入学习:使用 聚焦单个模块
btca chat --resource bknd - 实现细节:询问特定功能的实现方式
- 示例与模式:查询示例目录获取最佳实践
Resources
相关资源
- btca docs: https://btca.dev
- bknd docs: https://docs.bknd.io
- bknd repo: https://github.com/bknd-io/bknd
- btca 文档:https://btca.dev
- bknd 文档:https://docs.bknd.io
- bknd 仓库:https://github.com/bknd-io/bknd