Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Encore

Record once, replay forever. A cross-platform, scriptable keyboard and mouse macro recorder for repetitive desktop work.

CI Release License: MIT

English | 简体中文

Encore: the audience calls for an encore, and the performance plays again. You perform a task once — Encore performs it for you from then on.


Overview

Pasting 500 spreadsheet rows into an internal system one by one. Clicking through the same web form hundreds of times a week. Encore records that workflow as precise input events and replays it on demand — and unlike a plain macro recorder, the replay is programmable at three levels, so the same recording can produce different output every round.

Features

  • Recording — global capture of mouse trajectories, clicks, wheel and keystrokes with millisecond timing. Drop named markers with F9 mid-recording. Mouse-move streams are thinned automatically while click positions stay exact.
  • Replay — adjustable speed (0.25x–8x), loop count, loop delay, start countdown, live progress, and a global F8 panic stop.
  • Level 1, zero code — clipboard feed: point Encore at a data file and every loop places the next line into the clipboard, so a recorded Ctrl+V pastes different content each round.
  • Level 2, zero code — automation rules: build rules in the UI with dropdowns, no code involved. Encore detects copy/paste chords (Ctrl/Cmd+C, X, V) and markers inside your recording and fires your rules at exactly those moments:
    • When: loop starts / marker reached / after a copy / before a paste
    • Do: transform the clipboard (literal replace, regex replace, prefix, suffix, trim, case), set the clipboard from the data file, type fixed text or a CSV column, wait, or call a script function
    • Example: rule "after a copy → regex replace \d{4}####" makes every replayed paste come out with numbers masked — the recording itself stays untouched.
  • Level 3, full scripting — an embedded Rhai engine (JavaScript-like). Segment replay with play_to(macro, marker), drive the keyboard/mouse directly, read and write files, call external commands. See SCRIPTING.md.
  • Event editor — inspect the recording, delete slips, compress trajectories, rename markers.
  • Macro library — recordings stored as human-readable JSON; ships with keyboard-only demo macros that replay correctly on any machine.
  • Professional UI — light/dark theme, English/Chinese interface, empty-state guidance, F10 pointer-position picker.
  • Single static binary for Windows, macOS and Linux (X11). No runtime, no dependencies.

Install

Download from Releases and unpack:

Platform File Note
Windows x64 encore-*-windows-x86_64.zip If SmartScreen warns: More info, then Run anyway
macOS Apple Silicon encore-*-macos-arm64.tar.gz xattr -d com.apple.quarantine encore, grant Accessibility permission
macOS Intel encore-*-macos-x86_64.tar.gz Same as above
Linux x64 encore-*-linux-x86_64.tar.gz Requires an X11/Xorg session

Unsigned input-automation binaries are occasionally flagged by antivirus heuristics; build from source if that is a concern.

Quick start

  1. Press F7, perform the task once (press F9 wherever you may want to hook in later), press F7 again to stop.
  2. Review the Events tab: delete mistakes, compress mouse moves.
  3. Set speed and loop count, press Play. F8 always stops everything.
  4. For batch jobs, enable the clipboard feed in the top bar, or open the Automation tab and add rules.
  5. Try the built-in demos: select some text in any editor, add the rule after a copy → transform clipboard: UPPERCASE, then play demo-copy-paste from the library.

Global hotkeys: F7 record / stop. F8 panic stop. F9 insert marker while recording. F10 copy pointer position while idle.

Programmable replay in practice

The recording contains a copy at some point. During replay you want the copied text changed before it gets pasted:

  • No code: Automation tab → When: after a copyDo: transform clipboard → add steps (replace / regex / prefix / case). Done.
  • Script, when the logic outgrows dropdowns:
// Replay up to the marker, take over, then finish the recording.
let lines = read_lines("data.txt");
for line in lines {
    rewind("@rec");
    play_to("@rec", "m1");      // clicks recorded before the marker
    set_clipboard(line);
    paste();
    play_to("@rec", "end");     // clicks recorded after the marker
    sleep(500);
}

Rules can also call script functions (define fn my_fn() { ... } in the Script tab, reference it from a rule), which bridges the two levels.

Platform notes

  • macOS — grant the Accessibility permission on first run (System Settings, Privacy & Security). F7–F10 may require the Fn key unless function keys are set to standard.
  • Windows — target applications running elevated accept injected input only if Encore is also elevated.
  • Linux — an X11/Xorg session is required. Wayland's security model does not allow global input capture or injection for regular applications (true for every tool of this kind); Encore detects Wayland and says so. encore --check prints a diagnosis.
  • Replay injects real input: keep hands off during a run, keep the screen layout identical to recording time, and remember F8.

Build from source

# Linux build dependencies: libx11-dev libxtst-dev libxi-dev libxkbcommon-dev
cargo build --release        # binary at target/release/encore

Stack: Rust, rdev (global hooks and injection), egui (pure-Rust UI), rhai (embedded scripting), arboard (clipboard), regex (rule transforms).

Roadmap

  • Image-based targeting (find-on-screen, resilient to window movement)
  • Screenshot storyboard of recordings
  • Wayland support once libei/portal injection matures
  • Configurable hotkeys; per-window coordinate spaces
  • Homebrew / winget / AUR packaging

Disclaimer

Encore simulates your own input on your own machine. Do not use it to violate the terms of service of any website or application, or against systems you are not authorized to automate. All data stays local; nothing is uploaded.

License

MIT

About

Record once, replay forever - cross-platform scriptable keyboard and mouse macro recorder with no-code automation rules, clipboard transforms and Rhai scripting

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages