Skip to content

[Feature Request] CLI with JSON output for AI agent integration #525

@amdhelper

Description

@amdhelper

Background

I use OpenClaw, an AI agent platform, and Timeshift for system backups on my Ubuntu desktop.

Current State

Timeshift has a CLI (timeshift) but its output is plain text and interactive, making it hard for automation tools to parse.

Feature Request

Add --json flag to all CLI commands:

  1. Snapshot Management

    • timeshift --list --json — list all snapshots as JSON
    • timeshift --create --comments <text> --json — create snapshot, return JSON with snapshot ID
    • timeshift --delete --snapshot-id <id> --json — delete snapshot
  2. Status & Config

    • timeshift --status --json — show current config (schedule, device, space used)
    • timeshift --check --json — check disk space and snapshot health
  3. Restore Info

    • timeshift --list-files <snapshot-id> --json — list files in a snapshot
    • timeshift --restore --snapshot-id <id> --dry-run --json — show what would be restored

Use Case

An AI agent could:

  • Monitor backup health and alert if no recent snapshots
  • Suggest cleanup of old snapshots when disk is full
  • Help restore specific files from snapshots
  • Verify system state before/after updates

Implementation

Most data is already available internally. The main change is adding JSON serialization to the output formatter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions