# @augmentcode/context-connectors 中文文档

规范地址：https://npmcn.com/package/%40augmentcode/context-connectors/

版本：0\.1\.4
npm 元数据更新时间：2026-08-25T18:16:41.521Z
中文译文更新时间：2026-11-08T07:44:10.828Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40augmentcode/context-connectors
原文对照：https://npmcn.com/package/%40augmentcode/context-connectors/?lang=original

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：523 kB，171 个文件
- 模块格式：ES Module
- TypeScript 类型：包内自带
- 运行依赖：6 个
- peer 依赖：ai ^5\.0\.0，zod \>=3\.0\.0，ioredis \>=5\.0\.0，@octokit/rest \>=20\.0\.0，@ai-sdk/google \>=1\.0\.0，@ai-sdk/openai \>=1\.0\.0，@ai-sdk/anthropic \>=1\.0\.0，@anthropic-ai/sdk \>=0\.30\.0，@aws-sdk/client-s3 \>=3\.0\.0，@modelcontextprotocol/sdk \>=1\.0\.0
- 首次发布：2026-01-13T23:40:00.250Z
- 最新版本发布：2026-02-10T21:10:54.386Z
- 近 30 天下载量：1864（2026-10-07 至 2026-11-05，npm 官方下载统计）
- 已发布版本数：4（近 12 个月 4 个）

## 中文简介

用于索引任何数据源并通过Augment上下文引擎使其可以搜索的模块系统

## 安装

```sh
npm install @augmentcode/context-connectors
```

也可以使用：`pnpm add @augmentcode/context-connectors`、`yarn add @augmentcode/context-connectors`、`bun add @augmentcode/context-connectors`

## README

# 背景连接器

一个基于上下文引擎SDK的开源库,使得不同的源可以跨代理和应用程序搜索.

## 特征

-   **多来源**: 来自 GitHub 、 GitLab 、 BitBucket 或网站的索引代码、文档、 运行本、 策略和配置
-   **弹性存储**: 在当地或S3中存储索引,用于在生产应用程序中持续存储
-   **多个客户端**: CLI 搜索, 交互式代理, MCP 服务器( 本地和远程)
-   **递增更新**: 只重新索引已改变的东西
-   **智能过滤**: 尊重 `.gitignore`, (中文(简体) ), `.augmentignore`,并过滤二进制/生成的文件

## 安装

```bash
npm install @augmentcode/context-connectors
```

基于您的使用大小写安装可选依赖 :

```bash
# For GitHub source
npm install @octokit/rest

# For S3 storage
npm install @aws-sdk/client-s3

# For MCP server (Claude Desktop)
npm install @modelcontextprotocol/sdk
```

## 快速启动

### 1\. 索引代码库

```bash
# Set required environment variables
export AUGMENT_API_TOKEN='your-token'
export AUGMENT_API_URL='https://your-tenant.api.augmentcode.com/'

# Index a GitHub repository
export GITHUB_TOKEN='your-github-token'
npx context-connectors index github --owner myorg --repo myrepo -i my-project

# Index a BitBucket repository
export BITBUCKET_TOKEN='your-bitbucket-token'
npx context-connectors index bitbucket --workspace myworkspace --repo myrepo -i my-project

# Index a website
npx context-connectors index website --url https://docs.example.com -i my-docs
```

### 2\. 搜索

```bash
# Search and get an AI-generated answer (default)
npx context-connectors search "authentication logic" -i my-project

# Get raw search results without AI processing
npx context-connectors search "API routes" -i my-project --raw
```

### 3\. 互动代理

```bash
npx context-connectors agent -i my-project --provider openai
```

## CLI 命令

### `index` - 数据来源索引

```bash
context-connectors index <source> [options]
```

| 来源 | 说明 |
| --- | --- |
| `github` | 索引 a GitHub 仓库 |
| `gitlab` | GitLab 项目索引 |
| `bitbucket` | 索引 Bitbucket 存储器 |
| `website` | 浏览和索引网站 |

