Installation
To install Helix, follow the instructions specific to your operating system and package manager.
Package Managers
Add the PPA for Helix:
sudo add-apt-repository ppa:maveonair/helix-editor && \sudo apt update && \sudo apt install helixsudo dnf install helixReleases are available in the extra repository:
sudo pacman -S helixAdditionally, a helix-git ↗ package is available in the AUR, which builds the latest master branch.
Helix is available in nixpkgs ↗ through the helix attribute, the unstable channel usually carries the latest release.
Helix is also available as a flake ↗ in the project root. Use nix develop to spin up a reproducible development shell. Outputs are cached for each push to master using Cachix ↗. The flake is configured to automatically make use of this cache assuming the user accepts the new settings on first use.
If you are using a version of Nix without flakes enabled, install Cachix CLI ↗ and use cachix use helix to configure Nix to use cached outputs when possible.
Helix is available on Flathub ↗:
flatpak install flathub com.helix_editor.Helix && \flatpak run com.helix_editor.HelixHelix is available on Snapcraft ↗:
snap install --classic helixThis will install Helix as both /snap/bin/helix and /snap/bin/hx, so make sure /snap/bin is in your $PATH!
Install Helix using the Linux AppImage ↗ format by downloading the official Helix AppImage from the latest releases ↗ page.
# change permission for executable mode and run helixchmod +x helix-*.AppImage && \./helix-*.AppImageWindows Package Manager winget command-line tool is by default available on Windows 11 and modern versions of Windows 10 as a part of the App Installer.
You can get App Installer from the Microsoft Store ↗.
If it’s already installed, make sure it is updated with the latest version.
winget install Helix.Helixscoop install helixchoco install helixpacman -S mingw-w64-ucrt-x86_64-helixPre-built binaries
Download pre-built binaries from the GitHub Releases page ↗.
-
Add the
hxbinary to your system’s$PATHto use it from the command line. -
Copy the
runtimedirectory into the config directory:~/.config/helix/runtimeon Linux and MacOS%appdata%\helix\runtimeon Windows
Building from source
To get the latest features in the Helix editor, you need to build from source from the master branch.
Requirements
- The Rust toolchain ↗
- The Git version control system ↗
- A C++14 compatible compiler to build the tree-sitter grammars, for example GCC or Clang
Installation
-
Clone the repository:
Terminal window git clone https://github.com/helix-editor/helix && \cd helixThe examples in this documentation assume installationinto either:
~/src/on Linux and macOS%userprofile%\src\on Windows
-
Compile from source:
Terminal window cargo install --path helix-term --lockedThis command will create the
hxexecutable and construct the tree-sitter grammars in the localruntimefolder.
Configuring Helix’s runtime files
The runtime directory is one below the Helix source, so either export a
HELIX_RUNTIME environment variable to point to that directory and add it to
your ~/.bashrc or equivalent:
export HELIX_RUNTIME=~/src/helix/runtimeOr, create a symbolic link:
ln -Ts $PWD/runtime ~/.config/helix/runtimeIf the above command fails to create a symbolic link because the file exists either move ~/.config/helix/runtime to a new location or delete it, then run the symlink command above again.
Either set the HELIX_RUNTIME environment variable to point to the runtime files using the Windows setting (search for Edit environment variables for your account) or use the setx command in Cmd:
setx HELIX_RUNTIME "%userprofile%\source\repos\helix\runtime"Or, create a symlink in %appdata%\helix\ that links to the source code directory:
| Method | Command |
|---|---|
| PowerShell | New-Item -ItemType Junction -Target "runtime" -Path "$Env:AppData\helix\runtime" |
| Cmd | cd %appdata%\helix mklink /D runtime "%userprofile%\src\helix\runtime" |
Multiple runtime directories
When Helix finds multiple runtime directories it will search through them for files in the following order:
runtime/sibling directory to$CARGO_MANIFEST_DIRdirectory (this is intended for developing and testing helix only).runtime/subdirectory of OS-dependent helix user config directory.HELIX_RUNTIMEenvironment variable.- Distribution-specific fallback directory (set at compile time—not run time—
with the
HELIX_DEFAULT_RUNTIMEenvironment variable) runtime/subdirectory of path to Helix executable.
This order also sets the priority for selecting which file will be used if multiple runtime directories have files with the same name.
Validating the installation
To make sure everything is set up as expected you should run the Helix health check:
hx --healthFor more information on the health check results refer to Health check.
Configure the desktop shortcut (Linux only)
If your desktop environment supports the XDG desktop menu ↗ you can configure Helix to show up in the application menu.
-
Copy the provided
.desktopand icon files to their correct folders:Terminal window cp contrib/Helix.desktop ~/.local/share/applications && \cp contrib/helix.png ~/.local/share/icons -
Convert the links in the
.desktopfile to absolute paths to avoid potential problems:Terminal window sed -i -e "s|Exec=hx %F|Exec=$(readlink -f ~/.cargo/bin/hx) %F|g" \-e "s|Icon=helix|Icon=$(readlink -f ~/.icons/helix.png)|g" ~/.local/share/applications/Helix.desktop
To use another terminal than the system default, you can modify the .desktop file. Depending on which terminal you use:
sed -i "s|Exec=hx %F|Exec=kitty hx %F|g" ~/.local/share/applications/Helix.desktop && \sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktopsed -i "s|Exec=hx %F|Exec=wezterm start hx %F|g" ~/.local/share/applications/Helix.desktop && \sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktopsed -i "s|Exec=hx %F|Exec=alacritty --command hx %F|g" ~/.local/share/applications/Helix.desktop && \sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktopsed -i "s|Exec=hx %F|Exec=gnome-terminal hx %F|g" ~/.local/share/applications/Helix.desktop && \sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktopsed -i "s|Exec=hx %F|Exec=rio -e hx %F|g" ~/.local/share/applications/Helix.desktop && \sed -i "s|Terminal=true|Terminal=false|g" ~/.local/share/applications/Helix.desktop