Skip to content

CLI Reference

Complete reference for all Gira commands and options.

Table of Contents

Archive Management

Global Options

These options can be used with any command:

  • --help - Show help message and exit
  • --version - Show version number and exit

Commands

gira archive ticket

Archive a single ticket.

gira archive ticket <ticket_id> [options]

Arguments:

  • ticket_id - ID of the ticket to archive (required)
  • Type: string
  • Pattern: ^[A-Z]{2,4}-\d+$
  • Examples: GIRA-123, GCM-456, PROJ-1

Options:

  • -f, --force - Skip confirmation prompt
  • Type: boolean

  • --dry-run - Preview the archive operation without performing it

  • Type: boolean

  • --git/--no-git - Use git operations for archiving (auto-detected if not specified)

  • Type: boolean
  • Default:

Examples:

gira archive ticket GIRA-123
gira archive ticket GIRA-123 --force

gira archive done

Archive all done tickets with optional filtering.

gira archive done [options]

Options:

  • --dry-run - Preview what would be archived
  • Type: boolean

  • --before - Archive tickets completed before this date (YYYY-MM-DD)

  • Default:

  • --older-than - Archive tickets older than N days

  • Type: integer
  • Default:

  • --sprint - Archive tickets from specific sprint

  • Default:

  • -f, --force - Skip confirmation prompt

  • Type: boolean

Examples:

gira archive done
gira archive done --dry-run

gira archive old

Archive tickets older than specified number of days.

gira archive old [options]

Options:

  • -d, --days - Archive tickets older than N days
  • Type: integer
  • Default: 30
  • Examples: 7, 14, 30

  • -s, --status - Only archive tickets with this status

  • Choices: backlog, todo, in_progress, review, done
  • Default: done
  • Examples: backlog, todo, in_progress

  • --dry-run - Preview what would be archived

  • Type: boolean

  • -f, --force - Skip confirmation prompt

  • Type: boolean

Examples:

gira archive old
gira archive old --status backlog
gira archive old --dry-run

gira archive list

List archived tickets with optional filtering.

gira archive list [options]

Options:

  • -m, --month - Show tickets from specific month (YYYY-MM)
  • Default:

  • -s, --search - Search in ticket title and description

  • Default:

  • -l, --limit - Maximum number of tickets to show

  • Type: integer
  • Default:

  • -f, --format - Output format

  • Type: enum
  • Choices: TABLE, JSON, YAML, CSV, TSV, TEXT, IDS
  • Default: table
  • Examples: json, table

  • --stats - Show archive statistics

  • Type: boolean

  • --filter-json - JSONPath expression to filter JSON output (e.g., '$[?(@.priority=="high")].id')

  • Default:

  • --color - Enable syntax highlighting for JSON output (default: no color for AI compatibility)

  • Type: boolean

  • --no-color - Explicitly disable syntax highlighting (default is already no color)

  • Type: boolean

Examples:

gira archive list
gira archive list --format json
gira archive list --stats

gira archive restore

Restore an archived ticket back to the board.

gira archive restore <ticket_id> [options]

Arguments:

  • ticket_id - ID of the ticket to restore (required)
  • Type: string
  • Pattern: ^[A-Z]{2,4}-\d+$
  • Examples: GIRA-123, GCM-456, PROJ-1

Options:

  • -s, --status - Status to restore ticket to
  • Choices: backlog, todo, in_progress, review, done
  • Default: done
  • Examples: backlog, todo, in_progress

  • -f, --force - Skip confirmation prompt

  • Type: boolean

  • --git/--no-git - Use git operations for restoration (auto-detected if not specified)

  • Type: boolean
  • Default:

Examples:

gira archive restore GIRA-123
gira archive restore GIRA-123 --status backlog
gira archive restore GIRA-123 --force

gira archive suggest

Suggest tickets to archive based on various criteria.

gira archive suggest [options]

Options:

  • -e, --execute - Execute the suggestions (archive the tickets)
  • Type: boolean

  • -c, --category - Filter by category: old_done, completed_epics, completed_sprints, stale_backlog

  • Default:

  • -l, --limit - Maximum number of suggestions per category

  • Type: integer
  • Default: 50

Examples:

gira archive suggest
gira archive suggest --execute