Skip to content

Workflows

A workflow chains a trigger (a keyword, a shortcut, Universal Actions, a command) to actions and outputs: type issue 14 and open issue 14, select text in any app and tidy it up, run your own script and show its result. You build workflows as boxes and connectors in Settings → Workflows, or write the small workflow.toml file yourself.

Try one in two minutes

  1. Open Settings → Workflows and press New from template…, then Use this next to Open a URL with the query. The builder opens it.
  2. Press Save (Ctrl+S). The template runs no code, so Sevak does not ask for permission.
  3. Open Sevak and type issue 14, then issue dark mode. The first opens issue 14 in your browser; the second searches the issues.

In the builder you can see why: the Conditional box looks at what you typed and follows its then connector for a number and its else connector for anything else.

The builder

The workflow builder showing a keyword trigger, a conditional and two Open URL actions joined by lines, with the workflow details on the right.

Settings → Workflows lists every workflow, with a switch to turn each on or off, Edit, Delete, and Review… for one that waits for your permission. New workflow starts a blank one; New from template… offers three starting points (search a site, open a URL with the query, a script filter).

In the builder:

To Do
Add a node Pick it from Add a node…; it appears at the top-left of what you see
Move a node Drag its box (or focus it and use the arrow keys; Shift moves further)
Connect Drag from the dot on the right edge of a box to another box. A conditional has two dots, then and else
Connect without a mouse Select the node and use Connect to… in the side panel
Edit a node Click it; its settings are in the side panel
Delete a node or a connection Select it and press Delete
Arrange the boxes Tidy
Save Save or Ctrl+S

The builder refuses connections that cannot be right (to a trigger, to the same node, or one that would make a loop), and the Problems list under the side panel shows what else is wrong; a node with a red dot has an error, a yellow dot a warning. Save is only available when there are no errors. Warnings, such as a node nothing leads to, do not stop you.

Notes, disabling and several boxes at once

  • Notes. Every node has a Note field in the side panel. The first part shows as a small caption under the box (hover for all of it; double-click the caption to edit it). A note is only documentation: it never changes what runs and never asks for permission again.
  • Disabling. Select a connection and press D (or use the button in the side panel) and it is drawn dashed and dimmed; the run does not follow it. The same for a box: tick Disable this node or press D with boxes selected. A disabled node does not run and its branch stops there. A disabled trigger (keyword, script filter, list/file filter, running apps, hotkey, Universal Actions, external) is not registered at all, so its keyword and hotkey are free again. A disabled node with an empty required field is a warning instead of an error, so you can park half-built boxes.
  • Selecting several. Shift, Ctrl or Cmd plus click adds or removes a box; drag on empty canvas to draw a selection rectangle. Dragging or the arrow keys move every selected box.
  • Aligning. With two or more boxes selected, the Align buttons in the top bar line them up on the left edge, horizontal centre, top or vertical middle; with three or more, Space across and Space down spread them evenly between the outer two. Alt+click a box aligns the selection to that box using the last Align button you used (left to start with).
  • Quick connect. Select a box, then Shift+Alt+click another: the selected box's first output is connected to it.
  • Moving around with the keyboard. Ctrl/Cmd plus an arrow selects the nearest box that way; Ctrl/Cmd+Alt+→ follows the connections to the first box after the selected one, ← to the first box before it. With nothing selected the arrows scroll the canvas. Dragging a new connection to the edge of the canvas scrolls it.
  • ? (or the ? button) lists all of this. The same table is in Keyboard shortcuts.

Notes and disabled flags are saved as note = "..." and disabled = true on a [[node]] and disabled = true on a [[connection]]; both are left out when unused, so existing files do not change on save. Permission: note is not part of what you allow. A disabled flag is, when it is set on a node that runs code or on a connection, so a workflow you allowed with something switched off asks again if that is later switched on by hand. Files that never use the flags keep their old permission.

