Espanso Documentation
website·Indexed 38 days ago
https://espanso.org/docs/get-started/Documentation for Espanso, a text expander that uses YAML files to manage configurations. It features static and dynamic matches, regex triggers, variable injection, and forms. Supports Windows 10+, macOS 10.13+, and Linux (X11 and Wayland). Includes guides on package creation, CLI usage, and statistics tracking introduced in v2.4.0.
What's inside Espanso
- Espanso is an open-source, cross-platform text expander for Windows, Linux, and macOS. It works by detecting a specific keyword typed by the user and automatically replacing it with a predefined snippet of text. It is licensed under GPL-3 and uses a file-based configuration system.
Understand the Espanso configuration structure
Espanso separates configuration into two primary directories:
config/: Defines HOW Espanso behaves (expansion speed, UI shortcuts, etc.). Thedefault.ymlfile is the base profile used when no other app-specific configuration is active.match/: Defines WHAT Espanso expands. This contains snippet definitions and global variables. For basic use-cases, snippets should be placed inbase.yml.
Install Espanso on Windows
Espanso is compatible with Windows 10 or later on x64 architecture. It can be installed via a standalone installer, run as a portable application via a ZIP archive, or installed using a Windows package manager.Organize matches using multiple files in the match directory
Espanso automatically loads all YAML files (with
.ymlor.yamlextensions) located in the$CONFIG/matchdirectory and its sub-folders. This allows you to split your snippets into multiple 'match sets' instead of putting everything inbase.yml.Important Exception: Any file starting with an underscore (
_) is ignored by the automatic loader and will not be loaded unless explicitly imported or included.# Example: $CONFIG/match/emails.yml matches: - trigger: ":sig" replace: "Best, John" - trigger: ":sig" replace: "All the best, John"Publish a public package to the Espanso Hub
To share a package publicly via the Espanso Hub:
- Fork the Espanso Hub repository.
- Clone your fork locally.
- In the
packages/directory, create a new folder named after your package (e.g.,packages/simple-package). - Inside that folder, create a versioned subfolder (e.g.,
packages/simple-package/0.1.0) containingpackage.yml,_manifest.yml, andREADME.md. - Customize these files with your snippets and metadata.
- Commit and push changes to your fork, then open a Pull Request to the original
espanso/hubrepository for review.
Undo an accidental expansion with Backspace
If you accidentally trigger an expansion, pressing theBACKSPACEkey immediately after the expansion will revert the action and recover the trigger string. This behavior can be disabled in theconfig/default.ymlfile.undo_backspace: falseCreate a basic text replacement match
To create a snippet, add a match to the
matcheslist in$CONFIG/match/base.yml. A match consists of atrigger(the keyword you type) and areplace(the resulting text).Note: Use spaces for indentation to ensure valid YAML syntax. Espanso automatically reloads configuration upon saving the file.
matches: - trigger: ":br" replace: "Best Regards,\nJon Snow"Install Espanso on Ubuntu/Debian (X11)
For Debian-based systems running X11, the recommended method is using the.debpackage. You can verify the package integrity using the SHA256 hash provided in theespanso-debian-x11-amd64-sha256.txtfile on the GitHub Releases page.# Download the package wget https://github.com/espanso/espanso/releases/latest/download/espanso-debian-x11-amd64.deb # Install the package sudo apt install ./espanso-debian-x11-amd64.debInstall a specific version of an Espanso package
While Espanso installs the latest version by default, you can target a specific version of a package using the--versionflag.espanso install <package_name> --version <package_version> # Example espanso install html-utils-package --version 0.1.0Install Espanso on Fedora-based systems (X11)
For Fedora-based systems running X11, Espanso is available via the third-party Terra repository. First, follow the Terra repository installation instructions at https://developer.fyralabs.com/terra/installing, then install the package using DNF.sudo dnf install espanso-x11Install Espanso packages from generic Git repositories
Espanso can install packages from any Git repository that follows the Package Specification. Unlike GitHub/GitLab integrations, installing from a generic Git repository requires thegitcommand to be installed and available in the system PATH, as Espanso usesgit cloneto fetch the package.espanso install dummy-package --git https://github.com/espanso/dummy-repository --externalInstall Espanso on macOS via App Bundle
Espanso supports macOS 10.13 or greater on both Intel and Apple Silicon architectures. To install as a traditional app bundle, download the Universal binary disk image (.dmg), open it, and drag the Espanso application into the/Applicationsfolder.