btca
v0.3.3
Published
CLI tool for asking questions about technologies using OpenCode
Readme
btca
A CLI tool for asking questions about technologies using their source code repositories.
Installation
bun installUsage
bun run src/index.tsOr after building:
btca <command>Commands
btca
Show version information.
btca ask
Ask a question about a technology.
btca ask -t <tech> -q <question>
btca ask --tech svelte --question "How do I create a reactive store?"Options:
-t, --tech- The technology/repo to query-q, --question- The question to ask
btca chat
Start an interactive TUI chat session.
btca chat -t <tech>
btca chat --tech nextjsOptions:
-t, --tech- The technology/repo to chat about
btca serve
Start an HTTP server to answer questions via API.
btca serve
btca serve -p 3000Options:
-p, --port- Port to listen on (default: 8080)
Endpoint:
POST /question- Send{ "tech": "svelte", "question": "..." }to get answers
btca open
Hold an OpenCode instance in the background for faster subsequent queries.
btca openbtca config
Manage CLI configuration. Shows the config file path when run without subcommands.
btca configbtca config model
View or set the model and provider.
# View current model/provider
btca config model
# Set model and provider
btca config model -p <provider> -m <model>
btca config model --provider anthropic --model claude-3-opusOptions:
-p, --provider- The provider to use-m, --model- The model to use
Both options must be specified together when updating.
btca config repos list
List all configured repositories.
btca config repos listbtca config repos add
Add a new repository to the configuration.
btca config repos add -n <name> -u <url> [-b <branch>] [--notes <notes>]
btca config repos add --name react --url https://github.com/facebook/react --branch mainOptions:
-n, --name- Unique name for the repo (required)-u, --url- Git repository URL (required)-b, --branch- Branch to use (default: "main")--notes- Special instructions for the AI when using this repo
Configuration
Configuration is stored at ~/.config/btca/btca.json. The config file includes:
promptsDirectory- Directory for system promptsreposDirectory- Directory where repos are clonedport- Default server portmaxInstances- Maximum concurrent OpenCode instancesrepos- Array of configured repositoriesmodel- AI model to useprovider- AI provider to use
