CROSSMACRO(1)
π NAME π
crossmacro(1) is the manual for crossmacro β your keyboard and mouse macro automation CLI. Bestie, it's giving "control your whole input flow from the terminal" energy, and I'm obsessed. β¨
β¨ SYNOPSIS β¨
crossmacro [-h|--help] [-v|--version] [--start-minimized]
crossmacro (no arguments) starts GUI mode
crossmacro play MACRO_FILE [--speed N] [--loop] [--repeat N] [--repeat-delay-ms MS] [--countdown SEC] [--timeout SEC] [--dry-run] [--json] [--log-level LEVEL]
crossmacro macro validate MACRO_FILE [--json] [--log-level LEVEL]
crossmacro macro info MACRO_FILE [--json] [--log-level LEVEL]
crossmacro doctor [--verbose] [--json] [--log-level LEVEL]
crossmacro settings get [KEY] [--json] [--log-level LEVEL]
crossmacro settings set KEY VALUE [--json] [--log-level LEVEL]
crossmacro schedule list [--json] [--log-level LEVEL]
crossmacro schedule run TASK_ID [--json] [--log-level LEVEL]
crossmacro shortcut list [--json] [--log-level LEVEL]
crossmacro shortcut run TASK_ID [--json] [--log-level LEVEL]
crossmacro record (--output|-o) MACRO_FILE [--mouse BOOL] [--keyboard BOOL] [--mode auto|absolute|relative] [--skip-initial-zero] [--duration SEC] [--json] [--log-level LEVEL]
crossmacro run [--step STEP]... [--file STEPS_FILE] [--speed N] [--countdown SEC] [--timeout SEC] [--dry-run] [--json] [--log-level LEVEL]
crossmacro run STEP_COMMAND [STEP_COMMAND]... [--file STEPS_FILE] [--speed N] [--countdown SEC] [--timeout SEC] [--dry-run] [--json] [--log-level LEVEL]
crossmacro headless [--json] [--log-level LEVEL]
crossmacro --headless [--json] [--log-level LEVEL]
π¦ DESCRIPTION π¦
CrossMacro gives you GUI and CLI workflows for macro playback, validation, recording, environment diagnostics, and background headless runtime. If no CLI command is provided, CrossMacro starts GUI mode. Slay. π
On Linux, CrossMacro can run in two different input modes. The preferred packaged path is daemon-backed mode, where the app talks to crossmacro.service over /run/crossmacro/crossmacro.sock and the daemon service user owns device access. The desktop user must be a member of the crossmacro group to use that socket.
β οΈ After adding a user to the group, log out and back in or reboot before starting CrossMacro again, because existing sessions keep their old group list. No cap, that part matters.
Some channels and environments intentionally support direct device mode instead, where the app process itself needs access to /dev/uinput and, for recording or hotkeys, readable /dev/input/event* devices. Direct device readiness does not fix daemon socket permission failures.
On X11, CrossMacro tries native X11 capture and playback first; a supported native X11 session does not require daemon-backed or direct device fallback. Flatpak Wayland is hybrid: it uses the exposed host daemon socket when available and falls back to direct device mode only when the needed device permissions are present.
Arch and CachyOS package hooks provision the crossmacro sysusers entry before service start or restart, and print manual remediation when they cannot confirm adding the installing user to the crossmacro group automatically. Wayfire IPC discovery checks WAYFIRE_SOCKET, then XDG_RUNTIME_DIR, then temp-directory socket candidates. π§
π OPTIONS π
-h,--helpβ Show command help.-v,--versionβ Show version.--start-minimizedβ Start GUI minimized. When tray support is available, CrossMacro starts hidden to tray instead.--jsonβ Print command output as JSON.--log-level LEVELβ Override logging level for the current command. Supported values:Verbose,Debug,Information,Warning,Error,Fatal.
π§ HELP AND ROUTING POLICY π§
crossmacro --helpβ Shows top-level help.crossmacro <command> --helpβ Shows help for that command topic (for examplerunorrecord).- Standalone command options β Standalone CLI-only options such as
--jsonand--log-levelrequire a command and return exit code2. - Non-CLI startup switches β Known GUI startup switches are routed to GUI startup (for example
--start-minimized,--drm,--fbdev,--display, Finder-style-psn_*). - Unknown tokens β Unknown commands/options return CLI parse error (exit code
2) instead of falling through to GUI.
π OPTION ALIASES π
record --output,-oβ Both forms are accepted; one is required for output path selection.headless,--headlessβ Both forms start headless runtime mode.
π VALUE RULES π
playβ--repeat,--repeat-delay-ms,--countdown, and--timeoutmust be>= 0. Providing--loopwithout--repeatmeans infinite loop mode. Providing--repeatwith value> 0implies loop semantics for that playback run.--repeat 0requires--loop(infinite mode).runβ--speedmust be between0.1and10.0.--countdownand--timeoutmust be>= 0.recordβ--durationmust be>= 0, and at least one of--mouseor--keyboardmust be true.
πΉοΈ COMMANDS πΉοΈ
playβ Load and play a macro file without starting GUI.macro validateβ Validate macro syntax and playback compatibility.macro infoβ Show macro metadata and event breakdown.doctorβ Run environment and input capability diagnostics. On Linux, daemon-backed checks and direct device checks are reported separately. With--json, inspect daemon-specific details such as socket status, required group, current process groups, session membership, and remediation. Direct input readiness can pass while daemon IPC still warns or fails.settings get|setβ Read or update scriptable settings keys.schedule list|runβ Inspect schedule tasks or trigger a schedule task manually.shortcut list|runβ Inspect shortcut tasks or trigger a shortcut task manually.recordβ Record input events and save a macro file.runβ Run inline event steps directly from CLI (without a.macrofile). Supported steps:move abs|rel,down,up,click,scroll,key down|up,tap,delay,type,setvariables,inc/deccounters,repeatblocks,if/else,while, andforblocks, screen-reading stepspixelcolor,waitcolor, andpixelsearch, plus loop control withbreakandcontinue. Randomized timing is supported withdelay random <min> <max>ordelay random <min>..<max>.headlessβ Run background services without GUI (hotkeys, scheduler, shortcuts, text expansion) until interrupted. Recording hotkey toggles capture start/stop. Playback hotkey toggles play/stop for the last macro recorded in the same headless session. Pause hotkey toggles pause/resume for active playback.
π Screen-reading syntax π
pixelcolor <x> <y> [var]
pixelcolor rel <dx> <dy> [var]
waitcolor <x> <y> <RRGGBB|$var> [timeout_ms] [result_var]
pixelsearch <x1> <y1> <x2> <y2> <RRGGBB|$var> [found_var var_x var_y|var_x var_y] [tolerance <0..255>]
Use RRGGBB for a literal target color, or $var to reuse a color previously written by pixelcolor. Bare variable names are not accepted as target colors. π¨
πͺ EXIT STATUS πͺ
0β Success.2β Invalid arguments or parsing error.3β File access/read error.4β Macro validation error.5β Environment/permission/runtime readiness error.6β Runtime playback or capture error.130β Interrupted by signal (for example Ctrl+C).
π EXAMPLES π
- Play a macro file three times.
crossmacro play ./demo.macro --speed 1.25 --repeat 3
- Run diagnostics and print JSON.
crossmacro doctor --json
- Compile and validate direct run steps without sending input.
crossmacro run --step move abs 800 400 --step click left --dry-run
- Force click at live cursor even after absolute moves.
crossmacro run --step move abs 800 400 --step click current left
- Execute chained inline run steps in sequence.
crossmacro run move rel 100 0 delay 30 click left
- Run a repeated block with variable substitution and randomized delay.
crossmacro run --step set n=3 --step repeat $n { --step click left --step delay random 20 50 --step }
- Run a bounded while loop with explicit counter increment.
crossmacro run --step set i=0 --step while $i < 10 { --step click left --step inc i --step }
- Run a for loop with custom step value.
crossmacro run --step for n from 1 to 5 step 2 { --step click right --step }
- Load run steps from a plain text file (one step per line,
'#'comments allowed).
crossmacro run --file ./steps.txt
- Start headless runtime and keep running until interrupted.
crossmacro headless
- Start GUI hidden to tray when tray icon support is available for the current session.
crossmacro --start-minimized
π SEE ALSO π
Project repository: https://github.com/alper-han/CrossMacro
π That's the whole vibe! Source/version: CrossMacro Β· date: 2026-02-28 Β· manual: CROSSMACRO(1). Byeee! π
π¦ where this page comes from
- nixpkgs unstable: crossmacro 1.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms