zl is a tiny launcher script that helps you store, browse, and open local and remote development projects in Zed IDE (or other programs).
It works by keeping a folder of profiles (plain text files). Each profile’s first line is treated as the CLI argument(s) passed to zed.
It also uses the tv app (Television) to provide an interactive picker UI for selecting profiles, and it uses your local $EDITOR (falling back to vim) to create/edit profiles.
- Profiles live in:
~/.zl/ - Each profile is just a text file.
- The first line of the profile is read and used as the arguments to Zed.
- Example first line values:
~/code/my-projectssh://user@host/path/to/repo
- Example first line values:
- When you run the launcher with no arguments, it uses
tvto select a profile from~/.zl/. - When you run with
+ <name>, it opens (or creates) a profile file in$EDITOR.
- Bash (script uses
#!/usr/bin/env bash) - Zed installed and available as
zedon yourPATH tv: Television for interactive profile selectionbat: alternative tocatfor viewing profiles in Televisionfd: alternative tofindfor file search in Televisionripgrep: alternative togrepfor text search in Television- Optional: set
$EDITORfor profile editing (defaults tovim)
-
Put
zlsomewhere in yourPATH:Example:
- Copy it to
~/.local/bin/zl(or another bin directory you use) - Make it executable
chmod +x ~/.local/bin/zl
- Copy it to
-
Install dependencies:
-
macOS:
brew install television bat fd ripgrep -
Ubuntu:
sudo apt-get install television bat fd ripgrepOn Ubuntu you may need to add repositories for
television,bat,fd, andripgrepif they are not available in the default repositories, or download them from their respective websites.
-
-
Then run it from your terminal as:
zl(interactive selection viatv)zl <profile_name>(open that profile directly)zl + <profile_name>(create/edit a profile)
Run:
zl
If tv is installed, it will show a picker of files in ~/.zl/. Selecting one launches Zed using the profile’s first line as arguments.
Run:
zl my-profile
This reads ~/.zl/my-profile, takes the first line, and runs:
zed <first-line>
Run:
zl + my-profile
This opens ~/.zl/my-profile in $EDITOR (or vim if $EDITOR is not set).
If the profile doesn’t exist yet, it’s created with an initial ssh:// line so you can quickly fill in a remote target.
A profile is a plain text file. Only the first line is used by the launcher.
Everything after the first line is ignored by the script, which is useful for notes.
Example profile: ~/.zl/work-dev
First line is what matters:
ssh://me@dev.example.com/var/www/app
You can also add notes:
- second line and beyond: anything you want (hostnames, reminders, commands, etc.)
If the first line begins with ~ or ~/..., it will be expanded to your home directory before running Zed.
Create a profile:
zl + my-local
Put this on the first line:
~/code/my-local
Then run:
zl my-local
Create/edit:
zl + remote-dev
First line:
ssh://user@server.example.com/home/user/project
Run:
zl remote-dev
Profile file: ~/.zl/client-a
First line:
~/work/client-a
Notes below:
# staging: ssh://me@staging.example.com/...# jira: https://...# runbook: ...
By default, the script runs zed. You can override it with LAUNCH_TARGET.
Open the same profiles with a different command:
LAUNCH_TARGET=code zl my-local(VS Code, ifcodeis installed)LAUNCH_TARGET=zed-preview zl my-local(if you have an alternate Zed binary)LAUNCH_TARGET=echo zl my-local(debug: prints what would be executed)
Because the launcher is “read first line → exec a command”, you can adapt it for many workflows beyond Zed.
- Use short, memorable profile names (
work,dev,client-a,notes, etc.). - Store one profile per repo / environment.
- Add comments and reminders under the first line—only the first line is used to launch.
-
zlsaystvis not installed
Installtv(Television) or runzl <profile>directly instead of using interactive mode. -
It can’t read a profile file
Ensure the file exists in~/.zl/and is readable:ls -l ~/.zl/<profile>
-
Zed doesn’t open the target
Try running the command manually:zed "<first-line-from-profile>"
This helps confirm whether the issue is with the profile content or with Zed itself.