Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2100f7f
feat(export): extract ExportSettings into settings module
richiemcilroy Jun 18, 2026
3a67c78
feat(automation): add cap-automation crate with rule engine
richiemcilroy Jun 18, 2026
df3d460
chore: update Cargo.lock for cap-automation dependencies
richiemcilroy Jun 18, 2026
ebb53d8
feat(desktop): add preset lookup by name
richiemcilroy Jun 18, 2026
2aa3959
feat(desktop): derive Deserialize on import progress events
richiemcilroy Jun 18, 2026
62d336f
feat(desktop): add OCR from image path for automations
richiemcilroy Jun 18, 2026
4cdeeae
fix(camera): size preview texture to cover viewport region
richiemcilroy Jun 18, 2026
17aeec8
feat(desktop): add desktop automation host module
richiemcilroy Jun 18, 2026
37f77ff
feat(desktop): register automation commands types and event listeners
richiemcilroy Jun 18, 2026
1e7c737
feat(desktop): wire automations into recording and screenshot flows
richiemcilroy Jun 18, 2026
dcc00c7
feat(desktop): respect automation editor actions in hotkeys and tray
richiemcilroy Jun 18, 2026
1a25426
feat(desktop): add automations settings utilities
richiemcilroy Jun 18, 2026
8e48fec
feat(desktop): add automations settings page
richiemcilroy Jun 18, 2026
759a6d4
feat(desktop): add automations route and settings nav entry
richiemcilroy Jun 18, 2026
13e443f
feat(desktop): gate screenshot editor on automation rules in overlay
richiemcilroy Jun 18, 2026
995692a
feat(cli): add automation host module
richiemcilroy Jun 18, 2026
6126b6b
feat(cli): add automations list subcommand
richiemcilroy Jun 18, 2026
aac1a5c
feat(cli): run automations after screenshot record and upload
richiemcilroy Jun 18, 2026
c9bc08a
feat(cli): report automation rule counts in doctor output
richiemcilroy Jun 18, 2026
66c0eeb
docs(cli): document automations in README skill and guide
richiemcilroy Jun 18, 2026
ad4ed67
docs(automation): document OrganizationIs condition as reserved
richiemcilroy Jun 18, 2026
146c89a
fix(automation): sanitize window titles in save-to-location filenames
richiemcilroy Jun 18, 2026
6630b19
fix(automation): open files directly instead of revealing them
richiemcilroy Jun 18, 2026
e4dd48d
fix(automation): substitute template variables in notifications
richiemcilroy Jun 18, 2026
791654c
fix(automation): surface webhook body serialization errors
richiemcilroy Jun 18, 2026
a423e51
fix(automation): close brace injection and harden filename sanitizer
richiemcilroy Jun 18, 2026
8de1065
fix(automation): avoid empty sanitized filename components
richiemcilroy Jun 18, 2026
707fb86
style(automation): use char-array pattern for filename trim
richiemcilroy Jun 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apps/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ clap_complete = "4.5.38"
cap-project = { path = "../../crates/project" }
cap-recording = { path = "../../crates/recording" }
cap-export = { path = "../../crates/export" }
cap-automation = { path = "../../crates/automation" }
cap-camera = { path = "../../crates/camera" }
cap-cli-install = { path = "../../crates/cli-install" }
scap-targets = { path = "../../crates/scap-targets" }
Expand All @@ -24,6 +25,7 @@ flume = { workspace = true }
futures = { workspace = true }
dirs = "6.0.0"
image = "0.25.2"
chrono = "0.4.31"
tracing.workspace = true
tracing-subscriber = "0.3.19"
workspace-hack = { version = "0.1", path = "../../crates/workspace-hack" }
Expand Down
11 changes: 11 additions & 0 deletions apps/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,18 @@ step.
- `cap upload` — upload a `.cap` project or video file and get a shareable link.
- `cap update` — download and install the latest Cap Desktop bundle, then repair the `cap` shim.
- `cap doctor` / `version` / `guide` — diagnostics, version info, and the agent capability manifest.
- `cap automations list` — list the automation rules configured in Cap Desktop that the CLI honors.
- `cap desktop status|install-cli|uninstall-cli` — manage the `cap` shim on PATH.
- `cap completions <shell>` — shell completion scripts (bash/zsh/fish/powershell).

## Automations

Automations are `trigger → (conditions) → actions` rules authored in Cap Desktop (Settings →
Automations) and persisted to its store. Because the CLI shares that store (and the `cap-automation`
engine), it runs the same rules automatically after `cap screenshot`, a `cap record` finish, and
`cap upload` — e.g. "on screenshot, save a copy to `~/Shots` and POST a webhook". Clipboard, OCR,
notification, and open-editor actions are desktop-only and are skipped on the CLI; everything else
(save, export, upload, run command, webhook, reveal, apply preset, delete) runs. Inspect the active
rules with `cap automations list --json`.

Run `cap --help` or `cap <command> --help` for full flag documentation.
14 changes: 14 additions & 0 deletions apps/cli/skill/cap/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ cap upload out.mp4 --json # -> {"type":"uploaded","id","lin
or set `CAP_API_KEY` (a Cap auth key from Settings) for headless use. `cap upload <path.cap> --export
--json` exports then uploads in one step.

## Automations

Automations are `trigger -> (conditions) -> actions` rules authored in Cap Desktop (Settings →
Automations) and shared with the CLI. After `cap screenshot`, a `cap record` finish, and `cap upload`,
the CLI evaluates the matching rules and runs their actions (save to a folder, run a command, send a
webhook, export, etc.).

```sh
cap automations list --json # the rules the CLI will honor
```

Desktop-only actions (copy to clipboard, OCR, notifications, open editor) are skipped on the CLI; all
others run. `cap doctor --json` reports the configured rule count under `automations`.

## Conventions to rely on

- Add `--json` to any command; it overrides each command's `--format`.
Expand Down
Loading
Loading