Offline AI text rewriter for Linux: zs CLI, Ollama and Wayland hotkeys

A zero-dependency zs CLI for pipes, git and vim, a fully offline mode on Ollama, and Alt+Shift+Z bindings for Hyprland/Omarchy on Wayland and X11.

Try it: messy draft → one hotkey → polished

Terminal: zs -l commit-message before git commit Commit Message lens

Before — your draft

fixed the bug where the export job crashes if a row has a null timestamp, now we just skip those rows and log a warning instead of blowing up the whole batch

After — Commit Message

fix(export): skip rows with null timestamps instead of failing the batch The export job crashed when a row had a null timestamp, aborting the whole batch. Skip those rows and log a warning so the rest of the export completes.
Next example: Alt+T
Try it on your own text

In the real app this happens in place — in Gmail, Word, Outlook, Slack or your terminal — with Alt+Shift+Z / ⌥⇧Z. No copy-paste, no prompt.

Download Zero Shot for Linux

Available now (CLI + Hyprland setup) · v2.2.0
Download zs.mjszs CLI v2.2.0 · single file · Node 18+

Most people install with the one-liner below instead, which puts zs on your PATH.

50 free transforms, no card. Every platform shares one credit balance. See pricing · All install guides

Works across your Linux desktop

Terminals (terminal-safe)

  • Ghostty
  • Kitty
  • Alacritty
  • Foot
  • WezTerm
  • Konsole
  • GNOME Terminal

Copy/paste goes through Ctrl+Shift+C/V, so Zero Shot never sends Ctrl+C (SIGINT), and line breaks are stripped so nothing auto-runs.

Shell, git and editors

  • bash / zsh pipes
  • git commit
  • vim / Neovim
  • tmux

zs reads stdin and writes stdout, so it composes with anything. -c also copies the result via wl-copy, xclip or xsel.

Display servers

  • Hyprland (Omarchy)
  • Other Wayland
  • X11

Hyprland gets native bindings through zeroshot-trigger. Wayland key injection uses wtype, then ydotool; X11 and XWayland windows use xdotool + xclip.

Install on Linux: CLI, offline mode, global hotkeys

1. zs CLI (any distro, about 1 minute)

  1. Check Node.js 18 or newer

    zs is a single zero-dependency Node script.

    shell
    node --version
  2. Install zs into ~/.local/bin

    Downloads zs.mjs, makes it executable and links it as zs.

    shell
    mkdir -p ~/.local/bin && curl -fsSL https://zeroshot.now/download/zs.mjs -o ~/.local/bin/zs.mjs && chmod +x ~/.local/bin/zs.mjs && ln -sf ~/.local/bin/zs.mjs ~/.local/bin/zs
  3. Make sure ~/.local/bin is on your PATH

    Add this line to ~/.bashrc or ~/.zshrc if zs isn't found.

    shell
    export PATH="$HOME/.local/bin:$PATH"
  4. First rewrite

    Pipe any text through any lens.

    shell
    echo "sorry im late sending the deck before 3pm" | zs -l diplomat

2. Fully offline with Ollama ($0)

Ollama serves an OpenAI-compatible API on http://127.0.0.1:11434/v1, which is exactly where zs --local and the desktop app's Local Offline Mode look.

  1. Install Ollama

    Official install script from ollama.com.

    shell
    curl -fsSL https://ollama.com/install.sh | sh
  2. Pull a small, fast model

    Any chat model works. Without --model, zs uses the first model Ollama lists.

    shell
    ollama pull llama3.2
  3. Rewrite with no network

    Offline, the lens id is applied to your local model as a style instruction, so quality depends on the model you pull.

    shell
    zs --local --model llama3.2 -l concise "so basically the deploy failed again because the env var wasnt set in staging"
  4. Optional: a different endpoint

    Point zs at any OpenAI-compatible server (LM Studio, a GPU box on your LAN) with ZS_LOCAL_URL.

    shell
    ZS_LOCAL_URL="http://192.168.1.50:11434/v1" zs --local "text"

3. Global Alt+Shift+Z on Hyprland / Omarchy