Saving rewrites workflow.toml in the builder's own layout, so comments and formatting you added by hand are not kept. The builder never touches the scripts and other files in the folder.

Triggers

Every workflow starts at one or more triggers. A workflow may have several.

Trigger Starts when Argument
Keyword you type the keyword (docs rust) and press Enter on its result the text after the keyword
Script filter you type its keyword and pick a row of the results its script printed the row's arg
Hotkey you press a global shortcut empty
Universal Actions you select text, a link or files, press Ctrl+Alt+Space and pick the workflow the selection
External trigger sevak --trigger <folder>/<node id> [text] runs the text after it

Keyword. argument says whether text must follow: optional (the default), required (the result says "Type some text after the keyword" and does nothing until you do) or none. The label of the node is the result's title and may use {query}. Pressing Tab on the bare keyword completes it to keyword.

Keyword clashes. A keyword that is already used by a built-in search, a web search engine, a script plugin or another workflow (compared without regard to case) is only a warning, so the workflow still runs and both sets of results are shown. The warning names the other owner (for example Keyword "g" is also used by web search Google; both will show results.) and appears next to the node in the builder, on the Workflows page and in the log. Give the keyword another name to silence it.

Hotkey. The key uses the same syntax as the shortcut settings (Ctrl+Alt+K). Sevak registers it like a [[hotkey]] entry in config.toml (without writing it to that file), so it needs a system that lets Sevak grab keys: Windows, macOS and Linux with X11. On Wayland use an external trigger and bind a key to the command in your desktop's settings. Registration problems, such as a key another app owns, show on the workflow's row. The id of the result the key runs is workflow:<folder>:run:<node id>, so sevak --run workflow:my-flow:run:key does the same from a script.

Universal Actions. The node's Offer it for choice picks the kinds of selection that show the workflow in the actions list: Text (any text, including a link), Links (a selection that is only links) and Files and folders. The selection becomes the argument, one link or path per line when there are several; the variable selection_kind is text, url or file. See Universal Actions for how Sevak reads the selection.

External trigger. For anything that can run a command: a desktop shortcut on Wayland, a script, a file manager action, a scheduled task.

sevak --trigger my-flow/go                 # no text
sevak --trigger my-flow/go some text       # several words are one text
sevak --trigger my-flow/go -- --starts-with-dashes

my-flow is the workflow's folder name and go the id of the external trigger node (shown under Id in the builder). Sevak must be allowed to run the workflow, enabled, and valid; otherwise the launcher opens and says why.

Nodes

Actions

Node Does Notes
Run script runs a program; what it prints becomes the argument details below
Open URL opens a web or mail link only http, https and mailto; placeholders are URL-encoded; the address must be well formed (a host, no user name or password in it, no control characters or quotes, at most 8192 bytes; a mailto: link only recipients, subject and body)
Open file opens a file or folder with its default program ~ is your home folder; a relative path is inside the workflow's folder; a program or script opens by running, so needs permission
Launch app starts an application by name (as in the launcher) or by path runs code, so needs permission
System command lock, sleep, hibernate, restart, shutdown, logout, empty_trash needs permission; the destructive ones ask each time
Terminal command opens your terminal and runs a command line needs permission; see quoting
Copy puts text on the clipboard
Paste pastes text into the app you were using copies instead where pasting is unavailable; types into another app, so needs permission
Write file writes text to a file (Replace it, Add to the end or Add to the start) needs permission. A relative path is inside the workflow's data folder (the same one scripts get as SEVAK_WORKFLOW_DATA); ~ and full paths work. Create missing folders makes the folders on the way. The next nodes get the path as their argument
Show in file manager reveals each file or folder (one per line) in Finder, Explorer or your file manager a relative path is inside the workflow's folder
Call workflow runs the external trigger id of the workflow in folder name with the text you give, waits for it, and carries on with its own argument the other workflow must be installed, enabled and allowed (it may be this one). Send the variables too hands the variables over; otherwise it starts with its own. If the other workflow fails, this node fails with its message. Calls nest at most 8 deep, which stops a workflow that calls itself

Run script

Give either a program and arguments (one per line, the program first) or a script file in the workflow's folder, which Sevak starts the way it starts script plugins (.py with Python, .ps1 with PowerShell, .js with Node, .sh with sh, anything else as an executable). No shell is involved: every argument is passed as it is, so {query} in an argument cannot run commands, no matter what it contains.

  • The script runs in the workflow's folder.
  • More arguments and Standard input may use placeholders.
  • Its variables arrive as environment variables, as do SEVAK_QUERY (the argument, if under 16 kB), SEVAK_WORKFLOW_ID, SEVAK_WORKFLOW_DIR, SEVAK_WORKFLOW_DATA (a folder for the script's own files), SEVAK_VERSION, and the names Alfred workflows read (alfred_workflow_*). A script does not inherit Sevak's whole environment: it gets PATH, the home and temp folders, the locale, the XDG_* folders, the display variables and what Windows programs need to start, nothing else (tokens and credentials in Sevak's environment stay out of reach). Variables that change how programs start or where they look (PATH, HOME, TMPDIR, BASH_ENV, PYTHON*, NODE_*, PERL5*, RUBY*, JAVA_*, LD_*, DYLD_*, GIT_*, DOTNET_*, proxy and certificate variables, XDG_*, SEVAK_* and a few more, in any letter case) are never exported from workflow variables, and a node's own Environment variables may not name them: the builder reports an error and the workflow does not load until it is removed. Other names are passed.
  • What it prints (standard output, up to 1 MiB, minus the final newline) becomes the argument of the next nodes. If it prints Alfred's envelope {"alfredworkflow": {"arg": "...", "variables": {"name": "value"}}}, the argument and the variables are set from it.
  • It is stopped after its timeout (10 seconds unless you set another, up to 5 minutes). A non-zero exit ends the branch with "exited with code N".
  • Its error output is discarded, because it may hold your data. Tick Log its error output while debugging to write its first 500 characters to Sevak's log.

Utilities

Node Does
Set variable name = value (placeholders allowed) for the nodes after it
Transform changes the argument, or stores the result in a variable (Store in variable): set, UPPER, lower, Title Case, trim, URL-encode/decode, Base64 encode/decode, replace text, replace with a regular expression ($1 is a group), first line, split at some text and keep part n
Conditional continues along then when the test holds, else otherwise: equals, does not equal, contains, does not contain, starts with, ends with, matches a regular expression, is empty, is not empty (optionally ignoring case)
Delay waits up to 60 seconds
Split argument cuts the argument at a new line, comma, tab, space or text of your own into a list (one item per line) and sets the variables <prefix>1, <prefix>2 ... and <prefix>count (prefix split_ unless you change it). Empty parts are dropped and spaces trimmed, each unless you turn it off. At most 200 numbered variables are set; the list and the count always have every item
Join argument joins a list (one item per line, or a JSON array such as ["a", "b"]) with a separator; \n and \t in the separator mean a new line and a tab. Drop empty items is optional
Random a whole number from the smallest to the largest (both included), a random line of the text you give (placeholders allowed), or a version 4 UUID. It becomes the argument, or goes into Store in variable when that is set
Calculate fills in the placeholders of an expression such as {var:count} + 1, calculates it with the launcher's calculator (so its functions and constants work) and stores the result in the variable you name (required). It also becomes the argument unless you turn that off. A wrong expression ends the branch with an error
Debug shows the argument and every variable in the launcher window (as a text view) and passes the argument on; turn Pass the argument on off to empty it. Only for you to see: it is never written to the log, because it holds what you typed
Dialog shows a window with a heading, a message and one to three buttons (all may use placeholders); continues along the output of the button pressed (button 1 to button 3), or along cancel when the window is closed

Regular expressions are Rust's regex syntax: linear time, no look-around, and limited in size, so a pattern cannot hang Sevak.

Outputs

Node Shows
Notification a system notification (heading defaults to the workflow's name)
Large Type the text huge on screen (dismiss with any key or a click)
Text view the text in the launcher window, below the search bar; tick Markdown ("markdown": true) to draw it as Markdown with headings, lists, tables, code and links (links open in your browser)
Speak reads the text aloud with the system voice (text defaults to {query}; Voice names an installed voice, empty is the system one). It does not wait for the speech to finish. macOS uses say, Windows the .NET speech synthesizer, Linux spd-say or espeak-ng/espeak; the text never goes through a shell
Play sound plays a sound file: wav, mp3, aiff, aif, m4a, ogg or flac (macOS afplay, Windows PowerShell, Linux paplay, pw-play or aplay). A relative path is inside the workflow's folder; it does not wait for the sound to finish
Show UI opens a small interface described in JSON, in the launcher or a window, waits for it and continues from the output a button names (or closed). See Sevak UI. A UI that declares scripts needs your Allow

The workflow's Description in the editor is also read as Markdown: a preview under the box shows how it will look.

Script filter

A script filter is both a trigger and an input: it has its own keyword, runs a script whenever the text after the keyword changes (the text is the last argument), and shows the rows the script prints as results. Picking a row starts the nodes after it with the row's arg as the argument and its variables as variables. It speaks Alfred's Script Filter JSON; the same rules as script plugins apply (a late script never blocks typing, results are cached for a moment, etc.), plus:

Item field In a workflow
arg the argument of the next nodes (the first string of an array)
variables variables for the next nodes (text, numbers and booleans)
valid: false the row only informs; Enter does nothing
autocomplete what Tab types (after the keyword)
mods secondary actions: cmd is Ctrl+Enter (⌘↵ on macOS), alt is Alt+Enter, shift is Shift+Enter; ctrl, fn and combinations are in the action panel (→ or Ctrl+K). A mod's own arg and variables replace the row's, and the variable mod tells the next nodes which one was picked (alt, cmd+alt, ...)
uid, title, subtitle, icon.path as in script plugins
quicklookurl the preview pane (Shift or Ctrl+Y): a file path shows the file, an http(s) address is shown as a link and never fetched
text.copy, text.largetype what Ctrl+C (⌘C) copies and what Large Type (Ctrl+L) shows, instead of the arg and the title
match what the typed text is matched against when the node has Sevak filters the results on (the title otherwise). Rows that do not match are hidden, the rest are ranked by the match

Top-level keys of the answer:

Key Effect
variables variables for the next nodes, under each row's own (the row's value wins)
skipknowledge: true the rows keep the script's order: what you pick often never moves them
cache: {"seconds": N, "loosereload": true} the answer for that exact query is kept for N seconds (5 to 86 400, 64 queries per node, in memory only) and the script is not run again meanwhile. With loosereload, an expired answer is shown at once while the script runs again and the list then refreshes
rerun: 0.5 while the same text stays in the launcher, the script runs again after that many seconds (0.1 to 5) and the list refreshes. It stops when the text changes or the launcher hides
strictmods, icon.resize, iconresize accepted and ignored

mods also accepts ctrl and fn and combinations such as cmd+alt. Sevak's launcher has no Enter-with-Ctrl-or-fn key of its own for those (its Ctrl is Alfred's cmd), so they appear in the action panel only; each entry's arg, subtitle, valid and variables work as for the others.

Use a Conditional on {var:mod} to treat an alt pick differently.

The script filter uses the workflow's variables (and the values of its settings) as environment variables, plus SEVAK_WORKFLOW_* and the names Alfred scripts read: alfred_workflow_bundleid, alfred_workflow_name, alfred_workflow_keyword (the keyword that started it), alfred_workflow_data (files to keep), alfred_workflow_cache (a folder of its own, apart from the data folder, for what can be thrown away), alfred_version (5.5) and alfred_debug (0). It stops a run after Stop the script after (3 seconds by default). A script filter that gives both a script and extra arguments looks for its interpreter when the workflow loads, so choose Reload index after installing Python or Node.

Filters without a script

Three inputs list rows like a script filter does, with no program to run, so they need no approval. Each has its own keyword; picking a row starts the nodes after it with the row's argument.

Node Rows Argument
List filter the items you write in the builder (title, subtitle, argument), narrowed by the typed text with Sevak's fuzzy matching (a subtitle match counts for less) the item's argument, or its title when that is empty
File filter file and folder names from Folders (the [files] directories when empty; [files] depth, hidden-file and network-path settings apply), optionally only the listed extensions and only files or only folders the full path
Running apps the apps that have a window, as the quit task lists them The name, the path (known for apps Sevak also lists in its launcher; the name otherwise) or the process id (the first one)

The file list is scanned in the background (up to 20 000 entries, refreshed with the file index) and the list of running apps is cached for three seconds, so typing never waits for the disk or the system. Type the keyword and a space to list everything.

Placeholders, the argument and variables

Text fields of nodes can use placeholders:

Write Becomes
{query} the argument that reached the node
{var:name} the variable name (empty when it was never set)
{query\|upper} filters, left to right

Date and time placeholders use the current local time:

Write Becomes
{date}, {time}, {datetime} 2026-10-03, 14:05, 2026-10-03 14:05
{isodate}, {isotime}, {isodatetime} 2026-10-03, 14:05:09, 2026-10-03T14:05:09 (24 hour)
{date:%d %B %Y} any strftime format ({time:...} and {datetime:...} too): 03 October 2026

A format Sevak cannot read leaves the text as written. They are encoded or quoted like {query} in links and terminal command lines. They take no filters.

Filters: url (percent-encode), raw (insert as it is: no encoding in a link, no quoting in a command line), upper, lower, title, trim, json (escape for a JSON string), sh (quote as one POSIX shell word) and ps (quote as one PowerShell string). Other text in braces, such as JSON or ${HOME}, is left alone.

  • In Open URL, every placeholder is percent-encoded, so https://example.com/?q={query} is safe for any text. A variable that holds a whole address needs |raw: {var:site|raw}/search?q={query}.
  • In Terminal command, every placeholder is quoted as one literal word for the shell that runs the line (the one [shell] picks: single quotes for sh, bash, zsh and the macOS login shell, PowerShell single quotes for pwsh and powershell, double quotes for cmd). So grep {query} notes.txt searches for the whole argument even if it is x; rm -rf ~, and nothing in it runs. cmd cannot quote ", %, ! or a line break: an argument with one of them makes the node fail with an error rather than run. To put text into the command line as commands, opt out with |raw (git {query|raw}), and only for text you trust. |sh and |ps still pick a quoting style by hand. Run script passes arguments without any shell and needs none of this.
  • Expanded text is capped at 4 MiB.

The argument starts as the trigger's text. Run script replaces it with what the script prints; Transform replaces it (or stores into a variable); every other node passes it on. Variables start from the workflow's own [variables] (edit them in the builder with nothing selected) and the trigger's (a script filter row's), and nodes can add more.

How a run works

  • A node with several connections runs them one after the other in the order they appear in the file (the order you connected them), each with its own copy of the argument and variables. So a workflow always does the same things in the same order.
  • A node that fails (a script that exits with an error or times out, a link that cannot open) ends its branch only; the other branches carry on. Sevak shows a notification naming the node and what happened.
  • Everything runs on a thread of its own, never in the launcher or while you type. The launcher hides before a workflow starts, so a Paste node returns to the app you were using.
  • Limits: at most 200 steps per run (a node on two branches counts twice), 15 minutes in total, 8 workflows at once. Reload index, saving settings or quitting stops workflows that are still running.
  • The log names the workflow and the node ids (workflow finished, node failed and the kind of node), never what you typed, selected or copied, and never a program's output.

Permission, privacy and limits

Permission. A workflow whose nodes can run code or commands (Run script, Script filter, Launch app, System command, Terminal command, Open file, because opening a program or script runs it), type into other apps (Paste) or write files (Write file) does nothing until you allow it. Sevak shows a dialog with the workflow's name, what starts it, whether it will receive your Universal Actions selection, every command with its arguments, the names of the environment variables a script node sets, whether it sends text to a program's standard input, and "also does:" lines for every node that pastes text, writes a file or opens a file or link. It closes with the folder's name and a short contents id. Text written by the workflow's author is shown with control and direction-changing characters removed and long text cut, so it cannot fake extra lines or hide what runs. Sevak remembers your answer in script-plugin-approvals.json (the file script plugins use). Not now asks again at the next start; the workflow's row has Review… if you change your mind.

