Scripts and configuration for integrating Better Context (btca) with OpenCode. Better Context and OpenCode must be installed and configured prior to use.
Note
Combine the files with your existing configuration. You don't need to use all the files.
Allow OpenCode agents to invoke btca commands as standard command-line tools (for example, ls or grep). The tool supports these btca CLI commands:
btca ask- supports single and multiple sourcesbtca config model- the CLI currently does not exit automatically, so a timeout is used as a workaround (Opened a PR in btca to fix this! #98)btca config resources listbtca config resources addbtca config resources removebtca clear
Warning
The btca ask tool may call itself recursively and cause an infinite loop. Report occurrences at this issue. Prevention measures are in progress.
Reference:
Set permissions for the btca tools. Explicit permissions are recommended for destructive commands such as btca clear, although they are not strictly required.
Reference:
- Open issues or pull requests for bug reports, feature requests, or improvements.
- Create branches from
devand targetdevwhen opening a pull request. - Consider starring the repository if it is useful!