Automation Scripts #
For a hands-off setup, the installer handles Rust, yame, and optional dependencies in one go.
| Platform | Script |
|---|---|
| macOS / Linux | _info/install.sh |
| Windows (PowerShell) | _info/install.ps1 |
install.sh (macOS / Linux) #
bash _info/install.sh
What it does #
- OS detection — identifies macOS or Linux (Debian/Ubuntu, Arch, Fedora/RHEL)
- Rust toolchain — checks for Cargo; installs via
rustupif missing - Optional dependencies — offers to install
fzf,fd, andlfusing the detected package manager - yame — runs
cargo install yame - Shell integration — offers to add
eval "$(yame init)"to your.zshrcor.bashrc - Config template — offers to run
yame write-config
Platform notes #
- Debian/Ubuntu:
fdis packaged asfd-find(binary:fdfind). The script installs the correct package name and theyame initwrapper handles the binary name difference automatically. - macOS: Requires Homebrew for optional tool installation. The script checks for it and skips if missing.
- Windows: Not supported by
install.sh. Useinstall.ps1instead (see below).
Shell Integration #
To add fuzzy-file-finding to yame, add this line to your .zshrc or .bashrc:
eval "$(yame init)"
Or let install.sh do it. To specify your shell explicitly:
eval "$(yame init zsh)"
eval "$(yame init bash)"
Once active, yame <term> fuzzy-searches filenames and yame with no argument fuzzy-finds Markdown files. Requires fd and fzf. See FRIENDS.md for details.
Config Template #
yame write-config
Writes a fully-commented ~/.config/yame/config.toml (or prompts before overwriting an existing one). Every option is explained inline — open the file in yame itself to read and edit it.
lf Setup #
After installing lf (see FRIENDS.md), configure it to open files with yame and use yame --preview for all file previews:
mkdir -p ~/.config/lf
# Add opener and previewer to lfrc
echo 'cmd open $yame "$f"' >> ~/.config/lf/lfrc
echo 'set previewer ~/.config/lf/preview' >> ~/.config/lf/lfrc
# Write the preview script
cat > ~/.config/lf/preview << 'EOF'
#!/usr/bin/env bash
COLUMNS="$2" yame --preview "$1"
EOF
chmod +x ~/.config/lf/preview
After this, Ctrl+O inside yame opens lf, and all files get yame's decorated preview in the lf pane — Markdown with full inline decoration, everything else with syntax highlighting.
install.ps1 (Windows) #
Run from PowerShell in the repository root:
.\install.ps1
If scripts are blocked by execution policy, run once before running the script:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
What it does #
- winget check — warns gracefully if winget isn't available (ships with Windows 10 21H2+ and Windows 11)
- Rust toolchain — installs via winget (
Rustlang.Rustup) or falls back to downloadingrustup-init.exedirectly - Optional dependencies — offers to install
fd,fzf, andlfvia winget - yame — runs
cargo install yame - PowerShell wrapper function — offers to add a native PowerShell
yamewrapper to your$PROFILE(sinceyame initoutputs bash/zsh syntax only); the wrapper provides the same fuzzy-file-finding behavior - Git Bash note — if Git Bash is detected, prints the
eval "$(yame init)"line to add to~/.bashrc - Config template — offers to run
yame write-config(writes to%APPDATA%\yame\config.toml) - lf setup — if lf is installed, offers to write
%APPDATA%\lf\lfrcand apreview.batthat callsyame --previewfor all files
PowerShell shell integration (manual) #
If you want to add the wrapper without running the script, add this to your $PROFILE:
function Invoke-Yame {
if ($args.Count -ne 1 -or $args[0] -match '^-') { & yame.exe @args; return }
$term = $args[0]
if (Test-Path $term) { & yame.exe $term; return }
$haveFd = $null -ne (Get-Command fd -ErrorAction SilentlyContinue)
$haveFzf = $null -ne (Get-Command fzf -ErrorAction SilentlyContinue)
if (-not $haveFd -or -not $haveFzf) { & yame.exe @args; return }
$selected = fd --type f --extension md $term 2>$null | fzf --select-1 --exit-0
if (-not $selected) {
$selected = fd --type f --hidden -E node_modules -E .git -E target $term 2>$null |
fzf --select-1 --exit-0
}
if ($selected) { & yame.exe $selected }
else {
$ans = Read-Host "yame: no file matching '$term' found. Open new file? [y/N]"
if ($ans -match '^[Yy]$') { & yame.exe $term }
}
}
Set-Alias -Name yame -Value Invoke-Yame -Scope Global -Force
The function calls
yame.exeexplicitly to bypass the alias when invoking the real binary.