What you allow is what can run: the settings of those nodes, the connections, the workflow's variables and the contents of the script files they name. If any of that changes (an edit in the builder, or a script file changed on disk), Sevak asks again after the next reload. Moving boxes, renaming and retitling do not. A workflow that only opens links, copies and shows text runs without asking, because it can do no more than the actions in the launcher can; it still never runs anything you did not trigger. A Paste node does ask: it types into whatever app was in front, which is as good as you typing it, so a workflow that pastes needs your yes too (workflows you had with a Paste node ask once after upgrading). A file that an Open file node names inside the workflow's folder is part of what you allow, like a script.

Two caveats. A script may read other files the workflow folder refers to (a module it imports) without Sevak noticing a change in them: install workflows you trust. And workflows are not sandboxed: a script has your account's permissions.

Privacy. Workflows never send anything anywhere on their own. What a script does on the network is up to the script. The Universal Actions selection reaches a workflow only when you pick it, lives in memory, is not in result ids, and does not touch the usage history or search history (workflows triggered by Universal Actions, hotkeys and --trigger record nothing there; keyword results are recorded like any result).

Settings → Gallery lists ready-made workflows and script plugins. It is opt-in and on request:

  1. Opening the page requests nothing. Load gallery downloads one small file, gallery/index.json from the Sevak repository on GitHub (raw.githubusercontent.com) at the tag of your Sevak version, and shows what it lists. A change made to the repository later does not change what your version offers. A build without a published release (a local or pre-release build) reads the latest release's list and says so on the page. Files are requested only from Sevak's own repository, also when a request is redirected; see Gallery trust.
  2. Install on an entry downloads that one package, a zip, over HTTPS, checks it against the SHA-256 in the index and discards it if it does not match, refuses any path that would leave the folder (and links, oversized or too-many files), checks that the workflow or plugin inside is valid and unpacks it into the workflows or plugins folder. An existing folder is never overwritten.
  3. The new folder is not allowed yet: Sevak shows its usual permission dialog before anything in it runs.