所有来源的共同备选方案:

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `-i, --index <name>` | 索引名称 | \- 说吧 |
| `--store <type>` | 存储类型 : `filesystem`, (中文(简体) ), `s3` | `filesystem` |
| `--store-path <path>` | 文件系统存储路径 | 平台专用 |

#### GitHub 特定选项

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `--owner <owner>` | 仓库所有人(需要) | \- 说吧 |
| `--repo <repo>` | 仓库名称( 需要) | \- 说吧 |
| `--ref <ref>` | 分支、标签或承诺 | `HEAD` |

#### GitLab 特定选项

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `--project <id>` | 项目ID或路径,例如, `group/project` (必须) | \- 说吧 |
| `--ref <ref>` | 分支、标签或承诺 | `HEAD` |
| `--gitlab-url <url>` | GitLab 基址( 用于自办) | `https://gitlab.com` |

#### BitBucket 特定选项

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `--workspace <slug>` | 工作空间弹片( 需要) | \- 说吧 |
| `--repo <repo>` | 仓库名称( 需要) | \- 说吧 |
| `--ref <ref>` | 分支、标签或承诺 | `HEAD` |
| `--bitbucket-url <url>` | Bitbucket 基址(用于服务器/数据中心) | `https://api.bitbucket.org/2.0` |

#### 特定网站选项

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `--url <url>` | 要爬行的网站 URL( 需要) | \- 说吧 |
| `--max-depth <n>` | 最大爬行深度 | `3` |
| `--max-pages <n>` | 要爬行的最大页面 | `100` |
| `--include <patterns...>` | 要包含的 URL 模式( glob) | \- 说吧 |
| `--exclude <patterns...>` | 要排除的 URL 模式( glob) | \- 说吧 |
| `--save-content <dir>` | \[调试\] 将已爬行的内容保存到目录 | \- 说吧 |

### `search` - 搜索索引内容

```bash
context-connectors search <query> [options]
```

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `-i, --index <spec>` | 索引光谱:名称,路径:/path;或 s3://bucket/key(需要) | \- 说吧 |
| `--raw` | 返回原始搜索结果而不是 AI 生成的答案 | `false` |
| `--max-chars <n>` | 最大输出字符( 只有 `--raw`(中文(简体) ) | \- 说吧 |

### `agent` - 交互式人工智能代理

```bash
context-connectors agent [query] [options]
```

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `-i, --index <specs...>` | 索引 spec(s):名称,路径:/path;或 s3://bucket/key(需要) | \- 说吧 |
| `--provider <name>` | LLM 提供者 : `openai`, (中文(简体) ), `anthropic`, (中文(简体) ), `google` (必须) | \- 说吧 |
| `--model <name>` | 要使用的模型 | 提供者默认 |
| `--max-steps <n>` | 最大代理步骤 | `10` |
| `-v, --verbose` | 显示工具调用 | `false` |
| `--search-only` | 禁用列表 文件/已读 文件工具 | `false` |
| `--print` | 非交互模式:打印响应和退出 | `false` |

提供者默认模式 :

-   `openai`数字 : `gpt-5-mini`
-   `anthropic`数字 : `claude-haiku-4-5`
-   `google`数字 : `gemini-3-flash-preview`

### `list` - 列出本地索引

```bash
context-connectors list [options]
```

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `--store-path <path>` | 存储基础路径 | `~/.augment/context-connectors` |

### `delete` - 删除本地索引

```bash
context-connectors delete <name> [options]
```

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `--store-path <path>` | 存储基础路径 | `~/.augment/context-connectors` |

### `mcp stdio` - 启动使用 stdio 传输的 MCP 服务器

```bash
context-connectors mcp stdio [options]
```

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `-i, --index <specs...>` | 索引 spec (s): 名称,路径:/path, 或 s3://bucket/ key | \- 说吧 |
| `--search-only` | 禁用文件操作 | `false` |

### `mcp http` - 启动使用 HTTP 传输的 MCP 服务器

为远程客户端启动一个可以通过HTTP访问的MCP服务器.

```bash
context-connectors mcp http [options]
```

| 选项 | 说明 | 默认 |
| --- | --- | --- |
| `-i, --index <specs...>` | 索引 spec (s): 名称,路径:/path, 或 s3://bucket/ key | \- 说吧 |
| `--port <number>` | 要监听的端口 | `3000` |
| `--host <host>` | 要绑定的主机 | `localhost` |
| `--cors <origins>` | CORS 起源(合并分离或 `*`(中文(简体) ) | \- 说吧 |
| `--base-path <path>` | MCP 端点的基础路径 | `/mcp` |
| `--api-key <key>` | 认证的 API 密钥 | \- 说吧 |
| `--store <type>` | 存储类型 : `filesystem`, (中文(简体) ), `s3` | `filesystem` |
| `--store-path <path>` | 存储基础路径 | 平台专用 |
| `--search-only` | 禁用文件操作 | `false` |

示例

```bash
# Start server on port 8080, allow any CORS origin
context-connectors mcp http -i my-project --port 8080 --cors "*"

# With authentication
context-connectors mcp http -i my-project --api-key "secret-key"

# Or use environment variable for the key
MCP_API_KEY="secret-key" context-connectors mcp http -i my-project
```

### 关于 `--search-only`

默认情况下,所有命令都提供 `list_files` 财务报告和审定财务报表 `read_file` 工具,除 `search`启用 `--search-only` 并仅提供 `search` 工具.

## 程序用途

### 基本索引编制

```typescript
import { Indexer } from "@augmentcode/context-connectors";
import { GitHubSource } from "@augmentcode/context-connectors/sources";
import { FilesystemStore } from "@augmentcode/context-connectors/stores";

const source = new GitHubSource({ owner: "myorg", repo: "myrepo" });
const store = new FilesystemStore({ basePath: ".context-connectors" });
const indexer = new Indexer();

const result = await indexer.index(source, store, "my-project");
console.log(`Indexed ${result.filesIndexed} files`);
```

### 搜索客户端

```typescript
import { SearchClient } from "@augmentcode/context-connectors";
import { FilesystemStore } from "@augmentcode/context-connectors/stores";

const store = new FilesystemStore({ basePath: ".context-connectors" });
const client = new SearchClient({ store, indexName: "my-project" });
await client.initialize(); // Required before calling search()

const result = await client.search("authentication");
console.log(result.results);
```

> **重要内容:** 你必须打电话 `await client.initialize()` 打电话前 `search()`。这可以加载索引状态,并为客户端的查询做好准备。 通话 `search()` 或者说 `getMetadata()` 在初始化之前,会丢出“ Client not irginized” 错误.

### MCP 服务器

```typescript
import { runMCPServer } from "@augmentcode/context-connectors";
import { FilesystemStore } from "@augmentcode/context-connectors/stores";

const store = new FilesystemStore({ basePath: ".context-connectors" });

await runMCPServer({
  store,
  indexName: "my-project",
});
```

### MCP HTTP 服务器

```typescript
import { runMCPHttpServer } from "@augmentcode/context-connectors";
import { FilesystemStore } from "@augmentcode/context-connectors/stores";

const store = new FilesystemStore({ basePath: ".context-connectors" });

const server = await runMCPHttpServer({
  store,
  indexName: "my-project",
  port: 3000,
  host: "0.0.0.0",
  cors: "*",
  apiKey: process.env.MCP_API_KEY,
});

console.log(`MCP server running at ${server.getUrl()}`);

// Graceful shutdown
process.on("SIGTERM", () => server.stop());
```

## 安全考虑

### MCP HTTP 服务器安全

远程 MCP 服务器使用 **没有 TLS 的 HTTP** 默认。 这对安全有重要影响:

⚠️ **API 密钥和所有数据以清晰文本传输** 当使用普通 HTTP 时。 这意味着任何能够观测网络流量(通过MITM攻击,网络嗅觉等)的人都可以捕捉到资质和数据.

#### 建议部署

**促进发展(仅当地主办)**

约束时 `localhost` (默认),交通 永远不会离开你的机器:

```bash
# Safe: localhost only (default)
context-connectors mcp http -i my-project --api-key "$MCP_API_KEY"
```

**用于生产:使用 TLS- 终结倒置代理**

将 MCP 服务器置于处理 TLS 的倒置代理服务器后. 以下是凯迪的例子( 自动获得证书):

```
# Caddyfile
mcp.yourdomain.com {
    reverse_proxy localhost:3000
}
```

然后在本地主机上运行 MCP 服务器 :

```bash
context-connectors mcp http -i my-project --api-key "$MCP_API_KEY" --port 3000
```

**替代品: nginx 带有加密**

```nginx
server {
    listen 443 ssl;
    server_name mcp.yourdomain.com;
    
    ssl_certificate /etc/letsencrypt/live/mcp.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/mcp.yourdomain.com/privkey.pem;
    
    location /mcp {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        
        # For SSE streaming
        proxy_buffering off;
        proxy_cache off;
    }
}
```

**替代品:SSH 隧道**

对于临时hoc远程访问,请使用SSH端口转发:

```bash
# On the server
context-connectors mcp http -i my-project --api-key "$MCP_API_KEY"

# On your local machine
ssh -L 3000:localhost:3000 user@server

# Now connect to localhost:3000 on your local machine
```

#### 网络隔离

如果 TLS 不可行, 请确保服务器在 :

-   一个没有公共互联网接入的私营VPC/网络
-   一个有防火墙限制访问的可信任的网络段
-   带有网络策略的 Docker 网络或 Kubernetes 集群

#### 认证

总是使用 API 密钥进行任何非本地主机部署 :

```bash
# Set via environment variable (recommended - avoids key in shell history)
export MCP_API_KEY="your-secure-random-key"
context-connectors mcp http -i my-project

# Or via command line option
context-connectors mcp http -i my-project --api-key "your-secure-random-key"
```

生成一个安全密钥 :

```bash
openssl rand -base64 32
```

## 克劳德桌面集成

添加到您的 Claude 桌面配置( E)`~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "my-project": {
      "command": "npx",
      "args": ["context-connectors", "mcp", "stdio", "-i", "my-project"],
      "env": {
        "AUGMENT_API_TOKEN": "your-token",
        "AUGMENT_API_URL": "https://your-tenant.api.augmentcode.com/"
      }
    }
  }
}
```

## 远程 MCP 客户端集成

这个 `mcp http` 命令使用 MCP 流式 HTTP 传输方式,在 HTTP 上显示您的索引数据。 任何MCP相容客户端都可以连接.

### 正在连接 MCP SDK

```typescript
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const transport = new StreamableHTTPClientTransport(
  new URL("http://localhost:3000/mcp"),
  {
    requestInit: {
      headers: {
        "Authorization": "Bearer your-api-key"
      }
    }
  }
);

const client = new Client({ name: "my-client", version: "1.0.0" });
await client.connect(transport);

// List available tools
const tools = await client.listTools();
console.log(tools);

// Call search tool
const result = await client.callTool("search", { query: "authentication" });
console.log(result);
```

### 用卷轴测试

```bash
# List tools
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# Call search tool
curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-api-key" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search","arguments":{"query":"authentication"}}}'
```

## GitHub 动作

每次按下自动索引 :

```yaml
name: Index Repository

on:
  push:
    branches: [main]

jobs:
  index:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: "20"

      - name: Index repository
        run: |
          npx @augmentcode/context-connectors index github \
            --owner ${{ github.repository_owner }} \
            --repo ${{ github.event.repository.name }} \
            --ref ${{ github.sha }} \
            -i ${{ github.ref_name }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          AUGMENT_API_TOKEN: ${{ secrets.AUGMENT_API_TOKEN }}
          AUGMENT_API_URL: ${{ secrets.AUGMENT_API_URL }}
```

## GitHub Webhook 集成

使用 GitHub webhooks 自动索引 profile 。 支持Vercel/Next.js,Express,以及自定义框架.

### Vercel / Next.js App 路由器

```typescript
// app/api/webhook/route.ts
import { createVercelHandler } from "@augmentcode/context-connectors/integrations/vercel";
import { S3Store } from "@augmentcode/context-connectors/stores";

const store = new S3Store({ bucket: process.env.INDEX_BUCKET! });

export const POST = createVercelHandler({
  store,
  secret: process.env.GITHUB_WEBHOOK_SECRET!,

  // Only index main branch
  shouldIndex: (event) => event.ref === "refs/heads/main",

  // Log results
  onIndexed: (key, result) => {
    console.log(`Indexed ${key}: ${result.filesIndexed} files`);
  },
});
```

### 快递

```typescript
import express from "express";
import { createExpressHandler } from "@augmentcode/context-connectors/integrations/express";
import { FilesystemStore } from "@augmentcode/context-connectors/stores";

const app = express();
const store = new FilesystemStore({ basePath: "./indexes" });

// Must use raw body for signature verification
app.post(
  "/webhook",
  express.raw({ type: "application/json" }),
  createExpressHandler({
    store,
    secret: process.env.GITHUB_WEBHOOK_SECRET!,
  })
);

app.listen(3000);
```

### 自定义框架

```typescript
import {
  createGitHubWebhookHandler,
  verifyWebhookSignature
} from "@augmentcode/context-connectors/integrations";
import { S3Store } from "@augmentcode/context-connectors/stores";

const store = new S3Store({ bucket: "my-indexes" });
const handler = createGitHubWebhookHandler({ store, secret: "..." });

// In your request handler:
async function handleRequest(req: Request) {
  const signature = req.headers.get("x-hub-signature-256")!;
  const eventType = req.headers.get("x-github-event")!;
  const body = await req.text();

  if (!await verifyWebhookSignature(body, signature, secret)) {
    return new Response("Unauthorized", { status: 401 });
  }

  const result = await handler(eventType, JSON.parse(body));
  return Response.json(result);
}
```

### GitHub 应用程序设置

1.  转到 **设置 > 开发者设置 > GitHub Apps > 新建 GitHub App**
2.  将 Webhook URL 设定为您的部署处理器
3.  生成并保存 Webhook 秘密
4.  设定 **仓库内容** 权限 **读取**
5.  订阅 **推开** 事件
6.  在您的仓库上安装应用程序

## 环境变量

| 变量 | 说明 | 所需时间 |
| --- | --- | --- |
| `AUGMENT_API_TOKEN` | 增加 API 令牌 | 所有业务 |
| `AUGMENT_API_URL` | 增强 API URL | 所有业务 |
| `GITHUB_TOKEN` | GitHub 访问符 | GitHub 来源 |
| `GITLAB_TOKEN` | GitLab 访问符 | GitLab 来源 |
| `BITBUCKET_TOKEN` | BitBucket 访问令牌 | BitBucket 源码 |
| `GITHUB_WEBHOOK_SECRET` | Webhook 签名秘密 | Webhook 整合 |
| `OPENAI_API_KEY` | OpenAI API 密钥 | 代理( openai 供应商) |
| `ANTHROPIC_API_KEY` | Anthropic API 键 | 代理人(慈善提供者) |
| `GOOGLE_API_KEY` | 谷歌 API 密钥 | 代理 (谷歌提供者) |
| `AWS_ACCESS_KEY_ID` | AWS 访问密钥 | S3 仓库 |
| `AWS_SECRET_ACCESS_KEY` | AWS 密钥 | S3 仓库 |
| `CC_S3_BUCKET` | S3 桶名称 | S3 仓库 |
| `CC_S3_ENDPOINT` | 自定义 S3 端点 URL( 用于 MinIO等) | S3 兼容存储 |
| `CC_S3_FORCE_PATH_STYLE` | 使用路径样式的 URL( S)`true`编号 :`false`(中文(简体) ) | S3 兼容存储 |
| `MCP_API_KEY` | MCP HTTP 服务器认证的 API 密钥 | MCP HTTP 服务器 |
| `CONTEXT_CONNECTORS_STORE_PATH` | 覆盖默认存储位置 | 可选 |

## 数据存储

默认情况下,索引存储于 `~/.augment/context-connectors/` 在所有的平台上.

此位置与其他增强的 CLI 状态一致 :

-   `~/.augment/session.json` - 认证
-   `~/.augment/settings.json` - 用户设置
-   `~/.augment/rules/` - 用户规则
-   `~/.augment/agents/` - 用户定义的代理
-   `~/.augment/commands/` - 自定义命令

覆盖 `--store-path` 或 `CONTEXT_CONNECTORS_STORE_PATH` 环境变量.

## 建筑

```
Sources → Indexer → Stores → Clients
```

-   **来源**: 从数据源获取文件( GitHub, GitLab, BitBucket, Website)
-   **索引器**: Orchestrates 使用 Augment 上下文引擎索引
-   **存储**: 持久性指数状态(Filesystem, S3)
-   **客户**: 控制索引( CLI, Agent, MCP 服务器通过 stdio 或 HTTP)

## 过滤

文件根据 :

1.  `.augmentignore` - 自定义忽略模式(最高优先级)
2.  内建过滤器 - 二进制文件、大文件、生成代码、机密
3.  `.gitignore` - 标准基特忽略模式

创建一个 `.augmentignore` 要自定义的文件 :

```
# Ignore test fixtures
tests/fixtures/

# Ignore generated docs
docs/api/

# Ignore specific files
config.local.json
```

> **说明:** 这个 `.augmentignore` 文件必须放在 **源根目录** (路径传递到添加命令),而不是当前工作目录.

## 网站来源

网站源会爬行并索引静态的HTML内容.

### 限制

-   **JavaScript 递归的内容不支持.** 只有静态的 HTML 被爬行 。 需要JavaScript渲染内容的单页应用程序(SPA)或页面将不会被完全索引.
-   仅基于链接的爬行 - 页面必须能够从起始的 URL 通过链接被发现 .

## S3-可兼容存储

当使用MinIO, DigitalOcean Spaces 或 Backflaze B2 等S3兼容服务时,通过环境变量配置:

```bash
export CC_S3_BUCKET=my-bucket
export CC_S3_ENDPOINT=http://localhost:9000
export CC_S3_FORCE_PATH_STYLE=true
export AWS_ACCESS_KEY_ID=minioadmin
export AWS_SECRET_ACCESS_KEY=minioadmin

npx context-connectors index github --owner myorg --repo myrepo -i my-project --store s3
```

| 环境变量 | 说明 |
| --- | --- |
| `CC_S3_BUCKET` | S3 桶名称 |
| `CC_S3_ENDPOINT` | 自定义 S3 端点 URL |
| `CC_S3_FORCE_PATH_STYLE` | 使用路径样式的 URL( S)`true`编号 :`false`,为MINIO和大多数S3兼容服务需要) |

## 许可证

麻省理工学院

## 常见问题

### @augmentcode/context-connectors 是什么？

用于索引任何数据源并通过Augment上下文引擎使其可以搜索的模块系统

### 如何安装 @augmentcode/context-connectors？

在项目目录运行 npm install @augmentcode/context-connectors，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ctxc，可以用 npx ctxc 直接运行。

### @augmentcode/context-connectors 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @augmentcode/context-connectors 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### @augmentcode/context-connectors 可以商用吗？

@augmentcode/context-connectors 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @augmentcode/context-connectors 的下载量有多少？

根据 npm 官方下载统计，@augmentcode/context-connectors 在 2026/10/07 – 2026/11/05 这 30 天内被下载 1,864 次，日均约 62 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @augmentcode/context-connectors 还在维护吗？

最新版本 0\.1\.4 发布于 2026/02/11（8 个月前）；至今共发布 4 个版本，其中过去 12 个月发布了 4 个；首次发布于 2026/01/14。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

