Global options
These options apply to local CLI commands.| Option | Description |
|---|---|
--server <url> | Use an existing server (health checked). |
--port <port> | Port for an auto-started server (default 0, OS-assigned). |
--no-tui | Use REPL instead of TUI. |
--no-thinking | Hide reasoning output (REPL and ask). |
--no-tools | Hide tool traces (REPL and ask). |
--sub-agent | Clean output (no reasoning or tool traces). |
btca
Launches the TUI by default. Use --no-tui for the REPL.
Passing an unknown top-level command now exits with error: unknown command '<command>' and a non-zero status code, and may include a suggestion for a known command.
REPL commands:
/helpshows help./resourceslists resources./clearclears session resources./quitor/exitexits.
@resource mentions.
TUI command palette (/):
/connectconfigures provider and model./addopens the add-resource wizard./clearclears chat history./resumeopens thread resume./newis an alias for/clear.
Entersends message.Escapecancels streaming response (press twice to confirm).Ctrl+Cclears input or quits.Ctrl+Qquits.Tabautocompletes commands/mentions.Up/Downnavigates palettes/history.
btca add [url-or-path]
Adds a git repo, local directory, or npm package resource.
Options:
-g, --globalsets the flag, but target resolution still depends on whether a project config exists.-n, --name <name>sets a resource name.-b, --branch <branch>sets a branch (defaultmain).-s, --search-path <path...>sets one or more search paths.--notes <notes>sets special notes.-t, --type <git|local|npm>forces the resource type.
--type is omitted, it auto-detects git URL vs local path vs npm reference. GitHub URLs are normalized to the base repo. Local paths are resolved to absolute paths. npm references accept package specs (react, @types/node, npm:react) and npmjs package URLs.
Examples:
btca remove [name]
Removes a resource by name. If omitted, it opens an interactive picker.
Options:
-g, --globalsets the flag, but is not a strict global override.
btca resources
Lists all configured resources.
btca ask
Asks a one-shot question with streaming output.
Options:
-q, --question <text>is required.-r, --resource <name...>can be repeated.--no-thinking,--no-tools,--sub-agentcontrol output detail.
@resource mentions are resolved and merged with -r flags. Mentions are stripped from the query text before sending. If no resources are provided, it uses all configured resources. Uses the /question/stream SSE endpoint.
You can also pass raw HTTPS git URLs directly instead of a configured resource name. These URLs are treated as one-off resources:
- They are normalized (for example, GitHub
.../blob/main/...URLs become the base repo URL). - They use a short-lived cache key derived from a hash of the URL.
- They are cloned into a temporary folder under
.tmpand removed after the request finishes. - Branch detection tries
main, thenmaster, thentrunk, thendev. - If none of those branches exist, the request fails with an instruction to add the repo as a named resource instead.
npm:<package>(for examplenpm:react)npm:<package>@<version-or-tag>(for examplenpm:@types/node@22.10.1)- npmjs URLs (for example
https://www.npmjs.com/package/react)
btca connect
Configures provider and model.
Options:
-g, --globaltargets the global config if no project config exists.-p, --provider <id>sets the provider.-m, --model <id>sets the model.
openai-compat, the interactive flow additionally prompts for:
- Base URL (required): root URL of your OpenAI-compatible server.
- Provider name (required): AI SDK provider identifier.
- Model ID (required): saved as
modelinbtca.config.jsonc. - API key (optional): only if your server requires auth, stored in OpenCode auth.
btca status
Shows current btca status.
Output includes:
- selected model
- selected provider
- selected model source (
project,global, ordefault) - selected provider source (
project,global, ordefault) - whether the selected provider is authenticated
- resources from
~/.config/btca/btca.config.jsonc - resources from
./btca.config.jsonc(if the file exists) - installed btca version and latest npm version
- update hint if your version is behind
btca disconnect
Disconnects provider credentials.
Options:
-p, --provider <id>selects a provider to disconnect.
btca skill
Runs the skills.sh installer for the btca CLI skill (interactive).
btca init
Project setup wizard.
Options:
-f, --forceoverwrites existing config.
btca.config.jsonc and prompts for storage mode (local .btca/ or global). If local storage is selected, it also handles .gitignore updates for .btca/.
btca clear
Clears all locally cloned resources.
btca wipe
Permanently deletes BTCA config files for the current directory and global config.
Options:
-y, --yesskips the interactive confirmation prompt.
- Targets
./btca.config.jsonc. - Targets
~/.config/btca/btca.config.jsonc. - Prints removed, missing, and failed paths.
- Shows a confirmation prompt unless
--yesis passed.
btca serve
Starts the local server.
Options:
-p, --port <port>sets the port (default8080).
btca mcp
Runs the local MCP server over stdio by default.
Subcommands:
btca mcp localscaffolds editor config for local stdio MCP.
- Starts (or reuses) the local server and exposes MCP tools over stdin/stdout.
- Intended for agent configs that support stdio transport.
listResources- list local resources.ask- ask a question against local resources, HTTPS git URLs, or npm references.