Greptile

AI 驱动的代码库搜索与问答

配置

查询

操作
查询
Greptile API 密钥*
••••••••
GitHub 令牌*
••••••••
查询*
询问有关代码库的问题...
仓库*
owner/repo, github:main:owner/repo (逗号分隔)
会话 ID
可选的会话 ID,用于保持对话连续性
天才模式
Disabled
查询 (greptile_query)

使用自然语言查询仓库,并获得带有相关代码引用的答案。Greptile 使用 AI 理解您的代码库并回答问题。

输入
参数类型必需描述
query字符串是关于代码库的自然语言问题
repositories字符串是逗号分隔的仓库列表。格式:"github:branch:owner/repo" 或 "owner/repo" (默认为 github:main)
sessionId字符串否用于保持对话连续性的会话 ID
genius布尔值否启用天才模式以进行更彻底的分析 (速度较慢但更准确)
apiKey字符串是Greptile API 密钥
githubToken字符串是具有仓库读取权限的 GitHub 个人访问令牌
输出
参数类型描述
messagestringAI 生成的查询答案
sourcesarray支持该答案的相关代码引用

索引仓库

操作
索引仓库
Greptile API 密钥*
••••••••
GitHub 令牌*
••••••••
Git 远程
GitHub
仓库*
owner/repo
分支*
main
强制重新索引
Disabled
邮件通知
Disabled
索引仓库 (greptile_index_repo)

向 Greptile 提交仓库以进行索引。必须完成索引后才能查询该仓库。小型仓库需要 3-5 分钟,较大的仓库可能需要超过一小时。

输入
参数类型必填描述
remotestring是Git 远程类型:github 或 gitlab
repositorystring是仓库,格式为 owner/repo (例如 "facebook/react")
branchstring是要索引的分支 (例如 "main" 或 "master")
reloadboolean否即使已索引也强制重新索引
notifyboolean否索引完成时发送邮件通知
apiKeystring是Greptile API 密钥
githubTokenstring是具有仓库读取权限的 GitHub 个人访问令牌
输出
参数类型说明
repositoryIdstring已索引仓库的唯一标识符(格式:remote:branch:owner/repo)
statusEndpointstring用于检查索引状态的 URL 端点
messagestring索引操作的状态消息

检查状态

操作
检查状态
Greptile API 密钥*
••••••••
GitHub 令牌*
••••••••
Git 远程
GitHub
仓库*
owner/repo
分支*
main
检查状态(greptile_status)

检查仓库的索引状态。可用它确认仓库是否已准备好接受查询,或监控索引进度。

输入
参数类型必填说明
remotestring是Git 远程类型:github 或 gitlab
repositorystring是采用 owner/repo 格式的仓库(例如 “facebook/react”)
branchstring是分支名称(例如 “main” 或 “master”)
apiKeystring是Greptile API 密钥
githubTokenstring是具有仓库读取权限的 GitHub 个人访问令牌
输出
参数类型描述
repositorystring仓库名称 (owner/repo)
remotestringGit 远程仓库 (github/gitlab)
branchstring分支名称
privateboolean仓库是否为私有
statusstring索引状态:submitted、cloning、processing、completed 或 failed
filesProcessednumber已处理的文件数量
numFilesnumber仓库中的文件总数
sampleQuestionsarray已索引仓库的示例问题
shastring已索引版本的 Git 提交 SHA

使用说明

使用 Greptile 以自然语言查询和搜索代码库。获取关于代码的 AI 生成答案,查找相关文件,并理解复杂的代码库。

注意事项

  • 类别:tools
  • 类型:greptile