Loading...
Loading...
Compare original and translation side by side
| Goal | Command |
|---|---|
| Search repos | |
| Search code | |
| Search issues | |
| Search PRs | |
| 目标 | 命令 |
|---|---|
| 搜索仓库 | |
| 搜索代码 | |
| 搜索议题 | |
| 搜索拉取请求 | |
gh search reposundefinedgh search reposundefined
**Example - Multi-language with exclusions:**
```bash
gh api "search/repositories?q=$(printf '%s' 'stars:>500 language:rust language:go language:TypeScript language:javascript -topic:ethereum -topic:cryptocurrency -topic:blockchain -topic:bitcoin -topic:web3' | jq -sRr @uri)&sort=updated&per_page=10" --jq '.items[].full_name'gh search reposgh api search/repositories| Output | jq filter |
|---|---|
| Names only | |
| Full names | |
| With stars | |
| URLs | |
| Full JSON | (omit --jq) |
**示例 - 多语言并排除指定主题:**
```bash
gh api "search/repositories?q=$(printf '%s' 'stars:>500 language:rust language:go language:TypeScript language:javascript -topic:ethereum -topic:cryptocurrency -topic:blockchain -topic:bitcoin -topic:web3' | jq -sRr @uri)&sort=updated&per_page=10" --jq '.items[].full_name'gh search reposgh api search/repositories| 输出内容 | jq过滤器 |
|---|---|
| 仅名称 | |
| 完整名称 | |
| 带星标数量 | |
| 仓库URL | |
| 完整JSON数据 | (省略--jq参数) |
gh search reposundefinedgh search reposundefined
**Output formats:**
```bash
--json name,url,description,stargazersCount # JSON output
--web # Open in browser
**输出格式:**
```bash
--json name,url,description,stargazersCount # JSON格式输出指定字段
--web # 在浏览器中打开结果gh search codeundefinedgh search codeundefined
**Pro tip:** Combine with repo filter for focused results:
```bash
gh search code "pattern" repo:owner/repo
**专业提示:** 结合仓库过滤器获取精准结果:
```bash
gh search code "pattern" repo:owner/repogh search issuesgh search prsundefinedgh search issuesgh search prsundefinedundefinedundefined| Qualifier | Example | Description |
|---|---|---|
| | Star count |
| | Fork count |
| | Primary language |
| | Repository topic |
| | Exclude topic |
| | Last push date |
| | Creation date |
| | License type |
| | Archive status |
| | Visibility |
| 限定符 | 示例 | 说明 |
|---|---|---|
| | 星标数量 |
| | 复刻数量 |
| | 仓库主语言 |
| | 仓库主题 |
| | 排除指定主题 |
| | 最后推送日期 |
| | 仓库创建日期 |
| | 许可证类型 |
| | 归档状态 |
| | 仓库可见性 |
| Qualifier | Example | Description |
|---|---|---|
| | File extension |
| | File path |
| | Specific repo |
| | Code language |
| | File name |
| 限定符 | 示例 | 说明 |
|---|---|---|
| | 文件扩展名 |
| | 文件路径 |
| | 指定仓库 |
| | 代码语言 |
| | 文件名 |
| Flag | Description |
|---|---|
| Number of results (max 1000) |
| Sort by: stars, forks, updated, best-match |
| asc or desc |
| JSON output with specific fields |
| Open results in browser |
| 参数 | 说明 |
|---|---|
| 结果数量上限(最大1000) |
| 排序依据:stars、forks、updated、best-match |
| 排序顺序:升序(asc)或降序(desc) |
| 以JSON格式输出指定字段 |
| 在浏览器中打开结果 |
gh search repos "language:X stars:>500" --sort=stars --limit=50gh search repos "language:X stars:>500" --sort=stars --limit=50gh search code "import Y" extension:ts --limit=30
gh search code "from Y import" extension:py --limit=30gh search code "import Y" extension:ts --limit=30
gh search code "from Y import" extension:py --limit=30gh search repos "topic:Z -topic:cryptocurrency -topic:blockchain -topic:web3"gh search repos "topic:Z -topic:cryptocurrency -topic:blockchain -topic:web3"gh search repos "language:go pushed:>2024-06-01 stars:>100" --sort=updatedgh search repos "language:go pushed:>2024-06-01 stars:>100" --sort=updatedgh search repos "stars:>500"language:rust language:go--json--json name,url,stargazersCountpushed:2024-01-01..2024-06-01stars:100..500gh apigh search reposgh api search/repositories?q=...gh search repos "stars:>500"language:rust language:go--json--json name,url,stargazersCountpushed:2024-01-01..2024-06-01stars:100..500gh apigh search reposgh api search/repositories?q=...