Manage custom fields in GitHub Projects.
ghx field <command> [arguments] [flags]The field command group provides comprehensive field management for GitHub Projects. Fields allow you to track additional metadata for project items with support for various data types.
| Type | Description | Example Values |
|---|---|---|
text |
Free-form text | "Implementation notes" |
number |
Numeric values | 5, 3.14, -10 |
date |
Date values | 2024-01-31 |
single_select |
Single choice from options | "High", "Medium", "Low" |
iteration |
Sprint/iteration cycles | "Sprint 1", "Sprint 2" |
| Command | Description |
|---|---|
list |
List project fields |
create |
Create a new field |
update |
Update field properties |
delete |
Delete a field |
add-option |
Add option to single select field |
update-option |
Update single select option |
delete-option |
Delete single select option |
List fields in a project.
ghx field list <project-ref> [flags]| Flag | Description | Default |
|---|---|---|
--format |
Output format (table, json) | table |
# List all fields
ghx field list myorg/123
# JSON output
ghx field list myorg/123 --format jsonCreate a new project field.
ghx field create <project-ref> <name> <type> [flags]<project-ref>- Project reference in formatowner/number<name>- Field name<type>- Field type (text, number, date, single_select, iteration)
| Flag | Description |
|---|---|
--options |
Comma-separated options (for single_select) |
--description |
Field description |
# Create text field
ghx field create myorg/123 "Notes" text
# Create number field
ghx field create myorg/123 "Story Points" number
# Create date field
ghx field create myorg/123 "Due Date" date
# Create single select field
ghx field create myorg/123 "Priority" single_select --options "Critical,High,Medium,Low"
# Create iteration field
ghx field create myorg/123 "Sprint" iterationUpdate field properties.
ghx field update <field-id> [flags]| Flag | Description |
|---|---|
--name |
New field name |
--description |
New description |
# Rename field
ghx field update PVTF_xxx --name "New Priority"
# Update description
ghx field update PVTF_xxx --description "Task priority level"Delete a project field.
ghx field delete <field-id> [flags]| Flag | Description |
|---|---|
--force |
Skip confirmation prompt |
# Delete with confirmation
ghx field delete PVTF_xxx
# Delete without confirmation
ghx field delete PVTF_xxx --forceAdd an option to a single select field.
ghx field add-option <field-id> <option-name> [flags]| Flag | Description |
|---|---|
--color |
Option color (e.g., red, blue, green) |
--description |
Option description |
# Add basic option
ghx field add-option PVTF_xxx "Critical"
# Add option with color
ghx field add-option PVTF_xxx "Urgent" --color red
# Add option with description
ghx field add-option PVTF_xxx "Blocked" --color yellow --description "Waiting for dependencies"Update a single select field option.
ghx field update-option <field-id> <option-id> [flags]| Flag | Description |
|---|---|
--name |
New option name |
--color |
New option color |
--description |
New description |
# Rename option
ghx field update-option PVTF_xxx OPT_xxx --name "Very High"
# Change color
ghx field update-option PVTF_xxx OPT_xxx --color purpleDelete a single select field option.
ghx field delete-option <field-id> <option-id> [flags]| Flag | Description |
|---|---|
--force |
Skip confirmation prompt |
# Delete option
ghx field delete-option PVTF_xxx OPT_xxx --forceFor single select options, these colors are available:
| Color | Preview |
|---|---|
gray |
Default |
red |
High priority |
orange |
Warning |
yellow |
Attention |
green |
Success |
blue |
Info |
purple |
Special |
pink |
Highlight |