Ten workflows and six script plugins ship in the gallery, all written by the Sevak project and described in gallery/README.md:

Workflow Does Runs code?
DuckDuckGo search ddg words no
Developer search so, mdn, crate, docsrs, npm, pypi open that site's search no
GitHub search ghr repositories, ghi issues and pull requests, ghu people no
Wikipedia search wiki words; change the lang variable for another language no
Maps search map place (OpenStreetMap), gmap place (Google Maps) no
Open selection as a link Universal Actions: opens a selected web address; javascript:, file: and non-addresses are refused no
Tidy up whitespace Universal Actions: collapses spaces and line breaks and pastes the result no
Markdown helpers Universal Actions: Markdown link, bold, code, quote, bullet list no
Decode and encode Universal Actions: Base64 and URL decoding in a text view, encoding to the clipboard no
Selection toolkit Universal Actions: word count (Large Type), JSON pretty-print and minify, timestamp and date a short Python 3 script, after you allow it

Tidy up whitespace and Markdown helpers run no code but paste into the app you came from, so (like any workflow with a Paste node) they ask for your permission once after you install them.

The plugins are the case converter (Node.js) and Python 3 plugins for passwords (pw), IDs (id: UUID v4/v7, ULID, NanoID), colors (color), placeholder text (lorem) and checksums (hash). The search workflows only open your browser at the site named in the workflow; none of the gallery's content makes a network request itself. Packages are small and readable on purpose, and the repository's tests run every workflow and script against sample input.

