Skip to content

Add a JSON search command for scripts #182

Description

@jongio

Problem

Dispatch session data is useful for scripts, status bars, and local reports, but the current workflow starts the interactive TUI. Users who want machine-readable output have to query the SQLite store themselves.

Proposed solution

Add a non-interactive dispatch search --json command that reuses the existing data filters and prints matching sessions as JSON. Keep the TUI path unchanged.

Acceptance criteria

  • dispatch search --json returns matching sessions without starting the TUI.
  • The command supports query, repo, branch, folder, since, until, and limit flags using existing filter code.
  • JSON output includes id, summary, cwd, repository, branch, created_at, updated_at, turn_count, and file_count.
  • Empty results exit with code 0 and print an empty JSON array.
  • Invalid flags or unreadable stores return a non-zero exit code with an error on stderr.

Notes

Complexity: M · Priority: 5

Metadata

Metadata

Assignees

Labels

dx-ideaFeature idea generated by idea-generatorenhancementNew feature or requestidea-generatorGenerated by idea-generator

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions