---
title: "Item Commands"
description: "CLI commands for managing items (requirements, test cases, artifacts)"
keywords: [cli, items, commands, requirements, test cases]
---

# Item Commands

Commands for managing items (requirements, test cases, design documents, etc.) in TraceRTM projects.

## List Items

List all items in the current project.

```bash
trace item list
```

### Options

```bash
# Filter by status
trace item list --status active

# Filter by view
trace item list --view requirements

# Filter by both
trace item list --status active --view requirements

# Pagination
trace item list --skip 0 --limit 50

# Output format
trace item list --output json
trace item list --output table
trace item list --output yaml
```

### Examples

```bash
# List all active requirements
trace item list --status active --view requirements

# List recent items (JSON for processing)
trace item list --limit 10 --output json | jq '.[] | .title'
```

## Get Item

Get details for a specific item.

```bash
trace item get <item-id>
```

### Examples

```bash
# Get item details
trace item get item_abc123

# Get as JSON
trace item get item_abc123 --output json
```

## Create Item

Create a new item.

```bash
trace item create \
  --title "Item Title" \
  --view requirements \
  --status draft \
  --description "Item description" \
  --metadata '{"priority": "high"}'
```

### Required Options

- `--title`: Item title
- `--view`: Item view (requirements, test-cases, design, code, documentation)

### Optional Options

- `--status`: Status (draft, active, review, approved, deprecated)
- `--description`: Item description
- `--metadata`: JSON metadata object
- `--project-id`: Project ID (uses default if not specified)

### Examples

```bash
# Create requirement
trace item create \
  --title "User Authentication" \
  --view requirements \
  --status draft \
  --description "System must support OAuth 2.0"

# Create test case
trace item create \
  --title "Login Test" \
  --view test-cases \
  --status draft \
  --metadata '{"priority": "high", "component": "auth"}'
```

## Update Item

Update an existing item.

```bash
trace item update <item-id> \
  --title "Updated Title" \
  --status active \
  --description "Updated description"
```

### Examples

```bash
# Update status
trace item update item_abc123 --status active

# Update title and description
trace item update item_abc123 \
  --title "New Title" \
  --description "New description"
```

## Delete Item

Delete an item.

```bash
trace item delete <item-id>
```

### Examples

```bash
# Delete item
trace item delete item_abc123

# Delete with confirmation
trace item delete item_abc123 --confirm
```

## Search Items

Search items by query.

```bash
trace item search "authentication" \
  --view requirements \
  --status active
```

## Related Commands

- [Link Commands](./03c-link-commands) - Create relationships
- [Workflow Commands](./03d-workflow-commands) - Manage status