Each request sends only what any web request does (your address, and a user agent Sevak/<version> (gallery)). Nothing else leaves your computer, and Sevak keeps no account or identifier. The bundled examples are in examples/ and their zips in gallery/packages/.

The newer Settings → Extensions page and the ext keyword use the same lists and the same checks, and add updates, removal and native extensions (programs written in Rust); see Extensions.

To offer your own package: pack the folder (cargo run -p sevak-plugins --example gallery_pack -- <folder> <out.zip> prints the SHA-256), add an entry to gallery/index.json (its source is the path of the zip relative to the repository root, gallery/packages/<id>.zip; node scripts/gallery-check.mjs --update fills in the hashes and checks the rest) and open a pull request. The rules a package has to meet and a pre-merge checklist are in gallery/README.md; see also plugins.md.

Settings the user fills in

A workflow can ask for settings (a server name, an API key, a folder, a unit) instead of having them edited into its scripts. Add them in the builder, under the workflow's own properties (Settings form), or as [[config]] tables:

[[config]]
variable = "api_host"          # becomes {var:api_host} and an environment variable
kind = "textfield"             # textfield | textarea | checkbox | popup | slider | filepicker
label = "Server"
description = "Without https://"
required = true                # the workflow does not run until it has a value
placeholder = "example.com"

[[config]]
variable = "units"
kind = "popup"
default = "metric"
options = [{ label = "Metric", value = "metric" }, { label = "Imperial", value = "imperial" }]

[[config]]
variable = "volume"
kind = "slider"                # min, max (default 0 to 100) and step
default = 40
min = 0
max = 100
step = 5

[[config]]
variable = "root"
kind = "filepicker"
mode = "folder"                # file (default) or folder

The user opens the form with Configure… on the workflow's row in Settings → Workflows, and straight after installing a workflow that needs it from the gallery. Rules:

  • Variable names start with a letter or _ and use letters, digits and _, each at most once. A popup needs at least one option with a value; a slider's min must be less than max; a default must fit its kind. Names such as PATH that change how programs start are refused.
  • A value is the user's value, else the field's default, else the workflow's own [variables] entry of that name, else nothing. A checkbox is true or false, a slider a number, a file picker a path (~ is expanded).
  • The values are saved in <data folder>/workflows/<folder>/user-config.json, outside the workflow folder: editing, updating or reinstalling the workflow keeps them. They are your data, not part of what you allowed, so changing them never asks for permission again. The [[config]] declaration itself (names, kinds, defaults, options) comes from the workflow's author and is part of what you allowed: editing it asks again.
  • A workflow with a required setting still empty does not run. Its trigger row says Configure first: , running it shows the same notification, and a script filter lists that one row instead of running its script.
  • Values reach scripts as environment variables and as arguments, never as script source. In a terminal command {var:name} is quoted as one literal word for the shell; in links it is percent-encoded.
  • Deleting a workflow keeps these values (and anything its scripts saved) unless you choose Delete with data, which also removes its data folder, its cache folder and its settings.

The file format

A workflow is the folder <config folder>/workflows/<name>/ with workflow.toml (and scripts) in it. The config folder is next to config.toml: %APPDATA%\sevak on Windows, ~/Library/Application Support/sevak on macOS, ~/.config/sevak on Linux. Folders starting with . are ignored.