Native Wayland apps can't be seen by global key hooks, so on Hyprland the hotkeys are compositor bindings that call zeroshot-trigger, which talks to the running Zero Shot Desktop engine over a local socket.

  1. Run the setup script

    Idempotent: installs zeroshot-trigger into ~/.local/bin, appends a marked block to ~/.config/hypr/bindings.conf and runs hyprctl reload. Swap --copy for --dry-run to preview every change first.

    shell
    d="$(mktemp -d)" && trap 'rm -rf "$d"' EXIT && curl -fsSL https://zeroshot.now/download/zeroshot-trigger -o "$d/zeroshot-trigger" && curl -fsSL https://zeroshot.now/download/setup-omarchy-hyprland.sh -o "$d/setup-omarchy-hyprland.sh" && sh "$d/setup-omarchy-hyprland.sh" --copy
  2. These bindings are added

    Edit the keys here if Alt+T or Alt+U clash with your own binds.

    ~/.config/hypr/bindings.conf
    # >>> ZEROSHOT-DESKTOP-BINDINGS >>>
    bind = ALT SHIFT, Z, exec, "$HOME/.local/bin/zeroshot-trigger" transform
    bind = ALT, T, exec, "$HOME/.local/bin/zeroshot-trigger" toggle
    bind = ALT, U, exec, "$HOME/.local/bin/zeroshot-trigger" undo
    bind = ALT SHIFT, L, exec, "$HOME/.local/bin/zeroshot-trigger" spotlight
    # <<< ZEROSHOT-DESKTOP-BINDINGS <<<
  3. Install the input tools

    Wayland needs wtype and wl-clipboard; X11 sessions need xdotool and xclip. Arch / Omarchy shown; on Debian or Ubuntu use sudo apt install with the same package names.

    shell
    sudo pacman -S --needed wtype wl-clipboard xdotool xclip
  4. Start the desktop engine and test

    The bindings send commands to the Zero Shot Desktop engine. There's no packaged Linux download yet; the Setup page documents starting it from a local build with npm --prefix desktop start. Then check the trigger can reach it:

    shell
    zeroshot-trigger status

zs CLI cheat sheet

