connect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseConnect
连接
Connect Codex to any app using the Composio CLI. Stop generating text about what you could do - actually do it from the shell.
使用Composio CLI将Codex连接至任意应用。别再生成关于操作的描述文本——直接在Shell中执行实际操作。
When to Use This Skill
何时使用该Skill
Use this skill when you need Codex to:
- Send that email instead of drafting it
- Create that issue instead of describing it
- Post that message instead of suggesting it
- Update that database instead of explaining how
当你需要Codex完成以下操作时,使用该Skill:
- 直接发送邮件而非草拟邮件
- 直接创建工单而非描述工单
- 直接发布消息而非建议发布内容
- 直接更新数据库而非解释操作步骤
What Changes
差异对比
| Without Connect | With Connect |
|---|---|
| "Here's a draft email..." | Sends the email |
| "You should create an issue..." | Creates the issue |
| "Post this to Slack..." | Posts it |
| "Add this to Notion..." | Adds it |
| 未使用Connect | 使用Connect |
|---|---|
| "这是一封草拟的邮件..." | 直接发送邮件 |
| "你应该创建一个工单..." | 直接创建工单 |
| "把这个发布到Slack..." | 直接发布内容 |
| "把这个添加到Notion..." | 直接添加内容 |
Supported Apps
支持的应用
1000+ integrations including:
- Email: Gmail, Outlook, SendGrid
- Chat: Slack, Discord, Teams, Telegram
- Dev: GitHub, GitLab, Jira, Linear
- Docs: Notion, Google Docs, Confluence
- Data: Sheets, Airtable, PostgreSQL
- CRM: HubSpot, Salesforce, Pipedrive
- Storage: Drive, Dropbox, S3
- Social: Twitter, LinkedIn, Reddit
1000+集成服务包括:
- 邮件类: Gmail、Outlook、SendGrid
- 聊天类: Slack、Discord、Teams、Telegram
- 开发类: GitHub、GitLab、Jira、Linear
- 文档类: Notion、Google Docs、Confluence
- 数据类: Sheets、Airtable、PostgreSQL
- CRM类: HubSpot、Salesforce、Pipedrive
- 存储类: Drive、Dropbox、S3
- 社交类: Twitter、LinkedIn、Reddit
Setup
配置步骤
1. Install the Composio CLI
1. 安装Composio CLI
bash
curl -fsSL https://composio.dev/install | bashbash
curl -fsSL https://composio.dev/install | bash2. Log In
2. 登录账号
bash
composio login
composio whoamiThis opens a browser for authentication and lets you pick your default org and project. Use to skip prompts in automated flows.
-ybash
composio login
composio whoami此命令会打开浏览器进行身份验证,让你选择默认组织和项目。在自动化流程中可使用参数跳过提示。
-y3. Link the Toolkits You Need
3. 关联所需工具包
bash
composio link github
composio link gmail
composio link slackEach command walks through OAuth once, then the connection persists.
Done. Codex can now drive any connected app from the shell.
bash
composio link github
composio link gmail
composio link slack每个命令会引导完成一次OAuth验证,验证完成后连接将持续生效。
配置完成。现在Codex可通过Shell驱动任意已连接的应用。
Core Workflow
核心工作流
- Know the tool slug? →
composio execute - Don't know the slug? →
composio search - Need clarification on inputs? → or
composio execute --get-schema--dry-run - Toolkit not connected? → and retry
composio link <toolkit> - Multiple steps needed? → for workflows,
composio runfor raw API callscomposio proxy
- 知道工具标识? → 执行
composio execute - 不知道工具标识? → 执行
composio search - 需要明确输入参数? → 执行或
composio execute --get-schema--dry-run - 未连接工具包? → 执行后重试
composio link <toolkit> - 需要多步骤操作? → 使用执行工作流,使用
composio run调用原始APIcomposio proxy
Examples
示例
Discover a Tool
查找工具
bash
composio search "create a github issue"
composio search "send an email" --toolkits gmailbash
composio search "create a github issue"
composio search "send an email" --toolkits gmailInspect Inputs Before Calling
调用前检查输入参数
bash
composio tools info GITHUB_CREATE_ISSUE
composio execute GITHUB_CREATE_ISSUE --get-schema
composio execute GITHUB_CREATE_ISSUE --dry-run -d '{"owner":"acme","repo":"app","title":"Bug"}'bash
composio tools info GITHUB_CREATE_ISSUE
composio execute GITHUB_CREATE_ISSUE --get-schema
composio execute GITHUB_CREATE_ISSUE --dry-run -d '{"owner":"acme","repo":"app","title":"Bug"}'Send an Email
发送邮件
bash
composio execute GMAIL_SEND_EMAIL -d '{
"recipient_email": "sarah@acme.com",
"subject": "Shipped!",
"body": "v2.0 is live, let me know if issues"
}'bash
composio execute GMAIL_SEND_EMAIL -d '{
"recipient_email": "sarah@acme.com",
"subject": "已发布!",
"body": "v2.0已上线,如有问题请告知"
}'Create a GitHub Issue
创建GitHub工单
bash
composio execute GITHUB_CREATE_ISSUE -d '{
"owner": "my-org",
"repo": "repo",
"title": "Mobile timeout bug",
"labels": ["bug"]
}'bash
composio execute GITHUB_CREATE_ISSUE -d '{
"owner": "my-org",
"repo": "repo",
"title": "移动端超时bug",
"labels": ["bug"]
}'Post to Slack
发布Slack消息
bash
composio execute SLACK_SEND_MESSAGE -d '{
"channel": "engineering",
"text": "Deploy complete - v2.4.0 live"
}'bash
composio execute SLACK_SEND_MESSAGE -d '{
"channel": "engineering",
"text": "部署完成 - v2.4.0已上线"
}'Run Calls in Parallel
并行执行调用
bash
composio execute --parallel \
GMAIL_FETCH_EMAILS -d '{"max_results": 2}' \
GITHUB_GET_THE_AUTHENTICATED_USER -d '{}'bash
composio execute --parallel \
GMAIL_FETCH_EMAILS -d '{"max_results": 2}' \
GITHUB_GET_THE_AUTHENTICATED_USER -d '{}'Chain Actions with composio run
composio run使用composio run
串联操作
composio runbash
composio run '
const issues = await search("github issues labeled bug this week");
const summary = issues.map(i => `- ${i.title}`).join("\n");
await execute("SLACK_SEND_MESSAGE", {
channel: "bugs",
text: `This week’s bugs:\n${summary}`
});
'Load reusable workflows from a file:
bash
composio run --file ./workflow.ts -- --repo composiohq/composiobash
composio run '
const issues = await search("github issues labeled bug this week");
const summary = issues.map(i => `- ${i.title}`).join("\n");
await execute("SLACK_SEND_MESSAGE", {
channel: "bugs",
text: `本周bug汇总:\n${summary}`
});
'从文件加载可复用工作流:
bash
composio run --file ./workflow.ts -- --repo composiohq/composioRaw API Access (proxy
)
proxy原始API访问(proxy
)
proxyWhen no dedicated tool exists, hit the authenticated API directly:
bash
composio proxy https://gmail.googleapis.com/gmail/v1/users/me/profile \
--toolkit gmail
composio proxy https://gmail.googleapis.com/gmail/v1/users/me/drafts \
--toolkit gmail -X POST -H 'content-type: application/json' \
-d '{"message":{"raw":"..."}}'当没有专用工具时,直接调用已验证的API:
bash
composio proxy https://gmail.googleapis.com/gmail/v1/users/me/profile \
--toolkit gmail
composio proxy https://gmail.googleapis.com/gmail/v1/users/me/drafts \
--toolkit gmail -X POST -H 'content-type: application/json' \
-d '{"message":{"raw":"..."}}'How It Works
工作原理
- You ask Codex to do something
- Codex picks a slug via or prior knowledge
composio search - CLI checks connection, prompts if missing
composio link - Action executes against the real API and returns JSON to stdout
- 你发起请求:要求Codex执行某项操作
- Codex选择标识:通过或已有知识确定工具标识
composio search - CLI检查连接:如果未连接,提示执行
composio link - 执行操作:调用真实API执行操作,并将JSON结果返回至标准输出
Configuration
配置选项
Global flags:
--log-level <all|trace|debug|info|warning|error|fatal|none>- for per-command docs
--help
Environment variables:
- - auth credential (set for non-interactive use)
COMPOSIO_API_KEY - - custom API endpoint
COMPOSIO_BASE_URL - - override artifact storage
COMPOSIO_SESSION_DIR - - opt out of telemetry
COMPOSIO_DISABLE_TELEMETRY=true
全局标志:
--log-level <all|trace|debug|info|warning|error|fatal|none>- :查看各命令文档
--help
环境变量:
- :身份验证凭证(非交互式场景设置)
COMPOSIO_API_KEY - :自定义API端点
COMPOSIO_BASE_URL - :覆盖产物存储路径
COMPOSIO_SESSION_DIR - :选择退出遥测
COMPOSIO_DISABLE_TELEMETRY=true
Type-Safe SDK (Optional)
类型安全SDK(可选)
Generate typed client code when you want to call tools from an app rather than the shell:
bash
composio generate ts # TypeScript types
composio generate py # Python typesFlags: , , , , .
-o <dir>--toolkits <list>--compact--transpiled--type-tools当你需要从应用而非Shell调用工具时,生成类型化客户端代码:
bash
composio generate ts # TypeScript类型定义
composio generate py # Python类型定义可选标志:、、、、。
-o <dir>--toolkits <list>--compact--transpiled--type-toolsTroubleshooting
故障排查
- → run
Not logged incomposio login - → run
Connection required for <toolkit>composio link <toolkit> - Unknown slug → or
composio search "<what you want>"composio tools list <toolkit> - Bad inputs → then
composio execute <SLUG> --get-schema--dry-run - Action failed → check permissions in the target app
Full reference: docs.composio.dev/docs/cli
<p align="center"> <b>Join 20,000+ developers building agents that ship</b> </p> <p align="center"> <a href="https://platform.composio.dev/?utm_source=Github&utm_content=AwesomeSkills"> <img src="https://img.shields.io/badge/Get_Started_Free-4F46E5?style=for-the-badge" alt="Get Started"/> </a> </p>
- → 执行
Not logged incomposio login - → 执行
Connection required for <toolkit>composio link <toolkit> - 未知标识 → 执行或
composio search "<你要执行的操作>"composio tools list <toolkit> - 输入参数错误 → 先执行,再用
composio execute <SLUG> --get-schema测试--dry-run - 操作失败 → 检查目标应用中的权限设置
完整参考文档:docs.composio.dev/docs/cli
<p align="center"> <b>加入20000+开发者行列,构建可落地的Agent</b> </p> <p align="center"> <a href="https://platform.composio.dev/?utm_source=Github&utm_content=AwesomeSkills"> <img src="https://img.shields.io/badge/Get_Started_Free-4F46E5?style=for-the-badge" alt="Get Started"/> </a> </p>