btca-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesebtca CLI
btca CLI
Setup From Scratch
从零开始搭建
- Ensure Bun is installed (see https://bun.sh if needed).
- Install the btca CLI globally:
bash
bun add -g btca- Initialize the project from the repo root:
bash
btca initChoose CLI for local resources.
- Connect a provider and model:
bash
btca connectFollow the prompts.
- Add resources:
bash
undefined- 确保已安装Bun(如需安装请查看https://bun.sh)。
- 全局安装btca CLI:
bash
bun add -g btca- 从仓库根目录初始化项目:
bash
btca init选择CLI以使用本地资源。
- 连接服务提供商和模型:
bash
btca connect按照提示操作。
- 添加资源:
bash
undefinedGit resource
Git资源
btca add -n svelte-dev https://github.com/sveltejs/svelte.dev
btca add -n svelte-dev https://github.com/sveltejs/svelte.dev
Local directory
本地目录
btca add -n my-docs -t local /absolute/path/to/docs
6. Verify resources:
```bash
btca resources- Ask a question:
bash
btca ask -r svelte-dev -q "How do I define remote functions?"- Optional TUI:
bash
btcabtca add -n my-docs -t local /absolute/path/to/docs
6. 验证资源:
```bash
btca resources- 发起查询:
bash
btca ask -r svelte-dev -q "How do I define remote functions?"- 可选的TUI:
bash
btcaCommon Tasks
常见任务
- Ask with multiple resources:
bash
btca ask -r react -r typescript -q "How do I type useState?"- You can see which resources are configured with .
btca resources
- 基于多资源发起查询:
bash
btca ask -r react -r typescript -q "How do I type useState?"- 可通过查看已配置的资源。
btca resources
Config Overview
配置概述
- Config lives in (project) and
btca.config.jsonc(global).~/.config/btca/btca.config.jsonc - Project config overrides global and controls provider/model and resources.
- 配置文件位于项目目录下的以及全局目录
btca.config.jsonc。~/.config/btca/btca.config.jsonc - 项目配置会覆盖全局配置,用于控制服务提供商/模型以及资源。
Troubleshooting
故障排除
- "No resources configured": add resources with and re-run
btca add ....btca resources - "Provider not connected": run and follow the prompts.
btca connect
- "未配置资源":使用添加资源后重新运行
btca add ...。btca resources - "未连接服务提供商":运行并按照提示操作。
btca connect