Command Reference
ya CLI Commands
The ya command-line tool manages packages, plugins, and IPC:
| Command | Description |
|---|---|
ya pkg | Manage installed packages |
ya pub | Publish a package |
ya pub-to | Publish to a specific channel |
ya emit | Emit an event to a running Yazi instance |
ya pack --list | List installed packages |
ya pack --upgrade | Upgrade all packages |
ya pkg Subcommands
| Subcommand | Description |
|---|---|
ya pkg --list | List installed packages |
ya pkg --add <url> | Install a package from URL |
ya pkg --remove <name> | Remove a package |
ya pkg --upgrade | Upgrade all packages |
ya emit
Send a Yazi event from the command line to a running instance:
# Emit a cd event
ya emit cd "~/projects"
# Emit a quit event
ya emit quit
This is useful for scripting Yazi from external tools.
yazi CLI Flags
| Flag | Description |
|---|---|
--cwd-file <path> | Write the last-visited directory to a file on exit (used by the shell wrapper) |
--clear-cache | Clear the cache directory and exit |
--image-protocol <proto> | Override the image protocol (kitty, sixel, iterm2, uberzug++, chafa) |
--debug | Print debug information |
--version | Show version information |
--help | Show help message |
Shell Wrapper Integration
The --cwd-file flag enables the shell wrapper (y function):
# Inside your shell rc file:
y() {
local tmp="$(mktemp)"
yazi --cwd-file="$tmp" "$@"
if [ -f "$tmp" ]; then
cd "$(cat "$tmp")"
rm -f "$tmp"
fi
}
DDS Commands
DDS (Data Distribution Service) commands for multi-instance communication:
| Command | Description |
|---|---|
ya dds pub <topic> | Publish data to a topic |
ya dds sub <topic> | Subscribe to a topic |
dds.enabled = true | Enable DDS in yazi.toml |
ya emit --dds <event> | Emit event to all Yazi instances via DDS |
Package Management
| Command | Description |
|---|---|
ya pack -a <user>/<package> | Add/install a package |
ya pack -a <user>/<package>:<branch> | Install from a specific branch |
ya pack -l | List installed packages |
ya pack -U | Upgrade all packages |
ya pack -u <name> | Upgrade a specific package |
ya pack -r <name> | Remove a package |
Packages are installed to ~/.config/yazi/packages/.