Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KOBA789/gh-sql
Query GitHub Projects with SQL
https://github.com/KOBA789/gh-sql
cli gh-extension github github-projects sql
Last synced: 29 days ago
JSON representation
Query GitHub Projects with SQL
- Host: GitHub
- URL: https://github.com/KOBA789/gh-sql
- Owner: KOBA789
- Created: 2021-12-20T19:28:00.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-19T05:59:30.000Z (over 1 year ago)
- Last Synced: 2024-08-03T21:02:31.536Z (4 months ago)
- Topics: cli, gh-extension, github, github-projects, sql
- Language: Rust
- Homepage:
- Size: 474 KB
- Stars: 124
- Watchers: 4
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-gh-cli-extensions - **sql** - Query GitHub Projects (beta) with SQL. (Github)
- jimsghstars - KOBA789/gh-sql - Query GitHub Projects with SQL (Rust)
README
# `gh-sql`: Query GitHub Projects (beta) with SQL
![](./docs/demo.png)
## Installation
```
gh extension install KOBA789/gh-sql
```## Features
- `SELECT` items
- `DELETE` items
- `UPDATE` item fields
- You can not modify `Title`, `Assignees`, `Labels`, `Milestone`, or `Repository`## Usage
```
USAGE:
gh-sql [OPTIONS]FLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-e, --execute SQL statement to execute
-o, --output "table", "json" or these initial [default: table]ARGS:
```### eg. JSON output in non-interactive execution
- `-oj`: output as json
- `-e`: non-interactive mode```bash
gh sql YOUR_NAME YOUR_PROJECT_NUMBER -oj -e 'select * from items;'
```### eg. Make task list in markdown
Of course, you can also pipe it to `jq`.
```bash
gh sql YOUR_NAME YOUR_PROJECT_NUMBER -oj -e 'select * from items where Repository is not null;' | \
jq -r '"- " + .Repository + "#" + (.Issue | tostring)'
```