AgentSkillsCN

btca-cli

安装、配置并运行 btca CLI,以实现本地资源管理与源码优先的解答方式。当用户在项目中搭建 btca 环境、连接服务提供商、添加或管理资源,或通过 btca 命令提出问题时,可调用此技能。当用户说“使用 btca”或需要对特定库或框架进行更深入的研究时,也可启用此技能。

SKILL.md
--- frontmatter
name: btca-cli
description: Install, configure, and operate the btca CLI for local resources and source-first answers. Use when setting up btca in a project, connecting a provider, adding or managing resources, and asking questions via btca commands. Invoke this skill when the user says "use btca" or needs to do more detailed research on a specific library or framework.

btca CLI

Setup From Scratch

  1. Ensure Bun is installed (see https://bun.sh if needed).
  2. Install the btca CLI globally:
bash
bun add -g btca
  1. Initialize the project from the repo root:
bash
btca init

Choose CLI for local resources.

  1. Connect a provider and model:
bash
btca connect

Follow the prompts.

  1. Add resources:
bash
# Git resource
btca add -n svelte-dev https://github.com/sveltejs/svelte.dev

# Local directory
btca add -n my-docs -t local /absolute/path/to/docs
  1. Verify resources:
bash
btca resources
  1. Ask a question:
bash
btca ask -r svelte-dev -q "How do I define remote functions?"
  1. Optional TUI:
bash
btca

Common 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.

Config Overview

  • Config lives in btca.config.jsonc (project) and ~/.config/btca/btca.config.jsonc (global).
  • Project config overrides global and controls provider/model and resources.

Troubleshooting

  • "No resources configured": add resources with btca add ... and re-run btca resources.
  • "Provider not connected": run btca connect and follow the prompts.