Manage project items (issues, pull requests, and draft issues).
ghx item <command> [arguments] [flags]The item command group provides comprehensive item management for GitHub Projects. Items can be existing issues, pull requests, or draft issues created directly in the project.
| Command | Description |
|---|---|
list |
List items in a repository or project |
view |
View item details |
add |
Add item to project |
add-bulk |
Add multiple items at once |
edit |
Edit item field values |
remove |
Remove item from project |
update-bulk |
Update multiple items at once |
List issues and pull requests.
ghx item list <owner/repo> [flags]| Flag | Description | Default |
|---|---|---|
--state |
Filter by state (open, closed, all) | all |
--type |
Filter by type (issue, pr) | - |
--label |
Filter by label | - |
--assignee |
Filter by assignee | - |
--milestone |
Filter by milestone | - |
-L, --limit |
Maximum number of items | 30 |
--format |
Output format (table, json) | table |
# List all items
ghx item list myorg/repo
# List open issues only
ghx item list myorg/repo --state open --type issue
# Filter by label
ghx item list myorg/repo --label bug
# Filter by assignee
ghx item list myorg/repo --assignee octocatView details of an issue or pull request.
ghx item view <item-ref> [flags]<item-ref>- Item reference in formatowner/repo#number
| Flag | Description | Default |
|---|---|---|
--format |
Output format (table, json) | table |
--comments |
Include comments | false |
# View issue
ghx item view myorg/repo#123
# View with comments
ghx item view myorg/repo#123 --comments
# JSON output
ghx item view myorg/repo#123 --format jsonAdd an item to a project.
ghx item add <project-ref> <item-ref> [flags]
ghx item add <project-ref> --draft --title <title> [flags]<project-ref>- Project reference in formatowner/number<item-ref>- Item reference in formatowner/repo#number(for existing items)
| Flag | Description |
|---|---|
--draft |
Create a draft issue |
--title |
Draft issue title |
--body |
Draft issue body |
# Add existing issue to project
ghx item add myorg/123 myorg/repo#42
# Add pull request to project
ghx item add myorg/123 myorg/repo#100
# Create draft issue in project
ghx item add myorg/123 --draft --title "New Task" --body "Task description"Add multiple items to a project at once.
ghx item add-bulk <project-ref> [flags]| Flag | Description |
|---|---|
--items |
Comma-separated list of item references |
--file |
File with item references (one per line) |
--query |
GitHub search query to find items |
# Add multiple items
ghx item add-bulk myorg/123 --items "repo#1,repo#2,repo#3"
# Add from file
ghx item add-bulk myorg/123 --file items.txt
# Add items matching search query
ghx item add-bulk myorg/123 --query "is:issue label:priority-high"Edit item field values in a project.
ghx item edit <project-ref> <item-id> [flags]| Flag | Description |
|---|---|
--field |
Field name to update |
--value |
New value for the field |
# Set status field
ghx item edit myorg/123 PVTI_xxx --field Status --value "In Progress"
# Set priority field
ghx item edit myorg/123 PVTI_xxx --field Priority --value High
# Set date field
ghx item edit myorg/123 PVTI_xxx --field "Due Date" --value "2024-01-31"Remove an item from a project.
ghx item remove <project-ref> <item-id> [flags]| Flag | Description |
|---|---|
--force |
Skip confirmation prompt |
# Remove with confirmation
ghx item remove myorg/123 PVTI_xxx
# Remove without confirmation
ghx item remove myorg/123 PVTI_xxx --forceUpdate multiple project items at once.
ghx item update-bulk <project-ref> [flags]| Flag | Description |
|---|---|
--items |
Comma-separated list of item IDs |
--field |
Field name to update |
--value |
New value for the field |
--filter |
Filter items to update |
# Update multiple items
ghx item update-bulk myorg/123 --items "id1,id2,id3" --field Status --value Done
# Update items matching filter
ghx item update-bulk myorg/123 --filter "Status:Todo" --field Status --value "In Progress"ghx-cli supports multiple formats for referencing items:
| Format | Example | Description |
|---|---|---|
owner/repo#number |
myorg/repo#42 |
Standard reference |
repo#number |
repo#42 |
Repo in current org |
#number |
#42 |
Issue in current repo |
| GitHub URL | https://github.com/myorg/repo/issues/42 |
Full URL |