it2 session tag

Manage session tags for correlation and metadata

Synopsis

it2 session tag [session-id] [key=value...] [flags]

Description

Manage key-value tags for session metadata and correlation.

Tags are stored in ~/.it2/sessions//tags.json and persist across
iTerm2 restarts. They can be used to annotate sessions with project names,
ticket IDs, or other metadata useful for forensic analysis.

Tags are also visible in 'it2 session get-info' and 'it2 session export' output.

Options

-d, --delete
Delete a tag by key

--format (default "text")

Output format: text, json, yaml

Options inherited from parent commands

--timeout

Timeout for API operations - how long to wait for iTerm2 to respond

--url

WebSocket URL for iTerm2 API - typically ws://localhost:1912 for local iTerm2

See Also

Examples

  # Add a tag to current session
  it2 session tag project=eslogs

  # Add multiple tags to a specific session
  it2 session tag 5AC0 project=eslogs ticket=IT2-123

  # List tags for current session
  it2 session tag

  # List tags for a specific session
  it2 session tag 5AC0

  # Delete a tag
  it2 session tag --delete project

  # Output tags as JSON
  it2 session tag --format json