Every flag below is in zs --help (v2.2.0). Lens ids match the lens directory.

  • Rewrite with your default lens (Suit unless you've set another in Zero Shot Desktop).

    shell
    zs "sorry for the late reply i will send the revised proposal by 3pm"
  • Pipe stdin through any lens id with -l / --lens.

    shell
    echo "idk tell bob we cant do friday" | zs -l diplomat
  • Generate a conventional commit message and hand it straight to git.

    shell
    zs -l commit-message "fixed null timestamp crash in export" | git commit -F -
  • Expand a rough idea into a structured AI prompt; -c also copies it to the clipboard.

    shell
    zs -l promptcraft -c "react stripe revenue dashboard"
  • One-shot custom instruction instead of a lens (-i / --instruction).

    shell
    zs -i "make this sound less defensive" "thats not what i said in the meeting"
  • Run against your local Ollama at http://127.0.0.1:11434/v1. Nothing leaves the machine.

    shell
    zs --local --model llama3.2 "clean up this commit message"
  • Search the live lens catalog (needs network; not available with --local).

    shell
    zs --search email
  • Machine-readable output: { transformed, lens, provider, latencyMs }.

    shell
    zs --json -l concise "the meeting got moved to 4pm thursday fyi"
  • Vim / Neovim: replace the visual selection with its rewrite (zs reads stdin, writes stdout).

    shell
    :'<,'>!zs -l concise

Linux hotkeys and CLI flags

Linux hotkeys and CLI flags: action, keys and what each one does
ActionKeys / commandWhat it does
TransformAlt+Shift+ZRewrite the selection in the focused window (Hyprland binding → zeroshot-trigger transform).
Cycle resultsAlt+TStep through cached results from your 5 active lenses.
UndoAlt+URestore the original. In a terminal it's copied to the clipboard for Ctrl+Shift+V instead of typed over your prompt.
SpotlightAlt+Shift+LSearch all 996 lenses or type a one-off instruction.
Terminal copy/pasteCtrl+Shift+C/VUsed automatically in terminal emulators. Zero Shot never sends Ctrl+C (SIGINT) or Enter.
Pick a lenszs -l <id>Any lens id, e.g. diplomat, commit-message, pr-description. Find ids with zs --search <word>.
Offlinezs --local --model <name>Use Ollama at http://127.0.0.1:11434/v1 (override with ZS_LOCAL_URL).
Clipboard / JSONzs -c / zs --jsonCopy the result too, or print { transformed, lens, provider, latencyMs }.

Privacy and offline behavior on Linux

--local keeps text on your machine

With --local, zs only talks to your Ollama endpoint. If Ollama isn't running it stops with "Ollama isn't reachable at http://127.0.0.1:11434/v1. Start it with ollama serve" rather than quietly using the cloud. The desktop engine's Local Offline Mode behaves the same way.

Cloud mode

Without --local, text goes over HTTPS to api.zeroshot.now and is processed on Google Vertex AI — chosen over Google AI Studio because Google does not train on Vertex AI prompts or outputs. Zero Shot never sells personal data.

The local trigger is locked down

zeroshot-trigger talks to the engine through a Unix socket at /tmp/zeroshot-desktop.sock (mode 0600), or a loopback HTTP port (127.0.0.1:47821) that requires a per-boot token from ~/.config/zeroshot/trigger.token.

Full details: Privacy policy.

Linux troubleshooting: exact symptoms and fixes

Wayland: the rewrite runs but never gets pasted into the window

Why: Zero Shot injects the paste with wtype, falling back to ydotool and then xdotool (XWayland only). If none is installed, or your compositor lacks the virtual-keyboard protocol wtype uses (GNOME's doesn't), the paste can't be typed.

  • Install wtype and wl-clipboard (Arch: sudo pacman -S --needed wtype wl-clipboard; Debian/Ubuntu: sudo apt install wtype wl-clipboard).
  • On GNOME Wayland, install ydotool and make sure its ydotoold service is running.
  • Hyprland and other wlroots compositors work with wtype out of the box.

Alt+Shift+Z does nothing on Hyprland

Why: Either the bindings weren't loaded or zeroshot-trigger can't reach the engine.

  • Check the ZEROSHOT-DESKTOP-BINDINGS block is in ~/.config/hypr/bindings.conf, then run hyprctl reload.
  • Run zeroshot-trigger status. "Zero Shot trigger token not found … Is Zero Shot Desktop running?" means the engine isn't running, so start it.
  • "Zero Shot trigger requires socat, nc, or curl": install one of them.
diagnose
grep -A5 ZEROSHOT ~/.config/hypr/bindings.conf && hyprctl reload && zeroshot-trigger status

zs --local: "Ollama isn't reachable at http://127.0.0.1:11434/v1"

Why: The Ollama server isn't running, or it's listening somewhere else.

  • Start it with ollama serve (or systemctl start ollama if you installed the service).
  • Using another host or port? Set ZS_LOCAL_URL.
diagnose
ollama list   # errors if the server is down
ollama serve  # start it in another terminal (or: systemctl start ollama)

zs: command not found

Why: ~/.local/bin isn't on your PATH, or Node.js is missing or older than 18.

  • Add export PATH="$HOME/.local/bin:$PATH" to your shell rc and open a new terminal.
  • Check node --version shows v18 or newer.

zs -c: "Warning: could not copy to system clipboard."

Why: zs tries wl-copy, then xclip, then xsel, and none is installed.

  • Install wl-clipboard on Wayland or xclip/xsel on X11. The rewrite is still printed to stdout.

Still stuck? Contact support.

Try the developer lenses before you install

Paste your own draft below. 50 free transforms, no card — the same rewrite runs in any app with Alt+Shift+Z (⌥⇧Z on Mac).

Try it yourself

Type or paste text, then use the hotkeys to transform

Alt
+
Shift
+
Z
Alt+Shift+Z to transform
your-text.txt
0/500 chars
10 of 10 free
Before
After
Alt+Shift+ZTransform
Alt+TCycle
Alt+UUndo

Lenses, comparisons and guides for Linux

Frequently asked questions

Can Zero Shot run completely offline on Linux?

Yes. Install Ollama, pull a model such as llama3.2, and run zs with --local (add --model to choose the model). Requests go only to http://127.0.0.1:11434/v1 and cost $0 credits. Offline, lens names are applied to your local model as a style instruction, and searching the hosted lens catalog needs a connection.

Does it work on Wayland and Hyprland?

Yes. The Omarchy/Hyprland setup script adds Alt+Shift+Z, Alt+T, Alt+U and Alt+Shift+L bindings that call zeroshot-trigger. Pasting uses wtype and wl-clipboard, with ydotool as a fallback. X11 sessions use xdotool and xclip.

Is there an AppImage, .deb or Flatpak?

Not yet. Today the supported Linux paths are the zs CLI and the Hyprland bindings for the Zero Shot Desktop engine, which currently runs from a local build. We'd rather say that plainly than link a download that doesn't exist.

Can I write git commit messages with it?

Yes: zs -l commit-message "what you changed and why" | git commit -F - turns a rough note into a conventional commit (type(scope): subject plus a short body). The pr-description and standup-update lenses work the same way.

Will pasting a rewrite into my terminal run a command?

No. In terminal emulators Zero Shot strips line breaks before pasting, uses Ctrl+Shift+C/V instead of Ctrl+C/V, and never presses Enter for you.

Does the zs CLI work on macOS and Windows too?

Yes. It's one Node 18+ script. Use the same one-liner on macOS, in Git Bash or in WSL; in PowerShell, download zs.mjs and run node zs.mjs --help.