Skip to main content
Work items are the core executable unit in OpenIndex. The oi work-item command group covers the full lifecycle: listing, creating, updating, transitioning through workflow stages, scheduling, collaborating via comments, and managing attachments, dependencies, and custom fields.

List and get

oi work-item list [flags]
oi work-item get <key>
oi work-item agent-context <key>
oi work-item hierarchy <key>
oi work-item delete <key>
agent-context returns the agent-oriented workflow bundle for a work item. In --json mode it returns the full backend payload from /browse/:key/agent-context. In human mode it summarises the current goal, allowed exits, blocked exits, and required fields.

List filters

FlagDescription
--keyFilter by work item key
--kindproject, task, or sub_task
--domain-idFilter by domain
--owner-user-idFilter by owner user ID
--assigned-to-metrue or false
--personal-onlytrue or false
--parent-keyParent key (aliases: --project-key, --task-key)
--workflow-idFilter by workflow
--statusFilter by status
--priorityFilter by priority
--execution-targethuman, agent, or either
--active-agent-idFilter by active agent ID (supports none)
--resolutionunresolved, resolved, or cancelled
--resolved-afterRFC3339 timestamp
--schedule-granularitynone, date, or datetime
--searchFull-text search

Create

oi work-item create --kind <project|task|sub_task> --title <text> [flags]
FlagDescription
--domain-idDomain to create the item in
--parent-keyParent work item key (aliases: --project-key, --task-key)
--workflow-idWorkflow to assign
--descriptionItem description
--statusInitial status
--priorityInitial priority
--execution-targethuman or agent
--owner-user-idOwner user ID
--assignee-user-idAssignee user ID
--objective-stateObjective state value

Update

oi work-item update <key> [flags]
FlagDescription
--titleNew title
--descriptionNew description
--statusNew status
--priorityNew priority
--workflow-idReassign workflow
--execution-targethuman or agent
--owner-user-idNew owner user ID
--assignee-user-idNew assignee user ID
--resolutionunresolved, resolved, or cancelled
--active-agent-idSet active agent ID
--clear-agentClear the active agent field
--errorSet error message
--attemptSet attempt counter

Claim and complete

oi work-item claim <key> --to-status <status> [--agent-id <id>]
oi work-item complete <key> --to-status <status> [--agent-id <id>]
oi work-item done <key> [--to-stage <stage>]
  • claim requires a valid workflow transition from the current status.
  • complete requires a valid transition to a terminal status, clears active agent fields, and marks the item as resolved.
  • done auto-progresses through valid stage gates to a completion stage (completed by default).
If complete fails because the target status is not terminal, the CLI suggests oi work-item progress --to-stage ... as a next step.

Progress through stage gates

Use progress to advance a work item through a workflow stage gate:
oi work-item progress <key> --stage-gate-key <gate-key> [flags]
oi work-item progress <key> --to-stage <stage-key> [flags]
FlagDescription
--stage-gate-keyExplicit gate key from transitions output
--to-stageResolve gate from current availableStageGates
--accept-requirements-textRequired when gate requirements mode is text
--checked-requirement-itemRepeat for each completed checklist requirement
--noteOptional audit note

Transitions

Inspect valid transitions and available stage gates for a work item:
oi work-item transitions <key>
Always run this before claim, complete, or progress when you are unsure of the allowed next states.

Schedule placement

oi work-item schedule <key> --date <YYYY-MM-DD>
oi work-item schedule <key> --start <RFC3339> --end <RFC3339>
oi work-item schedule <key> --clear
FormSchedule granularity
--dateDate-only (scheduleGranularity: date)
--start + --endTimed (scheduleGranularity: datetime)
--clearReturns item to backlog (scheduleGranularity: none)

Hierarchy

oi work-item hierarchy <key>
Returns the full parent/child hierarchy for a work item, including its domain, project, task, and sub-task relationships.

Comments

oi work-item comment list <key>
oi work-item comment create <key> --body <text> [--visibility internal|external]
oi work-item comment update <key> --comment-id <id> --body <text>
oi work-item comment delete <key> --comment-id <id>
  • --body is required for create and update.
  • --visibility defaults to internal. Pass external to share the comment outside the team.

Custom fields

oi work-item custom-fields get <key>
oi work-item custom-fields update <key> --values-json '{"field_key":"value"}'
--values-json accepts a JSON object keyed by workflow custom field key.

Attachments

oi work-item attachment list <key>
oi work-item attachment link <key> --url <https://...> [--filename <name>]
oi work-item attachment upload <key> --file </path/file> [--filename <name>] [--mime-type <mime>] [--checksum <value>]
oi work-item attachment delete <key> --attachment-id <id>

Dependencies

oi work-item dependency list <key>
oi work-item dependency create <key> --to-key <other-key>
oi work-item dependency delete <key> --dependency-id <id>

Audit log

oi work-item audit list <key> [filters]
oi work-item audit export <key> [--format json|csv] [--output <path>] [filters]
Export the full audit trail for a work item to JSON or CSV. Use --output to write directly to a file.