Install
efr has three programs and one zsh plugin:
efr, the command that you and the plugin run.efrd, the daemon. It runs as a systemd user service.efr-sbx, the launcher of theautosandbox. efrd and the hidden shells run it. It is not on yourPATH.efr.plugin.zsh, which sends each,line to efr.
You can install efr from the AUR on Arch Linux, or build it from a clone of the repository.
Requirements
- Linux with a systemd user session. The AUR packages are for x86_64.
- zsh. The plugin works only in zsh.
These programs are optional. efr works without them, but some parts do not:
| Program | What needs it |
|---|---|
bubblewrap and Linux 7.1 or newer | The kernel sandbox of the auto mode. Without them, auto runs as cautious. |
fzf 0.46 or newer | The live search picker of ,resume. Without it, ,resume shows a numbered list. |
git | Project roots and the git facts of a turn. |
xdg-dbus-proxy 0.1.9 or newer | Read-only system queries in the auto mode, such as hostnamectl. |
xdg-utils | efr login openai opens the browser itself, with EFR_OPEN_BROWSER=1. |
Install from the AUR
There are two packages. Install one of them:
efr-codebuilds efr from the source of the release tag. For the build, it downloads Zig 0.16.0 from ziglang.org. It does not use the Zig of the Arch repositories.efr-code-bininstalls the release build from GitHub.
yay -S efr-code # or: yay -S efr-code-bin
The packages install these files:
| File | Path |
|---|---|
efr and efrd | /usr/bin/ |
efr-sbx | /usr/lib/efr/ |
| The zsh plugin | /usr/share/zsh/plugins/efr/efr.plugin.zsh |
The user unit efrd.service | /usr/lib/systemd/user/ |
An example config.toml | /usr/share/doc/efr-code/examples/ |
Then do the three steps of Set up efr as your own user. The package prints them when you install it.
Install from a clone
You need just, rustup and Zig 0.16.0. rust-toolchain.toml pins Rust 1.99, and
rustup installs it for you. Only the ghostty screen backend needs Zig. just install
makes a release build, and a release build enables that backend.
just install
just install copies these files:
| File | Path |
|---|---|
efr and efrd | ~/.local/bin/ |
efr-sbx | ~/.local/lib/efr/ |
The user unit efrd.service | ~/.config/systemd/user/ (or $XDG_CONFIG_HOME/systemd/user/) |
~/.local/bin must be on your PATH. just install reloads systemd, but it does not
enable or start the unit. The zsh plugin stays in the clone, at shell/zsh/efr.plugin.zsh.
Set up efr
Do these steps as your own user, not as root.
-
Add the plugin to your
~/.zshrc. For the AUR packages:echo "source /usr/share/zsh/plugins/efr/efr.plugin.zsh" >> ~/.zshrcFor a clone, run this in the root of the clone:
echo "source $PWD/shell/zsh/efr.plugin.zsh" >> ~/.zshrc -
Start the daemon now and at each login:
systemctl --user enable --now efrd -
Log in to your ChatGPT plan:
efr login openaiefr prints a URL. Open it in a browser on this machine. efr waits until the login in the browser is done. With
EFR_OPEN_BROWSER=1, efr opens the URL itself.
To use an OpenAI API key or Anthropic's Claude models, see Models, providers and login.
Open a new terminal, or run exec zsh, so that zsh loads the plugin. When efr is not
on your PATH, the plugin says so when it loads:
efr.plugin.zsh: efr is not on PATH; the , commands stay inactive until it is installed
Keep the daemon running
To keep the daemon running when you are not logged in, run this command one time:
loginctl enable-linger
Your .zshrc and the hidden shell
efrd starts one hidden zsh for each conversation. That zsh reads your .zshrc too,
with EFR_HIDDEN_SHELL=1 set. If your .zshrc runs exec tmux or an instant prompt,
skip that part when the variable is set:
if [[ -z $EFR_HIDDEN_SHELL ]]; then
# your exec tmux or instant prompt lines
fi
The hidden shell tells more.
Check the install
efr status
efr sandbox check
efr statusshows the daemon, its screen backend and the providers that you logged in to.efr sandbox checkruns every check of theautosandbox. For each check that fails, it prints the fix, such aspacman -S bubblewrap.
When no daemon runs, efr exits with code 3 and tells you to run
systemctl --user start efrd. Troubleshooting tells more.
Upgrade
The running daemon keeps the old version until it restarts. After each upgrade, run:
systemctl --user restart efrd
Install efr and efrd from the same build. When efrd is older than efr, efr tells you
to restart efrd.
Try efr without an install
In a clone, just run starts a daemon in the foreground. It uses new, empty
directories in a temporary directory, and it removes them when you stop it with Ctrl+C.
- Run
just runin one terminal. It prints theEFR_RUNTIME_DIRof the daemon. - In a second terminal, run
cargo build -p efr-cli. - In that terminal, export the
EFR_RUNTIME_DIRthatjust runprinted, and puttarget/debugof the clone first on yourPATH.
The plugin then shows the notices of that daemon too. That daemon has no login, so log in to it before your first prompt.
Next step
Send your first prompt.