Skip to content

Add a deepfield command line - #21

Merged
narrowstacks merged 2 commits into
mainfrom
cli
Nov 18, 2026
Merged

narrowstacks merged 2 commits into
mainfrom
cli

Conversation

@narrowstacks

Copy link
Copy Markdown
Owner

Adds deepfield, a command line for the app. It's the app's own executable: DeepField.app/Contents/MacOS/DeepField install links it onto the PATH, and starting it as deepfield (or with a command name as the first argument) runs the command instead of the app.

What it does

  • Control the running wallpaper: status, get, set KEY=VALUE..., keys, reset, on/off/toggle, pause/resume. Keys are the saved format's (palette.core for nested ones), colors are hex, and bad keys or values are rejected with suggestions or the allowed choices.
  • Change the wallpaper: scene NAME|random [KEY=VALUE...] (the scene's last settings plus changes), preset apply|save|delete|rename|export|import, with --fade/--style using the schedule's transitions.
  • Render: render [image|video|timelapse] OUT. The extension picks png/jpg/heic/tiff, mp4/mov (H.264, HEVC, ProRes), gif, or a folder of PNG frames. Options include --size, --scale, --time, --duration, --fps, --speed, --loop, --smooth and --defaults. Live Earth's clock follows --speed, so its day time-lapses.
  • Extras: events/event NAME, schedule status|on|off|next, login, customize, launch, quit, completion zsh|bash|fish.

How

State commands (CLI/CLIService.swift) are sent as JSON to the running app over a CFMessagePort and run on its main thread, so changes show at once. When nothing answers, the same code runs on the saved settings in the command's own process. Rendering runs offscreen in the command's process (CLI/RenderCommand.swift). Small changes elsewhere: FrameCapture.Sequence can render events (off by default, so the phone loop is unchanged), MobileExport.dissolve is shared for --loop, EventSchedule.named lists events by name, and AppDelegate exposes show/hide and pause.

Verified

  • Live commands against a running build (scene switch with transition, set, validation errors, clamping note, pause/resume, events, presets, reset, schedule and login status).
  • App closed: set saves and a fresh process reads it back; pause/event fail with a hint.
  • Renders in every format, checked by eye: the Live Earth time-lapse turns an hour, and the --loop end leads into its start. ffprobe confirms codec, size, frame count and duration.
  • install --dir, the link re-executing the real path (bundle and defaults domain correct), zsh/bash completion syntax, and the dev --snapshot still working.

Not tested: fish completion (not installed) and tab completion in a live shell. No visual change to the wallpaper itself, so no screenshots.

Switch scenes and presets, change settings of the running wallpaper, trigger events, control
the schedule, and render stills, videos, time-lapses, GIFs and PNG sequences from a terminal.
Commands go to the running app over a local message port and fall back to the saved settings
when it isn't running.
@narrowstacks
narrowstacks merged commit 8997ec3 into main Nov 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant