CLI tool for asking questions about technologies using btca server
npm install btcaCLI tool for asking questions about technologies using the btca server.
``bash`
bun add -g @btca/cli
`bash`
git clone https://github.com/davis7dotsh/better-context.git
cd better-context
bun install
bun run --filter=@btca/cli build
Launch the interactive terminal UI:
`bash`
btca
Use @mentions to reference resources:
- Type @svelte How do I create a store? to ask about Svelte@react @typescript How do I type props?
- Use multiple mentions:
Ask a single question and exit:
`bash`
btca ask --resource svelte --question "How do I create a reactive store?"
Options:
- -r, --resource - Resource names or HTTPS Git URLs (can specify multiple)-q, --question
- - Question to ask (required)--no-thinking
- - Hide reasoning output--no-tools
- - Hide tool-call traces--sub-agent
- - Emit clean output (no reasoning or tool traces)
Examples:
`bashSingle resource
btca ask --resource svelte --question "How do signals work?"
Notes:
-
-r accepts configured resource names and HTTPS Git URLs.
- URL resources are not added to config and are cached on disk for reuse on later asks.$3
Start the btca server and keep it running to handle HTTP requests:
`bash
Start on default port (8080)
btca serveStart on custom port
btca serve --port 3000
`The server will run until you press
Ctrl+C to stop it.Configuration
btca uses a config file at
~/.config/btca/btca.config.jsonc. Manage configuration via CLI commands.$3
`bash
btca connect --provider opencode --model claude-haiku-4-5
`#### OpenAI-compatible providers
To use an OpenAI-compatible server (e.g., LM Studio), run:
`bash
btca connect --provider openai-compat
`You will be prompted for:
- Base URL: the root URL of your OpenAI-compatible server.
- Provider name: the AI SDK provider identifier.
- Model ID: the model to use for requests (stored as
model in btca.config.jsonc).
- API key (optional): only if your server requires authentication.$3
`bash
btca resources
`$3
`bash
Add a git repository
btca add --name effect --type git --url https://github.com/Effect-TS/effect --branch mainAdd with search path (focus on specific subdirectory)
btca add --name svelte --type git --url https://github.com/sveltejs/svelte.dev --branch main --search-path apps/svelte.devAdd a local directory
btca add --name myproject --type local --path /path/to/project
`$3
`bash
btca remove effect
`$3
Clear all locally cloned git repositories:
`bash
btca clear
`$3
`bash
Use an existing btca server
btca --server http://localhost:3000Specify port for auto-started server
btca --port 3001
`OpenCode MCP Plugin
Download the official OpenCode MCP config template and add your API key:
`bash
curl -fsSL https://btca.dev/opencode-mcp.json -o opencode.json
`Then replace
YOUR_API_KEY with your MCP API key (see btca remote mcp or the web dashboard).TUI Commands
In the interactive TUI, use
/ to access commands:-
/clear - Clear chat history
- /model - Select from recommended models
- /add - Add a new resourceKeyboard Shortcuts
-
Enter - Send message
- Escape - Cancel streaming response (press twice to confirm)
- Ctrl+C - Clear input or quit
- Ctrl+Q - Quit
- Tab - Autocomplete commands/mentions
- Up/Down` - Navigate palettes- Bun >= 1.1.0
- A running btca server (auto-started by default)
MIT