format = 1                      # the file format version
name = "Search docs"
description = "docs rust opens the Rust docs search."
author = "you"
version = "1.0"
enabled = true                  # false keeps it installed but off

[variables]                     # start-of-run variables (also environment variables for scripts)
site = "https://doc.rust-lang.org"

[[node]]
id = "kw"                       # unique; 1-40 letters, digits, - and _
type = "keyword"
title = "Search the docs for {query}"
x = 40                          # canvas position; layout only
y = 80
keyword = "docs"
argument = "required"           # none | optional | required

[[node]]
id = "open"
type = "open_url"
url = "{var:site|raw}/std/?search={query}"

[[connection]]
from = "kw"
to = "open"                     # port = "then" / "else" after a conditional

# [[config]] tables describe the settings form, see "Settings the user fills in".

Node types and their fields: keyword (keyword, argument, subtitle), hotkey (key), selection (accepts), external, script_filter (keyword, command or script, args, timeout_ms, hard_timeout_ms, filter_results), run_script (command or script, args, stdin, env, timeout_ms, log_stderr), open_url (url), open_file (path), launch_app (app, args), system_command (command), terminal_command (command), copy (text), paste (text, restore_clipboard), set_variable (name, value), transform (op, input, find, replace, index, into), conditional (left, test, right, ignore_case), delay (ms), notification (heading, body), large_type (text), text_view (heading, text, markdown), list_filter (keyword, [[node.items]] with title, subtitle, arg), file_filter (keyword, folders, extensions, scope = any, files or folders), running_apps (keyword, output = name, path or pid), dialog_conditional (heading, message, buttons; ports button1 to button3 and cancel), speak (text, voice) and play_sound (path) and show_ui (target, definition, file, scripts, ports, titlebar, always_on_top; ports are the names its output actions use, and closed; see Sevak UI). Every node may also have title, x, y, note and disabled; a [[connection]] may have disabled. Unknown type values make the whole workflow fail to load ("Not loaded: ..." on its row) rather than half-work. The examples in examples/workflows/ show real files.

To disable every workflow, use [plugins] disabled = ["workflow"] in config.toml; the switch on a workflow's row (its enabled field) turns off one. workflow:<folder> also works in that list.

Coming from Alfred

Workflows borrow Alfred's ideas, not its file format: there is no importer for .alfredworkflow packages, and Sevak's nodes are fewer. Script Filter scripts and {query}/{var:name} placeholders work as in Alfred, and Alfred's alfredworkflow envelope and alfred_workflow_* environment variables are understood. Differences worth knowing:

  • Nodes run in a fixed order, one branch after the other; Alfred runs branches in parallel.
  • Scripts are never run through a shell: use command or script with args. {query} is substituted into arguments, not into a script's source.
  • Modifier keys: Alfred's cmd is Sevak's Ctrl (Command on macOS).
  • Anything that runs code needs your permission first, and the permission is tied to what runs.

Trademark

Alfred is a trademark of Running with Crayons Ltd. Sevak is not affiliated with or endorsed by it; the name is used only to describe the file format and conventions Sevak reads.

Troubleshooting

Symptom Likely cause
The workflow's row says Waiting for your permission It runs code. Press Review… (or choose Reload index in the tray)
The row says Not loaded The file has an error; the message says which. Fix… opens it in the builder
The keyword shows nothing The workflow is switched off or waiting for permission; another plugin may also answer the keyword (both answer; the Workflows page and the builder warn about this)
A hotkey does nothing The row shows "The shortcut ... is not active" if another app owns it; on Wayland use an external trigger
A script node fails at once The interpreter is not installed (the notification says "none of ... is on PATH"), or the path is wrong. Tick Log its error output and look at Reveal logs folder
Paste only copied The system cannot paste (Wayland, or macOS without Accessibility permission); the text is on the clipboard
sevak --trigger opens the launcher with a message The workflow or node does not exist, is off, or is not allowed yet