davis7dotsh/better-context
每日信息看板 · 2026-03-02
2026-03-02T01:53:39Z
Published
AI 总结
better-context(btca)是一个让AI编码代理通过检索真实源码来回答库/框架问题的工具,提供CLI、API服务与Web端,帮助避免依赖过时文档并提升开发准确性。
- 核心理念:让AI代理通过搜索实际源代码而非过时文档来回答问题
- 项目以Bun单仓+Turborepo构建,明确要求只使用bun而非npm/yarn
- 包含CLI、API server、SvelteKit+Convex的Web应用、sandbox与共享包等多模块
- Web端支持Vercel部署,需配置Convex相关变量与密钥以完成构建与注入PUBLIC_CONVEX_URL
- 提供完整的build/check/format/test脚本体系,并使用Turborepo缓存加速
#GitHub #repo #开源项目 #btca #better-context #Bun #Turborepo #SvelteKit #Convex
内容摘录
btca
<a href="https://www.npmjs.com/package/btca"><img alt="npm" src="https://img.shields.io/npm/v/btca?style=flat-square" /></a>
https://btca.dev
Ask your AI agent questions about libraries and frameworks by searching the actual source code, not outdated docs.
Install
Usage
Project Setup
Paste this into your AI coding agent to set up btca for your project:
See the full Getting Started guide for more details.
Development
This is a Bun monorepo using Turborepo. **Only use bun** - never npm/yarn.
Quick Start
Web Deployment
apps/web is configured for Vercel. Import the repo into Vercel, set the Root Directory to apps/web, and keep the checked-in apps/web/vercel.json so builds run through Convex and inject PUBLIC_CONVEX_URL automatically. You still need CONVEX_DEPLOY_KEY in Vercel, plus the app's public env vars in Vercel and the backend-only secrets in Convex.
Scripts
All scripts use Turborepo for caching. Run from the repository root.
Build
| Command | Description |
| ------------------- | ---------------------------- |
| bun run build:all | Build all packages |
| bun run build:cli | Build CLI (creates binaries) |
| bun run build:web | Build web app |
Type Check
| Command | Description |
| ----------------------- | ------------------------- |
| bun run check:all | Type check all packages |
| bun run check:cli | Type check CLI |
| bun run check:web | Type check web app |
| bun run check:server | Type check server |
| bun run check:sandbox | Type check sandbox |
| bun run check:shared | Type check shared package |
Format
| Command | Description |
| ------------------------ | --------------------- |
| bun run format:all | Format all packages |
| bun run format:cli | Format CLI |
| bun run format:web | Format web app |
| bun run format:server | Format server |
| bun run format:sandbox | Format sandbox |
| bun run format:shared | Format shared package |
Test
| Command | Description |
| --------------------- | ---------------- |
| bun run test:all | Run all tests |
| bun run test:server | Run server tests |
Other
| Command | Description |
| ------------------------------- | ------------------------------------------------- |
| bun run clean | Remove node_modules, .svelte-kit, .turbo, .vercel |
| bun run analytics-proxy:build | Build analytics proxy Docker image |
| bun run analytics-proxy:run | Run analytics proxy locally |
Packages
| Package | Path | Description |
| ----------------------- | ---------------------- | ---------------------------- |
| btca | apps/cli | CLI tool |
| btca-server | apps/server | API server |
| @btca/web | apps/web | Web app (SvelteKit + Convex) |
| btca-sandbox | apps/sandbox | Sandbox environment |
| @btca/shared | packages/shared | Shared utilities |
| @btca/analytics-proxy | apps/analytics-proxy | PostHog analytics proxy |
model recs...
**openai**
"gpt-5.3-codex-spark"
"gpt-5.3-codex"
**opencode**
"claude-sonnet-4-6"
"claude-haiku-4-5"
"gemini-3-flash"
**minimax**
"MiniMax-M2.5"